org.apache.accumulo.fate
public class AgeOffStore<T> extends Object implements TStore<T>
| Modifier and Type | Class and Description |
|---|---|
static interface |
AgeOffStore.TimeSource |
TStore.TStatus| Constructor and Description |
|---|
AgeOffStore(TStore<T> store,
long ageOffTime) |
AgeOffStore(TStore<T> store,
long ageOffTime,
AgeOffStore.TimeSource timeSource) |
| Modifier and Type | Method and Description |
|---|---|
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
|
public AgeOffStore(TStore<T> store, long ageOffTime, AgeOffStore.TimeSource timeSource)
public void ageOff()
public long create()
TStorepublic long reserve()
TStorepublic void unreserve(long tid,
long deferTime)
TStorepublic Repo<T> top(long tid)
TStorepublic void push(long tid,
Repo<T> repo)
throws StackOverflowException
TStorepush in interface TStore<T>tid - the transaction idrepo - the operationStackOverflowExceptionpublic void pop(long tid)
TStorepublic TStore.TStatus getStatus(long tid)
TStorepublic void setStatus(long tid,
TStore.TStatus status)
TStorepublic TStore.TStatus waitForStatusChange(long tid, EnumSet<TStore.TStatus> expected)
TStorewaitForStatusChange 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)
TStoreCopyright © 2014 Apache Accumulo Project. All Rights Reserved.