ostore.archive
Class FakeRequestorDisseminatorStage
java.lang.Object
|
+--ostore.archive.FakeRequestorDisseminatorStage
- All Implemented Interfaces:
- EventHandlerIF, ProfilableIF
- public class FakeRequestorDisseminatorStage
- extends Object
- implements EventHandlerIF, ProfilableIF
The FakeRequestorDisseminatorStage
fakes disseminating
and requesting Disseminatables
to the wide-area.
The FakeRequestorDisseminatorStage
handle requests to
disseminate the Disseminatables
of a
block
or reconstruct a
block
from
Disseminatables
,
DisseminateFragsReq
or
ReconstructBlkReq
, respectively.
USAGE
In order to disseminate Disseminatables
of a
block
, the
FakeRequestorDisseminatorStage
listens for the
BucketsToDisseminateEvent
that
specifies the GUID's of the
DisseminatableBuckets
associated with the
Disseminatables
that need to be disseminated.
To disseminate Disseminatables
,
the FakeRequestorDisseminatorStage
listens for the
DisseminateFragsReq
event. After receiving
the DisseminateFragsReq
event, the
FakeRequestorDisseminatorStage
loses random
Disseminatables
to simulate wide-area dissemination.
That is, random Disseminatables
are erased from
the DisseminatableBucket
on the local machine.
To reconstruct a block
the FakeRequestorDisseminatorStage
listens for the
ReconstructBlkReq
event. After receiving
the ReconstructBlkReq
, the
FakeRequestorDisseminatorStage
dispatch's a
RecoalesceBlkReq
to request that the
block
be reconstructed from
Disseminatables
contained in the associated
DisseminatableBucket
.
INITIALIZATION PARAMETERS
- CompareMessages
- Determines if
DisseminatableBuckets
store the original
object
to after encoding to
compare to when the object
has
been decoded from Disseminatables
(set to true
or false
).
- Version:
- $Id: FakeRequestorDisseminatorStage.java,v 1.20 2004/05/13 20:13:06 hweather Exp $
- Author:
- Hakim Weatherspoon
- See Also:
BucketsToDisseminateEvent
,
DisseminateFragsReq
,
DisseminateFragsResp
,
ReconstructBlkReq
,
RecoalesceBlkReq
,
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 |
FakeRequestorDisseminatorStage
public FakeRequestorDisseminatorStage()
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