ostore.archive.dissemination
Class DisseminateFragMsg

java.lang.Object
  |
  +--dd.api.DDRouteMsg
        |
        +--ostore.archive.dissemination.DisseminateFragMsg
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class DisseminateFragMsg
extends DDRouteMsg

The DisseminateFragMsg is a request of type DDRouteMsg dispatched by the DisseminatorStage to request that a StorageServer store the given Disseminatable.

USAGE

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.

Version:
$Id: DisseminateFragMsg.java,v 1.19 2004/05/13 20:13:06 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
DisseminateFragAckMsg, DisseminatorStage, ArchivalStorageStage, DisseminateFragsReq, DisseminateFragsResp, Disseminatable, Fragment, DDRouteMsg

Nested Class Summary
static class DisseminateFragMsg.Local
          A simple class to store DisseminateFragMsg requests to send to another local stage.
 
Field Summary
 SecureHash aguid
          aguid is the guid that matches the object that the disseminatables belong.
 SortedMap disseminatables
          A guid->disseminatable map containing the disseminatables that make up the DisseminateFragMsg.
 int index
          index of disseminatables.
 SecureHash vguid
          vguid is the guid that matches the version that the disseminatables belong.
 
Fields inherited from class dd.api.DDRouteMsg
dd_intermediate_upcall, hopCount, inbound, one_hop, peer, recursive_route, TTL
 
Constructor Summary
DisseminateFragMsg(InputBuffer buffer)
          Constructs a DisseminateFragMsg from its serialized form.
DisseminateFragMsg(SecureHash dest, SecureHash aguid, SecureHash vguid, int index, Map disseminatables, boolean recursive, boolean dd_intermediate_upcall, boolean one_hop)
          Construct according to the given fields.
 
Method Summary
 SecureHash getAguid()
          getAguid returns the aguid that matches the object that the dissemintables belong.
 Map getDisseminatables()
          getDisseminatables returns the guid->disseminatable map containing the disseminatables that make up an archived object version.
 int getIndex()
          getIndex returns the index of disseminatable being acknowledged.
 SecureHash getVguid()
          getVguid returns the vguid that matches the version that the dissemintables belong.
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerialize
 String toString()
          Specified by java.lang.Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

aguid

public SecureHash aguid
aguid is the guid that matches the object that the disseminatables belong.


vguid

public SecureHash vguid
vguid is the guid that matches the version that the disseminatables belong.


index

public int index
index of disseminatables.


disseminatables

public SortedMap disseminatables
A guid->disseminatable map containing the disseminatables that make up the DisseminateFragMsg.

The map is kept sorted, to ensure a deterministic serialization.

Constructor Detail

DisseminateFragMsg

public DisseminateFragMsg(SecureHash dest,
                          SecureHash aguid,
                          SecureHash vguid,
                          int index,
                          Map disseminatables,
                          boolean recursive,
                          boolean dd_intermediate_upcall,
                          boolean one_hop)
Construct according to the given fields.


DisseminateFragMsg

public DisseminateFragMsg(InputBuffer buffer)
                   throws QSException
Constructs a DisseminateFragMsg from its serialized form.

Parameters:
buffer - serialized form of object.
Method Detail

getAguid

public final SecureHash getAguid()
getAguid returns the aguid that matches the object that the dissemintables belong.

Returns:
the aguid matching disseminatables.

getVguid

public final SecureHash getVguid()
getVguid returns the vguid that matches the version that the dissemintables belong.

Returns:
the vguid matching disseminatables.

getIndex

public final int getIndex()
getIndex returns the index of disseminatable being acknowledged.

Returns:
the index of the disseminatable being acknowledged.

getDisseminatables

public Map getDisseminatables()
getDisseminatables returns the guid->disseminatable map containing the disseminatables that make up an archived object version.


serialize

public void serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerialize

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class DDRouteMsg
Parameters:
buffer - the output buffer to add the object to

toString

public String toString()
Specified by java.lang.Object

Overrides:
toString in class Object