public class RotatingTransactionalState extends Object
A map from txid to a value. Automatically deletes txids that have been committed.
Modifier and Type | Class and Description |
---|---|
static interface |
RotatingTransactionalState.StateInitializer |
Constructor and Description |
---|
RotatingTransactionalState(TransactionalState state,
String subdir) |
RotatingTransactionalState(TransactionalState state,
String subdir,
boolean strictOrder) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupBefore(BigInteger txid) |
Object |
getLastState() |
Object |
getState(BigInteger txid,
RotatingTransactionalState.StateInitializer init) |
Object |
getStateOrCreate(BigInteger txid,
RotatingTransactionalState.StateInitializer init)
Returns null if it was created, the value otherwise.
|
boolean |
hasCache(BigInteger txid) |
void |
overrideState(BigInteger txid,
Object state) |
void |
removeState(BigInteger txid) |
public RotatingTransactionalState(TransactionalState state, String subdir, boolean strictOrder)
public RotatingTransactionalState(TransactionalState state, String subdir)
public Object getLastState()
public void overrideState(BigInteger txid, Object state)
public void removeState(BigInteger txid)
public Object getState(BigInteger txid, RotatingTransactionalState.StateInitializer init)
public boolean hasCache(BigInteger txid)
public Object getStateOrCreate(BigInteger txid, RotatingTransactionalState.StateInitializer init)
Returns null if it was created, the value otherwise.
public void cleanupBefore(BigInteger txid)
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.