|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.aggregation.AggregationImpl
public class AggregationImpl
Field Summary | |
---|---|
protected AggregateFactory |
aggregateFactory
|
protected AggregateList |
aggregateList
|
protected Past |
aggregateStore
|
protected PastContentDeserializer |
contentDeserializer
|
protected PastContentHandleDeserializer |
contentHandleDeserializer
|
protected Endpoint |
endpoint
|
protected IdFactory |
factory
|
protected Continuation |
flushWait
|
protected java.lang.String |
instance
|
protected Logger |
logger
|
protected java.util.Vector |
monitorIDs
|
protected Node |
node
|
protected Past |
objectStore
|
protected AggregationPolicy |
policy
|
protected boolean |
rebuildInProgress
|
protected AggregationStatistics |
stats
|
protected java.util.Hashtable |
timers
|
protected StorageManager |
waitingList
|
Fields inherited from interface rice.p2p.past.gc.GCPast |
---|
INFINITY_EXPIRATION |
Constructor Summary | |
---|---|
AggregationImpl(Node node,
Past aggregateStore,
Past objectStore,
StorageManager waitingList,
java.lang.String configFileName,
IdFactory factory,
java.lang.String instance)
|
|
AggregationImpl(Node node,
Past aggregateStore,
Past objectStore,
StorageManager waitingList,
java.lang.String configFileName,
IdFactory factory,
java.lang.String instance,
AggregationPolicy policy,
AggregateFactory aggregateFactory)
|
Method Summary | |
---|---|
void |
deliver(Id id,
Message message)
This method is called on the application at the destination node for the given id. |
void |
fetch(PastContentHandle handle,
Continuation command)
Retrieves the object associated with a given content handle. |
void |
flush(Continuation command)
Creates aggregates from all objects in the local object cache. |
void |
flush(Id id,
Continuation command)
Creates an aggregate that includes the most current object with the specified key. |
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. |
Past |
getAggregateStore()
|
Environment |
getEnvironment()
|
java.io.Serializable |
getHandle()
Fetches the handle object. |
java.lang.String |
getInstance()
|
NodeHandle |
getLocalNodeHandle()
get the nodeHandle of the local Past node |
int |
getNumObjectsWaiting()
|
Past |
getObjectStore()
|
int |
getReplicationFactor()
Returns the number of replicas used in this Past |
AggregationStatistics |
getStatistics()
|
java.lang.String |
handleDebugCommand(java.lang.String command)
|
void |
insert(PastContent obj,
Continuation command)
Inserts an object with the given ID into this instance of Past. |
void |
insert(PastContent obj,
long lifetime,
Continuation command)
Inserts an object with the given ID into this instance of Past. |
void |
lookup(Id id,
boolean cache,
Continuation command)
Retrieves the object stored in this instance of Past with the given ID. |
void |
lookup(Id id,
Continuation command)
Retrieves the object stored in this instance of Past with the given ID. |
void |
lookup(Id id,
long version,
Continuation command)
Retrieves the object stored in this instance of Past with the given ID and the specified version. |
void |
lookupHandle(Id id,
NodeHandle handle,
Continuation command)
Retrieves the handle for the given object stored on the requested node. |
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 |
lookupHandles(Id id,
long version,
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 |
refresh(Id[] ids,
long[] expirations,
Continuation command)
Updates the objects stored under the provided keys id to expire no earlier than the provided expiration time. |
void |
refresh(Id[] ids,
long[] versions,
long[] expirations,
Continuation command)
Updates the objects stored under the provided keys id to expire no earlier than the provided expiration time. |
void |
refresh(Id[] ids,
long expiration,
Continuation command)
Updates the objects stored under the provided keys id to expire no earlier than the provided expiration time. |
void |
reset(Continuation command)
Deletes all local state, including the aggregate list and all objects waiting in the local buffer. |
void |
rollback(Id id,
Continuation command)
Attempts to retrieve the most recent object that has been inserted by the local node under the specified key. |
void |
setConsolidationInterval(long consolidationIntervalSec)
|
void |
setConsolidationMinObjectsPerAggregate(int minObjectsInAggregateArg)
|
void |
setConsolidationMinUtilization(double minUtilization)
|
void |
setConsolidationThreshold(long consolidationThresholdSec)
|
void |
setContentDeserializer(PastContentDeserializer deserializer)
|
void |
setContentHandleDeserializer(PastContentHandleDeserializer deserializer)
|
void |
setFlushInterval(int flushIntervalSec)
|
void |
setHandle(java.io.Serializable handle,
Continuation command)
Restores the handle object. |
void |
setMaxAggregateSize(int maxAggregateSize)
|
void |
setMaxObjectsInAggregate(int maxObjectsInAggregate)
|
void |
setRenewThreshold(int expirationRenewThresholdHrs)
|
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 |
---|
protected final Past aggregateStore
protected final StorageManager waitingList
protected final AggregationPolicy policy
protected final AggregateList aggregateList
protected final Endpoint endpoint
protected final Past objectStore
protected final java.lang.String instance
protected final IdFactory factory
protected final Node node
protected java.util.Hashtable timers
protected Continuation flushWait
protected boolean rebuildInProgress
protected java.util.Vector monitorIDs
protected AggregationStatistics stats
protected Logger logger
protected PastContentDeserializer contentDeserializer
protected PastContentHandleDeserializer contentHandleDeserializer
protected AggregateFactory aggregateFactory
Constructor Detail |
---|
public AggregationImpl(Node node, Past aggregateStore, Past objectStore, StorageManager waitingList, java.lang.String configFileName, IdFactory factory, java.lang.String instance) throws java.io.IOException
java.io.IOException
public AggregationImpl(Node node, Past aggregateStore, Past objectStore, StorageManager waitingList, java.lang.String configFileName, IdFactory factory, java.lang.String instance, AggregationPolicy policy, AggregateFactory aggregateFactory) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public java.lang.String handleDebugCommand(java.lang.String command)
handleDebugCommand
in interface DebugCommandHandler
public void refresh(Id[] ids, long expiration, Continuation command)
GCPast
refresh
in interface GCPast
expiration
- The time to extend the lifetime to (applies to all keys)command
- Command to be performed when the result is receivedpublic void refresh(Id[] ids, long[] expirations, Continuation command)
GCPast
refresh
in interface GCPast
expirations
- The time to extend the lifetime tocommand
- Command to be performed when the result is receivedpublic void refresh(Id[] ids, long[] versions, long[] expirations, Continuation command)
VersioningPast
refresh
in interface VersioningPast
command
- Command to be performed when the result is receivedpublic java.io.Serializable getHandle()
Aggregation
getHandle
in interface Aggregation
public void setHandle(java.io.Serializable handle, Continuation command)
Aggregation
setHandle
in interface Aggregation
handle
- the handle objectcommand
- Command to be performed when the method completes.public void insert(PastContent obj, Continuation command)
GCPast
insert
in interface GCPast
insert
in interface Past
obj
- the object to be insertedcommand
- Command to be performed when the result is receivedpublic void insert(PastContent obj, long lifetime, Continuation command)
GCPast
insert
in interface GCPast
obj
- the object to be insertedlifetime
- the time until which the object must be storedcommand
- Command to be performed when the result is receivedpublic void lookup(Id id, boolean cache, Continuation command)
Past
lookup
in interface Past
id
- the key to be queriedcache
- Whether or not the result should be cachedcommand
- Command to be performed when the result is receivedpublic void lookup(Id id, long version, Continuation command)
VersioningPast
lookup
in interface VersioningPast
id
- the key to be queriedcommand
- Command to be performed when the result is receivedpublic void lookup(Id id, Continuation command)
Past
lookup
in interface Past
id
- the key to be queriedcommand
- Command to be performed when the result is receivedpublic void lookupHandles(Id id, long version, int max, Continuation command)
VersioningPast
lookupHandles
in interface VersioningPast
id
- the key to be queriedversion
- the requested versioncommand
- Command to be performed when the result is receivedpublic void lookupHandle(Id id, NodeHandle handle, Continuation command)
Past
lookupHandle
in interface Past
id
- the key to be queriedhandle
- The node on which the handle is requestedcommand
- Command to be performed when the result is receivedpublic void lookupHandles(Id id, int max, Continuation command)
Past
lookupHandles
in interface Past
id
- the key to be queriedmax
- the maximal number of replicas requestedcommand
- Command to be performed when the result is receivedpublic void fetch(PastContentHandle handle, Continuation command)
Past
fetch
in interface Past
handle
- the key to be queriedcommand
- Command to be performed when the result is receivedpublic void flush(Id id, Continuation command)
Aggregation
flush
in interface Aggregation
id
- the key of the object to be made persistent.command
- Command to be performed when the method completes.public void flush(Continuation command)
Aggregation
flush
in interface Aggregation
command
- Command to be performed when the method completes.public void rollback(Id id, Continuation command)
Aggregation
rollback
in interface Aggregation
id
- the key of the object to be retrievedcommand
- Command to be performed when the method completes.public void reset(Continuation command)
Aggregation
reset
in interface Aggregation
command
- Command to be performed when the method completes.public NodeHandle getLocalNodeHandle()
Past
getLocalNodeHandle
in interface Past
public int getReplicationFactor()
Past
getReplicationFactor
in interface Past
public boolean forward(RouteMessage message)
Application
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)
Application
update
in interface Application
handle
- The handle that has joined/leftjoined
- Whether the node has joined or leftpublic void deliver(Id id, Message message)
Application
deliver
in interface Application
id
- The destination id of the messagemessage
- The message being sentpublic void setFlushInterval(int flushIntervalSec)
public void setMaxAggregateSize(int maxAggregateSize)
public void setMaxObjectsInAggregate(int maxObjectsInAggregate)
public void setRenewThreshold(int expirationRenewThresholdHrs)
public void setConsolidationInterval(long consolidationIntervalSec)
public void setConsolidationThreshold(long consolidationThresholdSec)
public void setConsolidationMinObjectsPerAggregate(int minObjectsInAggregateArg)
public void setConsolidationMinUtilization(double minUtilization)
public Past getAggregateStore()
public Past getObjectStore()
public int getNumObjectsWaiting()
public AggregationStatistics getStatistics()
public java.lang.String getInstance()
getInstance
in interface Past
public Environment getEnvironment()
getEnvironment
in interface Past
public void setContentDeserializer(PastContentDeserializer deserializer)
setContentDeserializer
in interface Past
public void setContentHandleDeserializer(PastContentHandleDeserializer deserializer)
setContentHandleDeserializer
in interface Past
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |