fabric.lang
Interface Statistics

All Known Implementing Classes:
DefaultStatistics

public interface Statistics

A Statistics encapsulates the history of read and write requests for an object. It is maintained at the Store and is used to generate promise durations for the object.

Statistics objects are created by the Object.createStatistics() method. They are only heuristic information and may be discarded and recreated at any time.


Method Summary
 void commitRead()
          Called whenever a transaction that read the object is committed
 void commitWrote()
          Called whenever a transaction that wrote the object is committed
 int generatePromise()
          Determine the duration of a promise to issue.
 

Method Detail

commitRead

void commitRead()
Called whenever a transaction that read the object is committed


commitWrote

void commitWrote()
Called whenever a transaction that wrote the object is committed


generatePromise

int generatePromise()
Determine the duration of a promise to issue. While a promise is outstanding, the store will not permit updates to the object to commit. This allows read-only transactions to proceed without contacting the store.

Returns:
the duration, in milliseconds, of the promise.