|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.outrigger.TxnMonitor
class TxnMonitor
This class provides a driver for monitoring the state of transactions that have blocked progress of other operations recently. It creates tasks that monitor each transaction by intermittently querying the transaction's state. If it finds that the transaction has aborted, it makes sure that the local space aborts the transaction, too, so that operations will cease to be blocked by the transaction.
TxnMonitorTask
,
OutriggerServerImpl.monitor(com.sun.jini.outrigger.QueryWatcher, java.util.Collection)
Nested Class Summary | |
---|---|
private static class |
TxnMonitor.ToMonitor
Each ToMonitor object represents a need to monitor
the given transactions, possibly under a lease. |
Field Summary | |
---|---|
private boolean |
die
Set when we are told to stop |
private static Logger |
logger
Logger for logging transaction related information |
private Thread |
ourThread
The thread running us. |
private LinkedList |
pending
This list is used to contain requests to monitor interfering transactions. |
private OutriggerServerImpl |
space
The space we belong to. |
private TaskManager |
taskManager
The manager for TxnMonitorTask objects. |
private WakeupManager |
wakeupMgr
wakeup manager for TxnMonitorTask s |
Constructor Summary | |
---|---|
TxnMonitor(OutriggerServerImpl space,
Configuration config)
Create a new TxnMonitor. |
Method Summary | |
---|---|
(package private) void |
add(Collection transactions)
Add a set of transactions to be monitored under no
lease. |
(package private) void |
add(QueryWatcher query,
Collection transactions)
Add a set of transactions to be monitored under the
given query. |
void |
destroy()
|
void |
run()
Take pending monitor requests off the queue, creating the required TxnMonitorTask objects and scheduling them. |
(package private) OutriggerServerImpl |
space()
Return the space we're part of. |
private TxnMonitorTask |
taskFor(Txn txn)
Return the monitor task for this transaction, creating it if necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private LinkedList pending
getMatch
request that detected the conflict
doesn't have to wait for all the setup before returning -- it
just puts the data on this list and the TxnMonitor
pulls it off using its own thread.
OutriggerServerImpl.getMatch(com.sun.jini.outrigger.EntryRep, net.jini.core.transaction.Transaction, long, boolean, boolean, com.sun.jini.outrigger.OutriggerServer.QueryCookie)
private final WakeupManager wakeupMgr
TxnMonitorTask
s
private TaskManager taskManager
TxnMonitorTask
objects.
private OutriggerServerImpl space
private Thread ourThread
private boolean die
private static final Logger logger
Constructor Detail |
---|
TxnMonitor(OutriggerServerImpl space, Configuration config) throws ConfigurationException
ConfigurationException
Method Detail |
---|
public void destroy()
OutriggerServerImpl space()
void add(QueryWatcher query, Collection transactions)
transactions
to be monitored under the
given query.
void add(Collection transactions)
transactions
to be monitored under no
lease.
public void run()
TxnMonitorTask
objects and scheduling them.
run
in interface Runnable
private TxnMonitorTask taskFor(Txn txn)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |