public interface HAGlue extends HAGlueBase, HAPipelineGlue, HAReadGlue, HACommitGlue, HATXSGlue, IService
Remote
interface for methods supporting high availability for a set
of journals or data services having shared persistent state.Modifier and Type | Method and Description |
---|---|
long |
awaitHAReady(long timeout,
TimeUnit unit)
Await the service being ready to partitipate in an HA quorum.
|
IHANotifyReleaseTimeResponse |
awaitServiceJoin(IHAAwaitServiceJoinRequest req)
A follower uses this message to request that the quorum leader await the
visibility of the zookeeper event in which the service join becomes
visible to the leader.
|
IHADigestResponse |
computeDigest(IHADigestRequest req)
Compute the digest of the entire backing store - THIS METHOD IS
ONLY FOR DIAGNOSTIC PURPOSES.
|
IHALogDigestResponse |
computeHALogDigest(IHALogDigestRequest req)
Compute the digest of the entire HALog file - THIS METHOD IS ONLY
FOR DIAGNOSTIC PURPOSES.
|
IHASnapshotDigestResponse |
computeHASnapshotDigest(IHASnapshotDigestRequest req)
Compute the digest of the entire snapshot file - THIS METHOD IS
ONLY FOR DIAGNOSTIC PURPOSES. This digest is computed for the
compressed data so it may be compared directly with the digest of the
backing store from which the snapshot was obtained.
|
String |
getExtendedRunState()
The extended run state of the service - this embeds more information but
is not designed for progamatic interpretation.
|
HAStatusEnum |
getHAStatus()
A simplified summary of the HA status of the service.
|
int |
getNSSPort()
The port that the NanoSparqlServer is running on.
|
IHARootBlockResponse |
getRootBlock(IHARootBlockRequest msg)
Return the then current root block for the persistence store.
|
RunState |
getRunState()
The
RunState of the service - this does NOT tell you whether the
service is ready to act as a leader or follower. |
Future<Void> |
rebuildFromLeader(IHARemoteRebuildRequest req)
Disaster recovery (REBUILD) of the local database instance from the
leader of a met quorum.
|
<T> Future<T> |
submit(IIndexManagerCallable<T> callable,
boolean asyncFuture)
Run the caller's task on the service.
|
Future<IHASnapshotResponse> |
takeSnapshot(IHASnapshotRequest req)
Request that the service take a snapshot.
|
getServiceId
getHALogRootBlocksForWriteSet, getHAWriteSetState, getWritePipelineAddr, moveToEndOfPipeline, receiveAndReplicate, resetPipeline, sendHALogForWriteSet, sendHAStore
readFromDisk
abort2Phase, commit2Phase, prepare2Phase
gatherMinimumVisibleCommitTime, notifyEarliestCommitTime
destroy, getHostname, getServiceIface, getServiceName, getServiceUUID
long awaitHAReady(long timeout, TimeUnit unit) throws IOException, InterruptedException, TimeoutException, QuorumException, AsynchronousQuorumCloseException
#setQuorumToken(long)
commitCounter:=0
, then the root blocks from the leader have
been installed on the follower.timeout
- The timeout to await this condition.units
- The units for that timeout.IOException
InterruptedException
TimeoutException
QuorumException
AsynchronousQuorumCloseException
IHANotifyReleaseTimeResponse awaitServiceJoin(IHAAwaitServiceJoinRequest req) throws IOException, InterruptedException, TimeoutException
req
- The request.InterruptedException
TimeoutException
- if the timeout is exceeded before the service join becomes
visible to this service.IOException
IHARootBlockResponse getRootBlock(IHARootBlockRequest msg) throws IOException
Note: The initial root blocks are identical, so this may be used to create a new journal in a quorum by replicating the root blocks of the quorum leader.
msg
- The message requesting the then current root block.IOException
int getNSSPort() throws IOException
IOException
RunState getRunState() throws IOException
RunState
of the service - this does NOT tell you whether the
service is ready to act as a leader or follower.IOException
String getExtendedRunState() throws IOException
IOException
HAStatusEnum getHAStatus() throws IOException
HAStatusEnum.Leader
, a
HAStatusEnum.Follower
, or HAStatusEnum.NotReady
. This is
exposed both here (an RMI interface) and by the REST API.IOException
IHADigestResponse computeDigest(IHADigestRequest req) throws IOException, NoSuchAlgorithmException, DigestException
The digest is useless if there are concurrent writes since it can not be meaningfully compared with the digest of another store unless both stores are known to be stable.
IHALogDigestResponse computeHALogDigest(IHALogDigestRequest req) throws IOException, NoSuchAlgorithmException, DigestException
The digest is useless if there are concurrent writes since it can not be meaningfully compared with the digest of another store unless both stores are known to be stable.
FileNotFoundException
- if the HALog for the specified commit point does not exist.IOException
NoSuchAlgorithmException
DigestException
IHASnapshotDigestResponse computeHASnapshotDigest(IHASnapshotDigestRequest req) throws IOException, NoSuchAlgorithmException, DigestException
FileNotFoundException
- if no snapshot exists for that commit point.IOException
NoSuchAlgorithmException
DigestException
Future<IHASnapshotResponse> takeSnapshot(IHASnapshotRequest req) throws IOException
Future
for that request will be returned.req
- The request (optional). When null
, the
Future
for any existing snapshot operation will be
returned but the request WILL NOT schedule a snapshot if none
is running.Future
for the snapshot -or- null
if no
snapshot is running and none will be taken for that request.IOException
Future<Void> rebuildFromLeader(IHARemoteRebuildRequest req) throws IOException
HAStatusEnum#Ready
leader.HAStatusEnum.NotReady
.HAJournalServer
must not be running a RESTORE (we don't
want it to accidentally interrupt a RESTORE that is in progress).Future
of the REBUILD operation -or-
null
if any of the pre-conditions were violated.IOException
<T> Future<T> submit(IIndexManagerCallable<T> callable, boolean asyncFuture) throws IOException
Note: This interface provides direct access to the raw index manager.
Caller's requiring concurrency control should submit an IApiTask
in order to have their task queue for the necessary locks and run on the
appropriate executor service.
callable
- The task to run on the service.asyncFuture
- true
if the task will execute asynchronously
and return a Future
for the computation that may
be used to inspect and/or cancel the computation.
false
if the task will execute synchronously
and return a thick Future
.IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.