|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfabric.store.ReadHistory
public class ReadHistory
This class is responsible for keeping a log of the recent reads, for checking commit conflicts. Each read has a time associated with it, and the log only keeps the most recent entries.
Field Summary | |
---|---|
static long |
DEFAULT_LENGTH
the default length of a read history, in milliseconds |
Constructor Summary | |
---|---|
ReadHistory()
|
|
ReadHistory(long length,
long beginning)
create a new read history with duration length |
Method Summary | |
---|---|
boolean |
check(long oid,
long time)
determine whether preparing an update to an object at a given time would cause a conflict with any reads that have occurred since that time. |
void |
record(PrepareRequest req)
record a prepare request in the history |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_LENGTH
Constructor Detail |
---|
public ReadHistory()
public ReadHistory(long length, long beginning)
length
- the duration, in milliseconds, of entries in the historybeginning
- a time such that no reads have happened since that time (typically now)Method Detail |
---|
public void record(PrepareRequest req)
public boolean check(long oid, long time)
oid
- the object to checktime
- the commit time
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |