public abstract class AbstractLocalTransactionManager extends Object implements ILocalTransactionManager
Journal
or for an IDataService
in an
IBigdataFederation
.IServiceShutdown.Options
Constructor and Description |
---|
AbstractLocalTransactionManager() |
Modifier and Type | Method and Description |
---|---|
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.
|
ITxState[] |
getActiveTx()
Return a snapshot of the active transactions.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTransactionService
public ITxState[] getActiveTx()
ILocalTransactionManager
getActiveTx
in interface ILocalTransactionManager
public void activateTx(Tx localState) throws IllegalStateException
localState
- The transaction.IllegalStateException
protected void deactivateTx(Tx localState) throws IllegalStateException
localState
- The transaction.IllegalStateException
public Tx getTx(long tx)
getTx
in interface ILocalTransactionManager
tx
- The transaction identifier.null
if the start time is not mapped to either an
active or prepared transaction.public boolean isOpen()
IServiceShutdown
true
iff the service is running.isOpen
in interface IServiceShutdown
public void shutdown()
IServiceShutdown
IServiceShutdown.Options.SHUTDOWN_TIMEOUT
. Implementations SHOULD be
synchronized. If the service is aleady shutdown, then
this method should be a NOP.shutdown
in interface IServiceShutdown
public void shutdownNow()
IServiceShutdown
shutdownNow
in interface IServiceShutdown
public long nextTimestamp()
ITimestampService
has not been discovered yet.nextTimestamp
in interface ILocalTransactionManager
ITransactionService
.ITimestampService.nextTimestamp()
public void notifyCommit(long commitTime)
ILocalTransactionManager
notifyCommit
in interface ILocalTransactionManager
commitTime
- The commit time.ITransactionService.notifyCommit(long)
public CounterSet getCounters()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.