tapestry.api
Class TapestryRepairObjReq

java.lang.Object
  |
  +--tapestry.api.TapestryRouteMsg
        |
        +--tapestry.api.TapestryRepairObjReq
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class TapestryRepairObjReq
extends TapestryRouteMsg

TapestryRepairObjReq is a msg sent from a root tapestry node to a server requesting that an object be repaired. The TapestryRepairObjReq msg is generated when the low_watermark (i.e. threshold) for the number of ptrs specified in the TapestryThresholdTag is reached; that is, a TapestryRepairObjReq is triggered from the number of remaining ptrs.

The root can send the TapestryRepairObjReq to any number of the remaining server nodes (e.g. only one, half, all servers, etc). Any coordination required to repair the object will have to be done between the servers.

Finally, the TapestryRepairObjReq has to be followed by a TapestryRepairObjResp. The TapestryRepairObjResp is simply an acknowledgment of the repair request. That is, it is not an acknowledgment that the object has been repaired yet. The root node will know the object is repaired when the number of ptrs increase. The TapestryRepairObjResp is provided as a clean way for the root node to know an object is being repaired without having to send the TapestryRepairObjReq to all the remaining servers and without having to wait for the ptrs to increase.

Version:
$Id: TapestryRepairObjReq.java,v 1.1.1.1 2004/03/26 19:57:05 hweather Exp $
Author:
Hakim Weatherspoon

Field Summary
 
Fields inherited from class tapestry.api.TapestryRouteMsg
hopCount, inbound, peer, qos, TTL
 
Constructor Summary
TapestryRepairObjReq(InputBuffer buffer)
          Constructs a TapestryRepairObjReq from its serialized form.
TapestryRepairObjReq(SecureHash node, SecureHash objguid, TapestryThresholdTag tag, QSTreeSet remaining, QSTreeSet dead)
          Constucts a TapestryRepairObjReq from specified parameters.
 
Method Summary
 QSTreeSet getDead()
          dead returns the set of dead servers that use to contain the object that needs to be repaired.
 SecureHash getObjguid()
          getObjguid returns the identifier of object that needs to be repaired.
 QSTreeSet getRemaining()
          remaining returns the set of remaining servers that contain the object that needs to be repaired.
 TapestryThresholdTag getTag()
          getTag returns the Tag of the object that needs to be repaired.
 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
 

Constructor Detail

TapestryRepairObjReq

public TapestryRepairObjReq(SecureHash node,
                            SecureHash objguid,
                            TapestryThresholdTag tag,
                            QSTreeSet remaining,
                            QSTreeSet dead)
Constucts a TapestryRepairObjReq from specified parameters.

Parameters:
node - Server that needs to repair object.
objguid - identifier of object that needs to be repaired.
tag - Tag of the object that needs to be repaired.
remaining - set of remaining servers that contain the object that needs to be repaired.
dead - set of dead servers that use to contain the object that needs to be repaired.

TapestryRepairObjReq

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

Parameters:
buffer - serialized form of object.
Method Detail

getObjguid

public SecureHash getObjguid()
getObjguid returns the identifier of object that needs to be repaired.

Returns:
the identifier of object that needs to be repaired.

getTag

public TapestryThresholdTag getTag()
getTag returns the Tag of the object that needs to be repaired.

Returns:
the Tag of the object that needs to be repaired.

getRemaining

public QSTreeSet getRemaining()
remaining returns the set of remaining servers that contain the object that needs to be repaired.

Returns:
the set of remaining servers that contain the object that needs to be repaired.

getDead

public QSTreeSet getDead()
dead returns the set of dead servers that use to contain the object that needs to be repaired.

Returns:
the set of dead servers that use to contain the object that needs to be repaired.

serialize

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

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class TapestryRouteMsg

toString

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

Overrides:
toString in class Object