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


Variable Index

 o bCollaborate
 o delegate
 o engine

Constructor Index

 o ReplayArbitrator()
 o ReplayArbitrator(Arbitrator)
 o ReplayArbitrator(Arbitrator, DistributedPlaybackEngine)

Method Index

 o arbitrate(ActionRequest)
The arbitrate routine simply grants the request and asks the router to send it to everyone
 o getDelegate()
 o getEngine()
 o getLock(Lock, Key)
getLock
 o getSerializer()
 o getSession()
 o getTicketGranter()
 o init(Arbitrator)
 o releaseLock(Key)
 o route_to_everyone(ActionGranted)
 o setDelegate(CentralArbitrator)
 o setOwner(Sharable)
 o startCollaborating()
 o stop()

Variables

 o engine
 protected DistributedPlaybackEngine engine
 o delegate
 protected CentralArbitrator delegate
 o bCollaborate
 protected boolean bCollaborate

Constructors

 o ReplayArbitrator
 public ReplayArbitrator(Arbitrator parent) throws IOException
Parameters:
parent - the parent arbitrator
Returns:
creates a replay arbitrator
 o ReplayArbitrator
 public ReplayArbitrator(Arbitrator parent,
                         DistributedPlaybackEngine dpe) throws IOException
Parameters:
parent - the parent arbitrator
Returns:
creates a replay arbitrator
 o ReplayArbitrator
 public ReplayArbitrator() throws IOException
Returns:
creates a replay arbitrator

Methods

 o 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
 o 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
 o 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
 o getEngine
 public DistributedPlaybackEngine getEngine()
Returns:
the engine
 o startCollaborating
 public void startCollaborating()
Returns:
starts collaborating and stops the engine
 o setOwner
 public void setOwner(Sharable s)
Returns:
starts collaborating and stops the engine
Overrides:
setOwner in class Arbitrator
 o init
 public void init(Arbitrator parent) throws IOException
Parameters:
parent - the parent arbitrator
Returns:
sets up the arbitrator
Overrides:
init in class CentralArbitrator
 o 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
 o setDelegate
 public void setDelegate(CentralArbitrator arbi)
Parameters:
arbi - the arbitrator
Returns:
updates the delegate
 o getDelegate
 public CentralArbitrator getDelegate()
Returns:
returns the delegate
 o getTicketGranter
 public TicketGranter getTicketGranter()
Returns:
This arbitrator's TicketGranter
Overrides:
getTicketGranter in class CentralArbitrator
 o getSerializer
 public Serializer getSerializer()
Returns:
This arbitrator's Serializer
Overrides:
getSerializer in class CentralArbitrator
 o stop
 public synchronized void stop()
Returns:
stops the CentralArbitrator from running
Overrides:
stop in class CentralArbitrator
 o getSession
 public Session getSession()
Returns:
the session
Overrides:
getSession in class CentralArbitrator

All Packages  Class Hierarchy  This Package  Previous  Next  Index