|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.journal.AbstractLocalTransactionManager
public abstract class AbstractLocalTransactionManager
Manages the client side of a transaction either for a standalone
Journal or for an IDataService in an
IBigdataFederation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.bigdata.service.IServiceShutdown |
|---|
IServiceShutdown.Options |
| Field Summary | |
|---|---|
protected static boolean |
DEBUG
True iff the log level is DEBUG or less. |
protected static boolean |
INFO
True iff the log level is INFO or less. |
protected static org.apache.log4j.Logger |
log
Logger. |
| Constructor Summary | |
|---|---|
AbstractLocalTransactionManager()
|
|
| Method Summary | |
|---|---|
void |
activateTx(Tx localState)
Notify the journal that a new transaction is being activated (starting on the journal). |
protected void |
deactivateTx(Tx localState)
Removes the transaction from the local tables. |
CounterSet |
getCounters()
Return interesting statistics about the transaction manager. |
Tx |
getTx(long tx)
Return the local state for a transaction. |
boolean |
isOpen()
Return true iff the service is running. |
long |
nextTimestamp()
Note: The reason for all this retry logic is to work around race conditions during service startup (and possibly during service failover) when the ITimestampService has not been discovered yet. |
void |
notifyCommit(long commitTime)
Notify the global transaction manager that a commit has been performed with the given timestamp (which it assigned) and that it should update its lastCommitTime iff the given commitTime is GT its current lastCommitTime. |
void |
shutdown()
The service will no longer accept new requests, but existing requests will be processed (sychronous). |
void |
shutdownNow()
The service will no longer accept new requests and will make a best effort attempt to terminate all existing requests and return ASAP. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.bigdata.journal.ILocalTransactionManager |
|---|
getTransactionService |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected static final boolean INFO
log level is INFO or less.
protected static final boolean DEBUG
log level is DEBUG or less.
| Constructor Detail |
|---|
public AbstractLocalTransactionManager()
| Method Detail |
|---|
public void activateTx(Tx localState)
throws IllegalStateException
localState - The transaction.
IllegalStateException
protected void deactivateTx(Tx localState)
throws IllegalStateException
localState - The transaction.
IllegalStateExceptionpublic Tx getTx(long tx)
getTx in interface ILocalTransactionManagertx - The transaction identifier.
null if the start time is not mapped to either an
active or prepared transaction.public boolean isOpen()
IServiceShutdowntrue iff the service is running.
isOpen in interface IServiceShutdownpublic void shutdown()
IServiceShutdownIServiceShutdown.Options.SHUTDOWN_TIMEOUT. Implementations SHOULD be
synchronized. If the service is aleady shutdown, then
this method should be a NOP.
shutdown in interface IServiceShutdownpublic void shutdownNow()
IServiceShutdown
shutdownNow in interface IServiceShutdownpublic long nextTimestamp()
ITimestampService has not been discovered yet.
nextTimestamp in interface ILocalTransactionManagerITransactionService.ITimestampService.nextTimestamp()public void notifyCommit(long commitTime)
ILocalTransactionManager
notifyCommit in interface ILocalTransactionManagercommitTime - The commit time.ITransactionService.notifyCommit(long)public CounterSet getCounters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||