All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.replay.ReplayArbitrator
java.lang.Object
|
+----ncsa.habanero.ModelObject
|
+----ncsa.habanero.granted.Arbitrator
|
+----ncsa.habanero.CentralArbitrator
|
+----ncsa.habanero.replay.ReplayArbitrator
- public class ReplayArbitrator
- extends CentralArbitrator
ReplayArbitrator
-
bCollaborate
-
-
delegate
-
-
engine
-
-
ReplayArbitrator()
-
-
ReplayArbitrator(Arbitrator)
-
-
ReplayArbitrator(Arbitrator, DistributedPlaybackEngine)
-
-
arbitrate(ActionRequest)
- The arbitrate routine simply grants the request and asks
the router to send it to everyone
-
getDelegate()
-
-
getEngine()
-
-
getLock(Lock, Key)
- getLock
-
getSerializer()
-
-
getSession()
-
-
getTicketGranter()
-
-
init(Arbitrator)
-
-
releaseLock(Key)
-
-
route_to_everyone(ActionGranted)
-
-
setDelegate(CentralArbitrator)
-
-
setOwner(Sharable)
-
-
startCollaborating()
-
-
stop()
-
engine
protected DistributedPlaybackEngine engine
delegate
protected CentralArbitrator delegate
bCollaborate
protected boolean bCollaborate
ReplayArbitrator
public ReplayArbitrator(Arbitrator parent) throws IOException
- Parameters:
- parent - the parent arbitrator
- Returns:
- creates a replay arbitrator
ReplayArbitrator
public ReplayArbitrator(Arbitrator parent,
DistributedPlaybackEngine dpe) throws IOException
- Parameters:
- parent - the parent arbitrator
- Returns:
- creates a replay arbitrator
ReplayArbitrator
public ReplayArbitrator() throws IOException
- Returns:
- creates a replay arbitrator
getLock
public synchronized Key getLock(Lock ldRequest,
Key oldKey)
- getLock
- Parameters:
- lpdRequest - - what you would like to do
- oldKey - - the key that permits us to get the lock
- Returns:
- checks to see if you are allowed to do that, and
returns a key
- Overrides:
- getLock in class CentralArbitrator
releaseLock
public synchronized void releaseLock(Key kFinished)
- Parameters:
- kFinished - - the key of the lock that is no longer needed
- Returns:
- Does nothing with it, you can't get a key from a replay
arbitrator
- Overrides:
- releaseLock in class CentralArbitrator
arbitrate
public synchronized boolean arbitrate(ActionRequest request)
- The arbitrate routine simply grants the request and asks
the router to send it to everyone
- Parameters:
- request - the ActionRequest we want to grant
- Returns:
- true if the action was sent out, false otherwise
- Overrides:
- arbitrate in class CentralArbitrator
getEngine
public DistributedPlaybackEngine getEngine()
- Returns:
- the engine
startCollaborating
public void startCollaborating()
- Returns:
- starts collaborating and stops the engine
setOwner
public void setOwner(Sharable s)
- Returns:
- starts collaborating and stops the engine
- Overrides:
- setOwner in class Arbitrator
init
public void init(Arbitrator parent) throws IOException
- Parameters:
- parent - the parent arbitrator
- Returns:
- sets up the arbitrator
- Overrides:
- init in class CentralArbitrator
route_to_everyone
public synchronized void route_to_everyone(ActionGranted granted)
- Parameters:
- granted - the action that can be sent to everyone
- Returns:
- The extra indirection of this routine is provided if the
router is not local to this object. In that case, this
routine could be overridden to send the ActionGranted back
to the client, or to some other routing machine.
- Overrides:
- route_to_everyone in class CentralArbitrator
setDelegate
public void setDelegate(CentralArbitrator arbi)
- Parameters:
- arbi - the arbitrator
- Returns:
- updates the delegate
getDelegate
public CentralArbitrator getDelegate()
- Returns:
- returns the delegate
getTicketGranter
public TicketGranter getTicketGranter()
- Returns:
- This arbitrator's TicketGranter
- Overrides:
- getTicketGranter in class CentralArbitrator
getSerializer
public Serializer getSerializer()
- Returns:
- This arbitrator's Serializer
- Overrides:
- getSerializer in class CentralArbitrator
stop
public synchronized void stop()
- Returns:
- stops the CentralArbitrator from running
- Overrides:
- stop in class CentralArbitrator
getSession
public Session getSession()
- Returns:
- the session
- Overrides:
- getSession in class CentralArbitrator
All Packages Class Hierarchy This Package Previous Next Index