public abstract class AbstractHATransactionService extends AbstractTransactionService implements HATXSGlue
ITransactionService
.AbstractTransactionService.Options, AbstractTransactionService.TxState
ERR_NO_SUCH, ERR_NOT_ACTIVE, ERR_READ_ONLY, ERR_SERVICE_NOT_AVAIL, lock, log, txDeactivate
Constructor and Description |
---|
AbstractHATransactionService(Properties properties) |
Modifier and Type | Method and Description |
---|---|
abstract Callable<IHANotifyReleaseTimeResponse> |
newGatherMinimumVisibleCommitTimeTask(HAGlue leader,
UUID serviceId,
IHAGatherReleaseTimeRequest req)
Factory for the Gather task that will be executed by the follower.
|
abstract void |
runWithBarrierLock(Runnable r)
Used to make a serviceJoin() MUTEX with the consensus protocol.
|
void |
setReleaseTime(long newReleaseTime)
Sets the new release time.
|
abstract IHANotifyReleaseTimeResponse |
updateReleaseTimeConsensus(long newCommitCounter,
long newCommitTime,
UUID[] joinedServiceIds,
long timeout,
TimeUnit units)
Coordinate the update of the releaseTime on each service that is
joined with the met quorum.
|
abort, abortAllTx, abortImpl, activateTx, assertOpen, assignTransactionIdentifier, commit, commitImpl, deactivateTx, destroy, findCommitTime, findNextCommitTime, findUnusedTimestamp, getAbortCount, getActiveCount, getCommitCount, getCounters, getEarliestActiveTx, getEffectiveReleaseTimeForHA, getLastCommitTime, getMinReleaseAge, getProperties, getReadOnlyActiveCount, getReadsOnTime, getReadWriteActiveCount, getReleaseTime, getRunState, getServiceIface, getStartCount, getTxState, isOpen, isReleaseTimeConsensusProtocol, newTx, nextTimestamp, notifyCommit, setRunState, shutdown, shutdownNow, start, updateReleaseTime, updateReleaseTimeForBareCommit
clearLoggingContext, getFederation, getHostname, getServiceName, getServiceUUID, setServiceUUID, setupLoggingContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
gatherMinimumVisibleCommitTime, notifyEarliestCommitTime
getHostname, getServiceName, getServiceUUID
public AbstractHATransactionService(Properties properties)
public abstract Callable<IHANotifyReleaseTimeResponse> newGatherMinimumVisibleCommitTimeTask(HAGlue leader, UUID serviceId, IHAGatherReleaseTimeRequest req)
leader
- The proxy for the quorum leader (the service that made this
request). This is used to RMI back to the leader and therefore
MUST be non- null
.serviceId
- The UUID
of this service. This is required as part of
the RMI back to the leader (so the leader knows which services
responded) and therefore MUST be non-null
.req
- The request.public abstract IHANotifyReleaseTimeResponse updateReleaseTimeConsensus(long newCommitCounter, long newCommitTime, UUID[] joinedServiceIds, long timeout, TimeUnit units) throws IOException, TimeoutException, InterruptedException, Exception
newCommitCounter
- The commit counter that will be assigned to the new commit
point.newCommitTime
- The commit time that will be assigned to the new commit point.joinedServiceIds
- The services that are joined with the met quorum as of an
atomic decision point in AbstractJournal#commitNow()
.timeout
- The timeout for the release time consensus protocol.units
- The units for that timeout.IOException
TimeoutException
InterruptedException
Exception
public abstract void runWithBarrierLock(Runnable r)
public void setReleaseTime(long newReleaseTime)
Note: For a joined service in HA (the leader or a follower), the release
time is set by the consensus protocol. Otherwise it is automatically
maintained by AbstractTransactionService.updateReleaseTime(long, TxState)
and
AbstractTransactionService.updateReleaseTimeForBareCommit(long)
.
Overridden to expose this method so it may be invoked when a follower joins an existing quorum to set the consensus release time of the quorum leader of the newly joined follower. This prevents the follower from permitting new transaction starts against a commit point which has been recycled by the quorum leader.
setReleaseTime
in class AbstractTransactionService
newReleaseTime
- The new value.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.