|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.past.PASTServiceImpl
Field Summary | |
protected java.util.Hashtable |
commandTable
Deprecated. The table used to store commands waiting for a response. |
static boolean |
DEBUG
Deprecated. Whether to print debugging statements. |
Constructor Summary | |
PASTServiceImpl(Node node,
StorageManager storage,
java.lang.String instance)
Deprecated. Builds a new PASTService to run on the given PastryNode, given a Storage object (to persistedly store objects) and a cache used to cache objects. |
Method Summary | |
protected void |
_handleResponseMessage(PASTMessage msg)
Deprecated. Receives a response message after a request has been sent and gives it to the appropriate command. |
protected void |
_sendRequestMessage(PASTMessage msg,
Continuation command)
Deprecated. Sends a request message and stores the given command to be executed when the response is received. |
protected void |
debug(java.lang.String message)
Deprecated. Prints a debugging message to System.out if the DEBUG flag is turned on. |
void |
delete(Id id,
Continuation command)
Deprecated. Reclaims the storage used by the object with the given ID. |
void |
deliver(Id id,
Message msg)
Deprecated. Called by pastry when a message arrives for this application. |
void |
exists(Id id,
Continuation command)
Deprecated. Determines whether an object is currently stored at the given ID. |
void |
fetch(IdSet keySet)
Deprecated. This upcall is invoked to notify the application that is should fetch the cooresponding keys in this set, since the node is now responsible for these keys also |
boolean |
forward(RouteMessage message)
Deprecated. 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. |
Id |
getId()
Deprecated. Returns the Node |
RM |
getRM()
Deprecated. Return the RM |
StorageManager |
getStorage()
Deprecated. Returns the StorageManager object |
void |
insert(Id id,
java.io.Serializable obj,
Continuation command)
Deprecated. Inserts an object with the given ID into distributed storage. |
void |
isResponsible(IdRange range)
Deprecated. This upcall is to notify the application of the range of keys for which it is responsible. |
void |
lookup(Id id,
Continuation command)
Deprecated. Retrieves the object and all associated updates with the given ID. |
void |
rmIsReady(RM rm)
Deprecated. This upcall is simply to denote that the underlying replica manager (rm) is ready. |
IdSet |
scan(IdRange range)
Deprecated. This upcall should return the set of keys that the application currently stores in this range. |
void |
sendMessage(PASTMessage msg)
Deprecated. Sends a message to a remote PAST node (either a request or response). |
void |
update(NodeHandle handle,
boolean joined)
Deprecated. 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 boolean DEBUG
protected java.util.Hashtable commandTable
Constructor Detail |
public PASTServiceImpl(Node node, StorageManager storage, java.lang.String instance)
node
- the node to run onstorage
- The Storage object to use for storage and cachinginstance
- The instance name for Past to useMethod Detail |
public StorageManager getStorage()
public Id getId()
public RM getRM()
public void deliver(Id id, Message msg)
deliver
in interface Application
id
- The destination id of the incoming messagemsg
- the message that is arriving.public boolean forward(RouteMessage message)
forward
in interface Application
message
- The message being sent, containing an internal message
along with a destination key and nodeHandle next hop.
public void update(NodeHandle handle, boolean joined)
update
in interface Application
handle
- The handle that has joined/leftjoined
- Whether the node has joined or leftpublic void sendMessage(PASTMessage msg)
msg
- PASTMessage to sendprotected void _sendRequestMessage(PASTMessage msg, Continuation command)
msg
- Request to sendcommand
- Command to execute when the result is receivedprotected void _handleResponseMessage(PASTMessage msg)
public void insert(Id id, java.io.Serializable obj, Continuation command)
insert
in interface PASTService
id
- Pastry key identifying the object to be storedobj
- Persistable object to be storedcommand
- Command to be performed when the result is receivedpublic void lookup(Id id, Continuation command)
lookup
in interface PASTService
id
- Pastry key of original objectcommand
- Command to be performed when the result is receivedpublic void exists(Id id, Continuation command)
exists
in interface PASTService
id
- Pastry key of original objectcommand
- Command to be performed when the result is receivedpublic void delete(Id id, Continuation command)
delete
in interface PASTService
id
- Pastry key of original objectcommand
- Command to be performed when the result is receivedpublic void fetch(IdSet keySet)
fetch
in interface RMClient
keySet
- The keys to fetchpublic void rmIsReady(RM rm)
rmIsReady
in interface RMClient
rm
- The rm which is now readypublic void isResponsible(IdRange range)
isResponsible
in interface RMClient
range
- The range this node is now responseable forpublic IdSet scan(IdRange range)
scan
in interface RMClient
range
- the requested range
protected void debug(java.lang.String message)
message
- The message to print
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |