|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfabric.dissemination.pastry.Disseminator
public class Disseminator
A pastry application that implements the functionality of a Fabric dissemination network based on the beehive replication protocol.
Field Summary | |
---|---|
protected long |
AGGREGATION_INTERVAL
Aggregation interval, in milliseconds. |
protected int |
baseBits
|
protected Cache |
cache
The cache of fetched objects. |
protected MessageDeserializer |
deserializer
|
protected Endpoint |
endpoint
The pastry endpoint. |
protected int |
idDigits
|
protected IdFactory |
idf
The pastry id generating factory. |
protected PastryNode |
node
The pastry node. |
protected java.util.Map<Id,Fetch> |
outstanding
Outstanding fetch messages awaiting replies. |
protected java.util.Random |
rand
Random source for random ids. |
protected long |
REPLICATION_INTERVAL
Replication interval, in milliseconds. |
Constructor Summary | |
---|---|
Disseminator(PastryNode node)
Creates a disseminator attached to the given pastry node. |
Method Summary | |
---|---|
protected void |
aggregateInterval()
Called once every aggregation interval. |
void |
deliver(Id id,
Message msg)
|
protected void |
fetch(Fetch.Reply msg)
Process a Fetch.Reply message. |
protected void |
fetch(Fetch msg)
Process the Fetch message. |
Glob |
fetch(RemoteStore c,
long onum)
Called by a FetchManager to fetch the specified object. |
boolean |
forward(RouteMessage message)
|
protected NodeHandle |
localHandle()
The NodeHandle of this pastry node. |
protected void |
replicate(Replicate.Reply msg)
Processes a Replicate.Reply message, and adds objects in the reply to the cache. |
protected void |
replicate(Replicate msg)
Processes a Replicate message. |
protected void |
replicateInterval()
Called once every replicate interval. |
protected void |
reply(Glob g,
Fetch msg)
Helper function. |
protected void |
route(Id id,
Message message,
NodeHandle hint)
Routes a message on the pastry ring. |
void |
update(NodeHandle handle,
boolean joined)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PastryNode node
protected Endpoint endpoint
protected IdFactory idf
protected int idDigits
protected int baseBits
protected java.util.Random rand
protected Cache cache
protected java.util.Map<Id,Fetch> outstanding
protected MessageDeserializer deserializer
protected long REPLICATION_INTERVAL
protected long AGGREGATION_INTERVAL
Constructor Detail |
---|
public Disseminator(PastryNode node)
node
- PastryNode where the disseminator is to run.Method Detail |
---|
protected void route(Id id, Message message, NodeHandle hint)
id
- The id of this message (hash value where it should be routed)message
- The message to be routedhint
- NodeHandle of a starting node, if desiredprotected NodeHandle localHandle()
public void deliver(Id id, Message msg)
public Glob fetch(RemoteStore c, long onum) throws DisseminationTimeoutException
DisseminationTimeoutException
- if the dissemination network takes too long.protected void fetch(Fetch.Reply msg)
protected void fetch(Fetch msg)
protected void reply(Glob g, Fetch msg)
protected void replicateInterval()
protected void replicate(Replicate msg)
protected void replicate(Replicate.Reply msg)
protected void aggregateInterval()
public boolean forward(RouteMessage message)
public void update(NodeHandle handle, boolean joined)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |