ostore.archive.dissemination
Class DisseminatorStage
java.lang.Object
|
+--ostore.archive.dissemination.DisseminatorStage
- All Implemented Interfaces:
- EventHandlerIF, ProfilableIF, SingleThreadedEventHandlerIF
- public class DisseminatorStage
- extends Object
- implements SingleThreadedEventHandlerIF, EventHandlerIF, ProfilableIF
The DisseminatorStage is the last step of the
archival process. The DisseminatorStage
completes the archival process by sending all
Disseminatables to unique
StorageServers.
The DisseminatorStage sends one
Disseminatable to
each StorageServer in a
dissemination set, a set of nodes that fail together with
low correlation, and waits for signed (i.e. MAC'd
Message Authentication Certificate) acknowledgements. If ACKs
are received for all
Disseminatables,
dissemination is complete. IfACKs for
some Disseminatables
are not received, the process DisseminatorStage must
decide if enough Disseminatables were
acknowledged to consider the dissemination complete (i.e. effective).
If not, the DisseminatorStage may re-send unacknowledged
or NACK'd
Disseminatables to the
extra members of the dissemination set or redisseminate
completely. Note that while the
DisseminatorStage normally uses recently-created
dissemination sets, it may reuse old, unexpired sets if necessary.
USAGE
To prepare the DisseminatorStage to disseminate
Disseminatables,
dispatch a BucketsToDisseminateEvent
containing the resulting GUID's of all the uniquely
modified VerifiableBlocks,
the V-GUID (i.e. version GUID), and the A-GUID of the object.
The DisseminatorStage will then verify that it has an
unexpired dissemination set associated with the A-GUID.
If not, the DisseminatorStage contacts a
SetCreator requesting a new
dissemination set (i.e. RequestDisseminationSetMsg).
When a RequestDisseminationSetResponseMsg is received the
DisseminatorStage updates its state associated
with the A-GUID.
To actually disseminate, dispatch a
DisseminateFragsReq. The
DisseminatorStage will then dispatch a
DisseminateFragMsg to each member of the
dissemination set. The process is done when
enough DisseminateFragAckMsg are received to consider
the dissemination effective.
Finally, the DissemintorStage will dispatch a
DisseminateFragsResp signaling that the
Disseminatables have been
successfully disseminated.
INITIALIZATION PARAMETERS
- node_id
NodeId of the local server where this stage
is running.
- StorageServer
- Willingness for local server to serve as a Storage Server
(true or false).
- CompareMessages
- Flag
GenerateFragsStage to store original
message to compare to after block has been reconstructed.
For debugging only set to true; otherwise, false.
- AlarmTimeout
- Period to timeout (in milliseconds)
- Version:
- $Id: DisseminatorStage.java,v 1.37 2004/05/13 20:13:06 hweather Exp $
- Author:
- Hakim Weatherspoon
- See Also:
SetCreatorStage,
GenerateFragsStage,
GenerateChkptStage,
DisseminateFragMsg,
DisseminateFragAckMsg,
DisseminateFragsReq,
DisseminateFragsResp,
Disseminatable,
Fragment,
VerifiableBlock,
DataObject,
Btree.InteriorNode,
DataObject.DataBlock
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DisseminatorStage
public DisseminatorStage()
handleEvent
public void handleEvent(QueueElementIF item)
throws EventHandlerException
- Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException
handleEvents
public void handleEvents(QueueElementIF[] items)
throws EventHandlerException
- Specified by:
handleEvents in interface EventHandlerIF
EventHandlerException
init
public void init(ConfigDataIF config)
throws Exception
- Specified by:
init in interface EventHandlerIF
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy in interface EventHandlerIF
Exception
profileSize
public int profileSize()
- Specified by:
profileSize in interface ProfilableIF