|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.p2p.past.PastImpl
| Field Summary | |
protected Endpoint |
endpoint
|
protected IdFactory |
factory
|
protected java.util.logging.Logger |
log
|
static int |
MESSAGE_TIMEOUT
|
protected ReplicationManagerImpl |
replicaManager
|
protected int |
replicationFactor
|
protected StorageManager |
storage
|
| Constructor Summary | |
PastImpl(Node node,
StorageManager manager,
int replicas,
java.lang.String instance)
Constructor for Past |
|
| Method Summary | |
void |
deliver(Id id,
Message message)
This method is called on the application at the destination node for the given id. |
boolean |
exists(Id id)
This upcall should return whether or not the given id is currently stored by the client. |
void |
fetch(Id id,
Continuation command)
This upcall is invoked to tell the client to fetch the given id, and to call the given command with the boolean result once the fetch is completed. |
void |
fetch(PastContentHandle handle,
Continuation command)
Retrieves the object associated with a given content handle. |
boolean |
forward(RouteMessage message)
This method is invoked on applications when the underlying node is about to forward the given message with the provided target to the specified next hop. |
NodeHandle |
getLocalNodeHandle()
get the nodeHandle of the local Past node |
Replication |
getReplicaManager()
Returns the replica manager for this Past instance. |
int |
getReplicationFactor()
Returns the number of replicas used in this Past |
StorageManager |
getStorageManager()
Returns this Past's storage manager. |
void |
insert(PastContent obj,
Continuation command)
Inserts an object with the given ID into this instance of Past. |
void |
lookup(Id id,
Continuation command)
Retrieves the object stored in this instance of Past with the given ID. |
void |
lookupHandles(Id id,
int max,
Continuation command)
Retrieves the handles of up to max replicas of the object stored in this instance of Past with the given ID. |
void |
remove(Id id,
Continuation command)
This upcall is to notify the client that the given id can be safely removed from the storage. |
IdSet |
scan(IdRange range)
This upcall should return the set of keys that the application currently stores in this range. |
void |
update(NodeHandle handle,
boolean joined)
This method is invoked to inform the application that the given node has either joined or left the neighbor set of the local node, as the set would be returned by the neighborSet call. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int MESSAGE_TIMEOUT
protected Endpoint endpoint
protected StorageManager storage
protected int replicationFactor
protected ReplicationManagerImpl replicaManager
protected IdFactory factory
protected java.util.logging.Logger log
| Constructor Detail |
public PastImpl(Node node,
StorageManager manager,
int replicas,
java.lang.String instance)
node - The node below this Past implementationmanager - The storage manager to be used by Pastreplicas - The number of object replicasinstance - The unique instance name of this Past| Method Detail |
public void insert(PastContent obj,
Continuation command)
insert in interface Pastobj - the object to be insertedcommand - Command to be performed when the result is received
public void lookup(Id id,
Continuation command)
lookup in interface Pastid - the key to be queriedcommand - Command to be performed when the result is received
public void lookupHandles(Id id,
int max,
Continuation command)
lookupHandles in interface Pastid - the key to be queriedmax - the maximal number of replicas requestedcommand - Command to be performed when the result is received
public void fetch(PastContentHandle handle,
Continuation command)
fetch in interface Pastcommand - Command to be performed when the result is receivedhandle - the key to be queriedpublic NodeHandle getLocalNodeHandle()
getLocalNodeHandle in interface Pastpublic int getReplicationFactor()
getReplicationFactor in interface Pastpublic boolean forward(RouteMessage message)
forward in interface Applicationmessage - The message being sent, containing an internal message
along with a destination key and nodeHandle next hop.
public void deliver(Id id,
Message message)
deliver in interface Applicationid - The destination id of the messagemessage - The message being sent
public void update(NodeHandle handle,
boolean joined)
update in interface Applicationhandle - The handle that has joined/leftjoined - Whether the node has joined or left
public void fetch(Id id,
Continuation command)
fetch in interface ReplicationManagerClientid - The id to fetch
public void remove(Id id,
Continuation command)
remove in interface ReplicationManagerClientid - The id to removepublic IdSet scan(IdRange range)
scan in interface Pastrange - the requested range
public boolean exists(Id id)
exists in interface ReplicationManagerClientid - The id in question
public Replication getReplicaManager()
public StorageManager getStorageManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||