|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.replication.manager.ReplicationManagerImpl.ReplicationManagerHelper
Inner class which keeps track of the state we're in- waiting, sleeping, or with nothing to do.
Field Summary | |
protected Id |
current
The next message UID which is available |
protected java.util.HashMap |
hints
A cache of hints, mapping Id -> NodeHandle |
protected IdSet |
set
The set of keys we have yet to fetch |
protected int |
state
The current state that we are in |
int |
STATE_NOTHING
The set of possible states we can be in |
int |
STATE_SLEEPING
DESCRIBE THE FIELD |
int |
STATE_WAITING
DESCRIBE THE FIELD |
Constructor Summary | |
ReplicationManagerImpl.ReplicationManagerHelper()
Constructor |
Method Summary | |
void |
fetch(IdSet keySet,
NodeHandle hint)
Method by which keys are added to the list of keys to fetch |
protected Id |
getNextId()
Interal method which safely takes the next id to be fetched from the set of pending keys |
void |
message(Id id)
DESCRIBE THE METHOD |
IdSet |
scan(IdRange range)
In this case, it returns the list of keys the client has, along with the keys which we have yet to tell the client to fetch. |
protected void |
send()
Method which determines if a message should be sent, and if so, sends it |
void |
setRange(IdRange range)
Method by which the range is set, which will delete any keys from the to fetch list not in the range |
void |
wakeup()
DESCRIBE THE METHOD |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int STATE_NOTHING
public int STATE_WAITING
public int STATE_SLEEPING
protected int state
protected IdSet set
protected Id current
protected java.util.HashMap hints
Constructor Detail |
public ReplicationManagerImpl.ReplicationManagerHelper()
Method Detail |
protected Id getNextId()
public void setRange(IdRange range)
range
- The new rangepublic void fetch(IdSet keySet, NodeHandle hint)
keySet
- The keys to addhint
- DESCRIBE THE PARAMETERpublic IdSet scan(IdRange range)
range
- the requested range
protected void send()
public void wakeup()
public void message(Id id)
id
- DESCRIBE THE PARAMETER
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |