tapestry.ptr.impl
Class DirectMailStage

java.lang.Object
  |
  +--ostore.util.StandardStage
        |
        +--tapestry.ptr.impl.DirectMailStage
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class DirectMailStage
extends StandardStage
implements SingleThreadedEventHandlerIF

DirectMail is mail (i.e. msg) sent out and forwarded by the DirectMailStage as a type of multicast msg that will efficiently deliver the mail to all the The DirectMailStage delivers mail efficiently to all the nodes in the system. The mail can be constrained to nodes within a certain radius (number of hops. e.g. all nodes within 2 hops of sender). At each hop, the DirectMailStage will wait for acknowledgment that the next hop has received the mail. The next hop will only send back an acknowledgement after all of its next hop's (+ 1) have sent back an acknowledgement. That is, when the original sender receives all acknowledgement, than all the nodes within the specified radius of sender have received the mail.

USAGE

To send mail, create a class that extends DirectMail and dispatch mail event.

INITIALIZATION PARAMETERS

node_id
NodeId of the local server where this stage is running.
IncludePath
Specifies if the DirectMailMsg should include path information. Flag should be false under most circumstances, unless debugging.
XactCachePollInterval
Specifies the length of time in milliseconds to keep around transaction identifiers. transaction identifiers are used to filter duplicate DirectMailMsg.
AlarmTimeout
The base period (one hop) to timeout a DirectMailMsg.
Retries
Number of times to attempt to resend a DirectMailMsg within the AlarmTimeout time.

Version:
$Id: DirectMailStage.java,v 1.1.1.1 2004/03/26 19:57:10 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
DirectMail, DirectMailMsg, DirectMailAckMsg, DirectMailNackMsg, TapestryReadyMsg

Nested Class Summary
 class DirectMailStage.CheckXactCacheMsg
          A msg that triggers the xactCache to be cleaned.
 class DirectMailStage.NextHopState
          Class to hold next hop state.
 class DirectMailStage.XactKey
          A msg that triggers the xactCache to be cleaned.
 
Field Summary
 
Fields inherited from class ostore.util.StandardStage
classifier, DEBUG, event_types, inb_msg_types, my_node_id, my_sink, outb_msg_types, tag
 
Constructor Summary
DirectMailStage()
           
 
Method Summary
 void handleEvent(QueueElementIF item)
          Specified by seda.sandStorm.api.EventHandlerIF
 void init(ConfigDataIF config)
          Specified by seda.sandStorm.api.EventHandlerIF
 
Methods inherited from class ostore.util.StandardStage
BUG, destroy, dispatch, enqueue, handleEvents, now_ms, now_us
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectMailStage

public DirectMailStage()
Method Detail

handleEvent

public void handleEvent(QueueElementIF item)
                 throws EventHandlerException
Specified by seda.sandStorm.api.EventHandlerIF

Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException

init

public void init(ConfigDataIF config)
          throws Exception
Specified by seda.sandStorm.api.EventHandlerIF

Specified by:
init in interface EventHandlerIF
Overrides:
init in class StandardStage
Exception