|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.tapestry.patchwork.PatchworkModel.Delta
A PatchworkModel.Delta
object contains a diff
of the sufficient statistics for a PatchworkModel
.
Constructor Summary | |
PatchworkModel.Delta()
Construct a new Delta . |
|
PatchworkModel.Delta(InputBuffer buffer)
Construct a Delta from its
QuickSerializable form. |
|
PatchworkModel.Delta(QSVector toBeRemoved)
Construct a new Delta . |
Method Summary | |
Object |
clone()
Clone this delta |
Matrix |
getMatrix()
Returns a Matrix containing all the delta information. |
QSVector |
getToBeRemoved()
Get the list of SecureHash s whose statistics should be
removed from the Model>/code> |
double |
lookupDouble(SecureHash peer,
int type)
Returns the most recently probed value from delta update with type type for the specified node id peer . |
void |
serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable |
void |
storeDeltas(SecureHash id,
Array deltas)
Store an Array representing the deltas
for the node id . |
Model.Delta |
sum(Model.Delta other)
Specified by ostore.oil.Model.Delta interface |
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 |
public PatchworkModel.Delta(InputBuffer buffer) throws QSException
Delta
from its
QuickSerializable
form.public PatchworkModel.Delta()
Delta
.public PatchworkModel.Delta(QSVector toBeRemoved)
Delta
.toBeRemoved
- a QSVector
of SecureHash
s
that should be removed from the
Model
.Method Detail |
public void storeDeltas(SecureHash id, Array deltas)
Array
representing the deltas
for the node id
. The deltas are doubles
indexed by QSInt
types in PatchworkModel
.
Overwrites any existing deltas for that id.id
- the node to record deltas fordeltas
- the deltas themselvespublic double lookupDouble(SecureHash peer, int type)
type
for the specified node id peer
.
Returns Double.NaN if a value is not recorded.peer
- the node for which to lookup the statistictype
- the type of statistic to collect (i.e.
LATENCY, BANDWIDTH, etc)InvalidTypeException
- if an invalid type is passed inpublic Matrix getMatrix()
Matrix
containing all the delta information.
Arrays
of deltas are indexed by SecureHash
while deltas within those Arrays
are indexed by
QSInts
.Matrix
of deltaspublic QSVector getToBeRemoved()
SecureHash
s whose statistics should be
removed from the Model>/code>
public Model.Delta sum(Model.Delta other)
sum
in interface Model.Delta
ostore.oil.Model.Delta
other
- The other Delta
.Delta
, constructed such that applying
it to a Model
produces an equivalent
Model
to that produced by adding first
this
, then other
.IllegalArgumentException
- if other
is not
an instance of a compatible Delta
subclass.public void serialize(OutputBuffer buffer)
serialize
in interface QuickSerializable
ostore.util.QuickSerializable
buffer
- the output buffer to add the object topublic Object clone() throws CloneNotSupportedException
clone
in class Object
public String toString()
Delta
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |