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.


Variable Index

 o granter
 o serializer

Constructor Index

 o DistributedArbitrator()
This is the default constructor, used for unmarshalling.
 o 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.

Method Index

 o arbitrate(ActionRequest)
The arbitrate routine sends the request to the CentralArbitrator.
 o blockingGetLock(Lock, Key)
 o copySerializer(Arbitrator)
 o deliver(ServerMessage)
 o 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
 o getLock(Lock, Key)
 o getSerializer()
Return this object's serializer.
 o getTicketGranter()
This object has no TicketGranter
 o putAnswer(ServerMessage)
 o releaseLock(Key)
releaseLock Requires: lkFinished - the key of the lock that is no longer needed Modifies: itself Effects: releases the lock
 o stop()
 o waitForMessage()

Variables

 o granter
 protected transient TicketGranter granter
 o serializer
 protected Serializer serializer

Constructors

 o 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.

 o DistributedArbitrator
 public DistributedArbitrator()
This is the default constructor, used for unmarshalling.

Methods

 o 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
 o getTicketGranter
 public TicketGranter getTicketGranter()
This object has no TicketGranter

Overrides:
getTicketGranter in class Arbitrator
 o getSerializer
 public Serializer getSerializer()
Return this object's serializer.

Overrides:
getSerializer in class Arbitrator
 o 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
 o getLock
 public Key getLock(Lock lkdNew,
                    Key oldKey)
Overrides:
getLock in class Arbitrator
 o blockingGetLock
 public Key blockingGetLock(Lock lkdNew,
                            Key oldKey)
Overrides:
blockingGetLock in class Arbitrator
 o 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
 o waitForMessage
 protected synchronized ServerMessage waitForMessage()
 o putAnswer
 protected synchronized void putAnswer(ServerMessage m)
 o deliver
 public synchronized void deliver(ServerMessage message)
Overrides:
deliver in class Arbitrator
 o stop
 public synchronized void stop()
Overrides:
stop in class Arbitrator
 o copySerializer
 public void copySerializer(Arbitrator other)
Parameters:
other - the other distributed arbitrator

All Packages  Class Hierarchy  This Package  Previous  Next  Index