|
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
protected class 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
|
int |
STATE_WAITING
|
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)
|
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()
|
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 |
---|
public void fetch(IdSet keySet, NodeHandle hint)
keySet
- The keys to addpublic void setRange(IdRange range)
range
- The new rangepublic IdSet scan(IdRange range)
range
- the requested rangeprotected void send()
protected Id getNextId()
public void wakeup()
public void message(Id id)
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |