|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.accumulo.fate.ReadOnlyStore<T>
public class ReadOnlyStore<T>
This store decorates a TStore to make sure it can not be modified. Unlike relying directly on the ReadOnlyTStore interface, this class will not allow subsequent users to cast back to a mutable TStore successfully.
| Nested Class Summary | |
|---|---|
protected static class |
ReadOnlyStore.ReadOnlyRepoWrapper<X>
Decorates a Repo to make sure it is treated as a ReadOnlyRepo. |
| Nested classes/interfaces inherited from interface org.apache.accumulo.fate.ReadOnlyTStore |
|---|
ReadOnlyTStore.TStatus |
| Constructor Summary | |
|---|---|
ReadOnlyStore(TStore<T> store)
|
|
| Method Summary | |
|---|---|
Serializable |
getProperty(long tid,
String prop)
Retrieve a transaction-specific property. |
ReadOnlyTStore.TStatus |
getStatus(long tid)
Get the state of a given transaction. |
List<Long> |
list()
list all transaction ids in store. |
long |
reserve()
Reserve a transaction that is IN_PROGRESS or FAILED_IN_PROGRESS. |
void |
reserve(long tid)
Reserve the specific tid. |
ReadOnlyRepo<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. |
ReadOnlyTStore.TStatus |
waitForStatusChange(long tid,
EnumSet<ReadOnlyTStore.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 ReadOnlyStore(TStore<T> store)
store - may not be null| Method Detail |
|---|
public long reserve()
ReadOnlyTStore
reserve in interface ReadOnlyTStore<T>public void reserve(long tid)
ReadOnlyTStore
reserve in interface ReadOnlyTStore<T>
public void unreserve(long tid,
long deferTime)
ReadOnlyTStore
unreserve in interface ReadOnlyTStore<T>tid - transaction id, previously reserved.deferTime - time in millis to keep this transaction out of the pool used in the reserve method. must be non-negative.public ReadOnlyRepo<T> top(long tid)
ReadOnlyTStore
top in interface ReadOnlyTStore<T>tid - transaction id, previously reserved.
public ReadOnlyTStore.TStatus getStatus(long tid)
ReadOnlyTStore
getStatus in interface ReadOnlyTStore<T>tid - transaction id, previously reserved.
public ReadOnlyTStore.TStatus waitForStatusChange(long tid,
EnumSet<ReadOnlyTStore.TStatus> expected)
ReadOnlyTStore
waitForStatusChange in interface ReadOnlyTStore<T>tid - transaction id, need not have been reserved.expected - a set of possible statuses we are interested in being notified about. may not be null.
public Serializable getProperty(long tid,
String prop)
ReadOnlyTStore
getProperty in interface ReadOnlyTStore<T>tid - transaction id, previously reserved.prop - name of property to retrieve.public List<Long> list()
ReadOnlyTStore
list in interface ReadOnlyTStore<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||