ostore.network.patchwork
Class PatchworkTable.Delta

java.lang.Object
  |
  +--ostore.network.patchwork.PatchworkTable.Delta
All Implemented Interfaces:
QuickSerializable
Enclosing class:
PatchworkTable

public static class PatchworkTable.Delta
extends Object
implements QuickSerializable

A PatchworkTable.Delta object contains a diff of the sufficient statistics for a PatchworkTable.

Version:
$Id: PatchworkTable.java,v 1.4 2003/03/24 00:13:13 geels Exp $
Author:
Jeremy Stribling

Constructor Summary
PatchworkTable.Delta(InputBuffer buffer)
          Construct a Delta from its QuickSerializable form.
PatchworkTable.Delta(QSVector toBeRemoved)
          Construct a new Delta.
 
Method Summary
 void addDelta(PatchworkStats.StatDelta d)
           
 Object clone()
          Clone this delta
 QSVector getDeltas()
          Returns a QSVector containing all the delta information.
 NodeId[] getNodesChanged(byte type)
          Get the list of NodeIds that have a change in a certain type of statistics (i.e.
 QSVector getToBeRemoved()
          Get the list of NodeIds whose statistics should be removed from the Table
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 String toString()
          Returns a String representation of this Delta
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatchworkTable.Delta

public PatchworkTable.Delta(InputBuffer buffer)
                     throws QSException
Construct a Delta from its QuickSerializable form.

PatchworkTable.Delta

public PatchworkTable.Delta(QSVector toBeRemoved)
Construct a new Delta.
Parameters:
toBeRemoved - a QSVector of NodeIds that should be removed from the Table.
Method Detail

addDelta

public void addDelta(PatchworkStats.StatDelta d)

getDeltas

public QSVector getDeltas()
Returns a QSVector containing all the delta information.
Returns:
the QSVector of deltas

getToBeRemoved

public QSVector getToBeRemoved()
Get the list of NodeIds whose statistics should be removed from the Table

getNodesChanged

public NodeId[] getNodesChanged(byte type)
Get the list of NodeIds that have a change in a certain type of statistics (i.e. Patch.TYPE_LATENCY)

serialize

public void serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable
Specified by:
serialize in interface QuickSerializable
Following copied from interface: ostore.util.QuickSerializable
Parameters:
buffer - the output buffer to add the object to

clone

public Object clone()
             throws CloneNotSupportedException
Clone this delta
Overrides:
clone in class Object

toString

public String toString()
Returns a String representation of this Delta
Overrides:
toString in class Object