|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.accumulo.fate.AgeOffStore<T>
public class AgeOffStore<T>
This store removes Repos, in the store it wraps, that are in a finished or new state for more than a configurable time period. No external time source is used. It starts tracking idle time when its created.
Nested Class Summary | |
---|---|
static interface |
AgeOffStore.TimeSource
|
Nested classes/interfaces inherited from interface org.apache.accumulo.fate.TStore |
---|
TStore.TStatus |
Constructor Summary | |
---|---|
AgeOffStore(TStore<T> store,
long ageOffTime)
|
|
AgeOffStore(TStore<T> store,
long ageOffTime,
AgeOffStore.TimeSource timeSource)
|
Method Summary | |
---|---|
void |
ageOff()
|
long |
create()
Create a new transaction id |
void |
delete(long tid)
Remove the transaction from the store. |
Serializable |
getProperty(long tid,
String prop)
|
TStore.TStatus |
getStatus(long tid)
Get the state of a given transaction. |
List<Long> |
list()
list all transaction ids in store |
void |
pop(long tid)
Remove the last pushed operation from the given transaction. |
void |
push(long tid,
Repo<T> repo)
Update the given transaction with the next operation |
long |
reserve()
Reserve a transaction that is IN_PROGRESS or FAILED_IN_PROGRESS. |
void |
reserve(long tid)
|
void |
setProperty(long tid,
String prop,
Serializable val)
|
void |
setStatus(long tid,
TStore.TStatus status)
Update the state of a given transaction |
Repo<T> |
top(long tid)
Get the current operation for the given transaction id. |
void |
unreserve(long tid,
long deferTime)
Return the given transaction to the store |
TStore.TStatus |
waitForStatusChange(long tid,
EnumSet<TStore.TStatus> expected)
Wait for the satus of a transaction to change |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgeOffStore(TStore<T> store, long ageOffTime, AgeOffStore.TimeSource timeSource)
public AgeOffStore(TStore<T> store, long ageOffTime)
Method Detail |
---|
public void ageOff()
public long create()
TStore
create
in interface TStore<T>
public long reserve()
TStore
reserve
in interface TStore<T>
public void reserve(long tid)
reserve
in interface TStore<T>
public void unreserve(long tid, long deferTime)
TStore
unreserve
in interface TStore<T>
public Repo<T> top(long tid)
TStore
top
in interface TStore<T>
tid
- transaction id
public void push(long tid, Repo<T> repo) throws StackOverflowException
TStore
push
in interface TStore<T>
tid
- the transaction idrepo
- the operation
StackOverflowException
public void pop(long tid)
TStore
pop
in interface TStore<T>
public TStore.TStatus getStatus(long tid)
TStore
getStatus
in interface TStore<T>
tid
- transaction id
public void setStatus(long tid, TStore.TStatus status)
TStore
setStatus
in interface TStore<T>
tid
- transaction idstatus
- execution statuspublic TStore.TStatus waitForStatusChange(long tid, EnumSet<TStore.TStatus> expected)
TStore
waitForStatusChange
in interface TStore<T>
tid
- transaction idpublic void setProperty(long tid, String prop, Serializable val)
setProperty
in interface TStore<T>
public Serializable getProperty(long tid, String prop)
getProperty
in interface TStore<T>
public void delete(long tid)
TStore
delete
in interface TStore<T>
tid
- the transaction idpublic List<Long> list()
TStore
list
in interface TStore<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |