ostore.archive
Class RequestFragQueryState

java.lang.Object
  |
  +--ostore.archive.RequestFragQueryState
All Implemented Interfaces:
DDQueryState, QuickSerializable

public class RequestFragQueryState
extends Object
implements DDQueryState

RequestFragQueryState is a wrapper class for the state passed along with the RequestFragQuery DDQuery used in a RequestFragMsg DDLocateMsg used to find a Fragments that can be reconstructed into a block.

USAGE

To receive Fragments, dispatch a RequestFragMsg that contains a guid of the block to be recoalesced.

Version:
$Id: RequestFragQueryState.java,v 1.17 2004/05/13 20:13:06 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
RequestorStage, RecoalesceBlkStage, RequestFragMsg, RequestFragResponseMsg, DDLocateMsg, DDQueryState, DDQuery

Constructor Summary
RequestFragQueryState(InputBuffer buffer)
          Constructs a RequestFragQueryState from its serialized form.
RequestFragQueryState(int reqCardinality)
          Creates a new RequestFragQueryState.
 
Method Summary
 boolean add(Object o)
          Adds the specified backpointer to this set if it is not already present.
 boolean contains(Object o)
          Tests whether the set already contains the specified backpointer.
 int getCardinality()
          getCardinality returns the number of back pointers pursued for a fragment or block.
 int getRequestedCardinality()
          getRequestedCardinality returns the requested number of back pointers pursued for a fragment.
 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

RequestFragQueryState

public RequestFragQueryState(int reqCardinality)
Creates a new RequestFragQueryState.


RequestFragQueryState

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

Parameters:
buffer - serialized form of object.
Method Detail

serialize

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

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

add

public boolean add(Object o)
Adds the specified backpointer to this set if it is not already present.

Parameters:
o - - backpointer to be added to this set.
Returns:
true if the set did not already contain the specified back ptr.

contains

public boolean contains(Object o)
Tests whether the set already contains the specified backpointer.

Parameters:
o - - backpointer to be tested against set.
Returns:
true if the set already contains the specified back ptr.

getCardinality

public int getCardinality()
getCardinality returns the number of back pointers pursued for a fragment or block.

Returns:
the number of back pointers pursued for a fragment or block.

getRequestedCardinality

public int getRequestedCardinality()
getRequestedCardinality returns the requested number of back pointers pursued for a fragment.

Returns:
the requested number of back pointers pursued for a fragment.

toString

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

Overrides:
toString in class Object