|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.arjuna.ats.arjuna.coordinator.TransactionReaper
Class to record transactions with non-zero timeout values, and class to implement a transaction reaper thread which terminates these transactions once their timeout elapses.
Field Summary | |
static long |
defaultCheckPeriod
|
static java.lang.String |
DYNAMIC
|
static java.lang.String |
NORMAL
|
Constructor Summary | |
TransactionReaper(long checkPeriod)
|
Method Summary | |
boolean |
check()
Only check for one at a time to prevent starvation. |
long |
checkingPeriod()
|
static TransactionReaper |
create()
|
static TransactionReaper |
create(long checkPeriod)
Currently we let the reaper thread run at same priority as other threads. |
void |
finalize()
|
int |
getTimeout(java.lang.Object control)
Given a Control, return the associated timeout, or 0 if we do not know about it. |
boolean |
insert(Reapable control,
int timeout)
timeout is given in seconds, but we work in milliseconds. |
long |
numberOfTransactions()
|
boolean |
remove(java.lang.Object control)
|
static long |
transactionLifetime()
|
static TransactionReaper |
transactionReaper()
|
static TransactionReaper |
transactionReaper(boolean createReaper)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NORMAL
public static final java.lang.String DYNAMIC
public static final long defaultCheckPeriod
Constructor Detail |
public TransactionReaper(long checkPeriod)
Method Detail |
public void finalize()
public final long checkingPeriod()
public final boolean check()
public final long numberOfTransactions()
public final boolean insert(Reapable control, int timeout)
public final boolean remove(java.lang.Object control)
public final int getTimeout(java.lang.Object control)
public static TransactionReaper create(long checkPeriod)
public static TransactionReaper create()
public static TransactionReaper transactionReaper()
public static TransactionReaper transactionReaper(boolean createReaper)
public static final long transactionLifetime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |