public class LockingTransaction
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
LockingTransaction.AbortException |
(package private) static class |
LockingTransaction.CFn |
static class |
LockingTransaction.Info |
(package private) static class |
LockingTransaction.Notify |
(package private) static class |
LockingTransaction.RetryEx |
Modifier and Type | Field and Description |
---|---|
(package private) java.util.ArrayList<Agent.Action> |
actions |
static long |
BARGE_WAIT_NANOS |
(package private) static int |
COMMITTED |
(package private) static int |
COMMITTING |
(package private) java.util.TreeMap<Ref,java.util.ArrayList<LockingTransaction.CFn>> |
commutes |
(package private) java.util.HashSet<Ref> |
ensures |
(package private) LockingTransaction.Info |
info |
(package private) static int |
KILLED |
private static java.util.concurrent.atomic.AtomicLong |
lastPoint |
static int |
LOCK_WAIT_MSECS |
(package private) long |
readPoint |
(package private) static int |
RETRY |
static int |
RETRY_LIMIT |
(package private) LockingTransaction.RetryEx |
retryex |
(package private) static int |
RUNNING |
(package private) java.util.HashSet<Ref> |
sets |
(package private) long |
startPoint |
(package private) long |
startTime |
(package private) static java.lang.ThreadLocal<LockingTransaction> |
transaction |
(package private) java.util.HashMap<Ref,java.lang.Object> |
vals |
Constructor and Description |
---|
LockingTransaction() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
abort() |
private boolean |
barge(LockingTransaction.Info refinfo) |
private boolean |
bargeTimeElapsed() |
private java.lang.Object |
blockAndBail(LockingTransaction.Info refinfo) |
(package private) java.lang.Object |
doCommute(Ref ref,
IFn fn,
ISeq args) |
(package private) void |
doEnsure(Ref ref) |
(package private) java.lang.Object |
doGet(Ref ref) |
(package private) java.lang.Object |
doSet(Ref ref,
java.lang.Object val) |
void |
enqueue(Agent.Action action) |
(package private) long |
getCommitPoint() |
(package private) static LockingTransaction |
getEx() |
(package private) void |
getReadPoint() |
(package private) static LockingTransaction |
getRunning() |
static boolean |
isRunning() |
(package private) java.lang.Object |
lock(Ref ref) |
private void |
releaseIfEnsured(Ref ref) |
(package private) java.lang.Object |
run(java.util.concurrent.Callable fn) |
static java.lang.Object |
runInTransaction(java.util.concurrent.Callable fn) |
(package private) void |
stop(int status) |
(package private) void |
tryWriteLock(Ref ref) |
public static final int RETRY_LIMIT
public static final int LOCK_WAIT_MSECS
public static final long BARGE_WAIT_NANOS
static final int RUNNING
static final int COMMITTING
static final int RETRY
static final int KILLED
static final int COMMITTED
static final java.lang.ThreadLocal<LockingTransaction> transaction
private static final java.util.concurrent.atomic.AtomicLong lastPoint
LockingTransaction.Info info
long readPoint
long startPoint
long startTime
final LockingTransaction.RetryEx retryex
final java.util.ArrayList<Agent.Action> actions
final java.util.HashMap<Ref,java.lang.Object> vals
final java.util.HashSet<Ref> sets
final java.util.TreeMap<Ref,java.util.ArrayList<LockingTransaction.CFn>> commutes
final java.util.HashSet<Ref> ensures
void getReadPoint()
long getCommitPoint()
void stop(int status)
void tryWriteLock(Ref ref)
java.lang.Object lock(Ref ref)
private java.lang.Object blockAndBail(LockingTransaction.Info refinfo)
private void releaseIfEnsured(Ref ref)
void abort() throws LockingTransaction.AbortException
private boolean bargeTimeElapsed()
private boolean barge(LockingTransaction.Info refinfo)
static LockingTransaction getEx()
public static boolean isRunning()
static LockingTransaction getRunning()
public static java.lang.Object runInTransaction(java.util.concurrent.Callable fn) throws java.lang.Exception
java.lang.Exception
java.lang.Object run(java.util.concurrent.Callable fn) throws java.lang.Exception
java.lang.Exception
public void enqueue(Agent.Action action)
java.lang.Object doGet(Ref ref)
java.lang.Object doSet(Ref ref, java.lang.Object val)
void doEnsure(Ref ref)