All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.DistributedArbitrator
java.lang.Object
|
+----ncsa.habanero.ModelObject
|
+----ncsa.habanero.granted.Arbitrator
|
+----ncsa.habanero.DistributedArbitrator
- public class DistributedArbitrator
- extends Arbitrator
This is the client-side portion of our centralized Arbitrator.
It has a connection to the server object (through a DeferredIO
object), which does the actual work. It can also get messages
back fromthe server object, which might ask it to tell somebody that an
ActionRequest was refused, or to route the ActionGranted itself.
Presumably subclasses would be built to do these things.
-
granter
-
-
serializer
-
-
DistributedArbitrator()
- This is the default constructor, used for unmarshalling.
-
DistributedArbitrator(Arbitrator)
- The constructor takes, as arguments, the parent Arbitrator,
the host name and port number of the Arbitrator to connect
to, and a boolean indicating whether this Arbitrator has its
own router.
-
arbitrate(ActionRequest)
- The arbitrate routine sends the request to the CentralArbitrator.
-
blockingGetLock(Lock, Key)
-
-
copySerializer(Arbitrator)
-
-
deliver(ServerMessage)
-
-
getLock(Lock)
-
getLock
Requires: lkdNew
Modifies: itself
Effects: returns a key to a locker if it is legal to do so
is OK to do so
-
getLock(Lock, Key)
-
-
getSerializer()
- Return this object's serializer.
-
getTicketGranter()
- This object has no TicketGranter
-
putAnswer(ServerMessage)
-
-
releaseLock(Key)
-
releaseLock
Requires: lkFinished - the key of the lock that is no longer needed
Modifies: itself
Effects: releases the lock
-
stop()
-
-
waitForMessage()
-
granter
protected transient TicketGranter granter
serializer
protected Serializer serializer
DistributedArbitrator
public DistributedArbitrator(Arbitrator mama)
- The constructor takes, as arguments, the parent Arbitrator,
the host name and port number of the Arbitrator to connect
to, and a boolean indicating whether this Arbitrator has its
own router.
DistributedArbitrator
public DistributedArbitrator()
- This is the default constructor, used for unmarshalling.
arbitrate
public synchronized boolean arbitrate(ActionRequest request)
- The arbitrate routine sends the request to the CentralArbitrator.
- Parameters:
- request - the ActionRequest we want to grant
- Overrides:
- arbitrate in class Arbitrator
getTicketGranter
public TicketGranter getTicketGranter()
- This object has no TicketGranter
- Overrides:
- getTicketGranter in class Arbitrator
getSerializer
public Serializer getSerializer()
- Return this object's serializer.
- Overrides:
- getSerializer in class Arbitrator
getLock
public Key getLock(Lock lkdNew)
- getLock
Requires: lkdNew
Modifies: itself
Effects: returns a key to a locker if it is legal to do so
is OK to do so
- Overrides:
- getLock in class Arbitrator
getLock
public Key getLock(Lock lkdNew,
Key oldKey)
- Overrides:
- getLock in class Arbitrator
blockingGetLock
public Key blockingGetLock(Lock lkdNew,
Key oldKey)
- Overrides:
- blockingGetLock in class Arbitrator
releaseLock
public void releaseLock(Key lkFinished)
- releaseLock
Requires: lkFinished - the key of the lock that is no longer needed
Modifies: itself
Effects: releases the lock
- Overrides:
- releaseLock in class Arbitrator
waitForMessage
protected synchronized ServerMessage waitForMessage()
putAnswer
protected synchronized void putAnswer(ServerMessage m)
deliver
public synchronized void deliver(ServerMessage message)
- Overrides:
- deliver in class Arbitrator
stop
public synchronized void stop()
- Overrides:
- stop in class Arbitrator
copySerializer
public void copySerializer(Arbitrator other)
- Parameters:
- other - the other distributed arbitrator
All Packages Class Hierarchy This Package Previous Next Index