|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.vub.at.actors.natives.ReceptionistsSet
An NATActorMirror's ReceptionistsSet keeps a mapping between identifiers and local objects which allows resolving far objects to local ones. The ReceptionistsSet also stores which actors refer to an object, which is the basis for a distributed garbage collection algorithm.
Field Summary | |
private java.util.HashMap |
exportedObjectsTable_
object id (ATObjectID) -> local object (ATObject) |
private java.util.Hashtable |
farReferences_
a pool of far object references: ensures that each ATObjectID is paired with a unique far object reference |
private MultiMap |
objectToClients_
local object (ATObject) -> remote clients pointing to this object (Set of ATFarReference) |
private ELActor |
owner_
|
private java.util.Hashtable |
remoteReferences_
a pool of remote object references: ensures that each ATObjectID is paired with a unique remote object reference (and corresponding outbox) |
Constructor Summary | |
ReceptionistsSet(ELActor forActor)
|
Method Summary | |
void |
addClient(ATObject service,
ATFarReference client)
Invoked whenever another actor is passed a reference to an object offering a service on this actor. |
private NATLocalFarRef |
createLocalFarRef(ELActor actor,
ATObjectID objectId,
ATStripe[] stripes)
|
private NATRemoteFarRef |
createRemoteFarRef(ATObjectID objectId,
ATStripe[] stripes)
|
NATLocalFarRef |
exportObject(ATObject object)
Export a local object such that it now has a unique global identifier which can be distributed to other actors. |
void |
removeClient(ATObject service,
ATFarReference client)
Called upon the collection of a service on a remote device, or possibly when the conditions negotiated for the use of the service (e.g. its lease period) have expired. |
ATObject |
resolveObject(ATObjectID objectId,
ATStripe[] stripes)
Try to resolve a remote object reference into a local (near) reference. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.util.HashMap exportedObjectsTable_
private final MultiMap objectToClients_
private final ELActor owner_
private final java.util.Hashtable remoteReferences_
private final java.util.Hashtable farReferences_
Constructor Detail |
public ReceptionistsSet(ELActor forActor)
Method Detail |
private NATRemoteFarRef createRemoteFarRef(ATObjectID objectId, ATStripe[] stripes)
private NATLocalFarRef createLocalFarRef(ELActor actor, ATObjectID objectId, ATStripe[] stripes)
public NATLocalFarRef exportObject(ATObject object) throws InterpreterException
object
- - the local object to export to the outside world
XIllegalOperation
- - if object is a far reference
InterpreterException
public ATObject resolveObject(ATObjectID objectId, ATStripe[] stripes)
objectId
- the identifier of the remote object
InterpreterException
public void addClient(ATObject service, ATFarReference client) throws InterpreterException
InterpreterException
public void removeClient(ATObject service, ATFarReference client) throws InterpreterException
InterpreterException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |