ostore.archive.dissemination
Class DisseminateFragAckMsg

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

public class DisseminateFragAckMsg
extends DDMacRouteMsg

The DisseminateFragAckMsg is a response of type DDMacRouteMsg dispatched by a StorageServer to respond to an associated DisseminateFragMsg requesting the storage of a 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: DisseminateFragAckMsg.java,v 1.19 2004/05/13 20:13:06 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
DisseminateFragMsg, DisseminatorStage, ArchivalStorageStage, DisseminateFragsReq, DisseminateFragsResp, Disseminatable, Fragment, DDMacRouteMsg

Nested Class Summary
static class DisseminateFragAckMsg.Local
          A simple class to store DisseminateFragAckMsg requests to send to another local stage.
 
Field Summary
 SortedMap acks
          A guid->ack map containing the ack associated with guid.
 SecureHash aguid
          aguid is the guid that matches the object that was disseminated.
 int index
          index of disseminatable being acknowledged.
 SecureHash vguid
          aguid is the guid that matches the version that was disseminated.
 
Fields inherited from class dd.api.DDRouteMsg
dd_intermediate_upcall, hopCount, inbound, one_hop, peer, recursive_route, TTL
 
Constructor Summary
DisseminateFragAckMsg(InputBuffer buffer)
          Constructs a DisseminateFragAckMsg from its serialized form.
DisseminateFragAckMsg(SecureHash requestorGuid, SecureHash activeGuid, SecureHash versionGuid, int i, Map acknowledgements, boolean recursive, boolean dd_intermediate_upcall, boolean one_hop)
          Construct according to the given fields.
 
Method Summary
 Map getAcks()
          getAcks returns the acks to the DisseminateFragMsg.
 SecureHash getAguid()
          getAguid returns the aguid that matches the object that was disseminated.
 int getIndex()
          getIndex returns the index of disseminatable being acknowledged.
 SecureHash getVguid()
          getVguid returns the vguid that matches the version that was disseminated.
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 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 was disseminated.


vguid

public SecureHash vguid
aguid is the guid that matches the version that was disseminated.


index

public int index
index of disseminatable being acknowledged.


acks

public SortedMap acks
A guid->ack map containing the ack associated with guid. Ack is the acknowledgement of the request to store a disseminatable.

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

Constructor Detail

DisseminateFragAckMsg

public DisseminateFragAckMsg(SecureHash requestorGuid,
                             SecureHash activeGuid,
                             SecureHash versionGuid,
                             int i,
                             Map acknowledgements,
                             boolean recursive,
                             boolean dd_intermediate_upcall,
                             boolean one_hop)
Construct according to the given fields.


DisseminateFragAckMsg

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

Parameters:
buffer - serialized form of object.
Method Detail

getAcks

public final Map getAcks()
getAcks returns the acks to the DisseminateFragMsg.

Returns:
the acks to the DisseminateFragMsg.

getAguid

public final SecureHash getAguid()
getAguid returns the aguid that matches the object that was disseminated.

Returns:
the aguid matching the acks.

getVguid

public final SecureHash getVguid()
getVguid returns the vguid that matches the version that was disseminated.

Returns:
the vguid matching the acks.

getIndex

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

Returns:
the index of the disseminatable being acknowledged.

serialize

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

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