public interface HAPipelineGlue extends Remote
Remote
interface supporting the write replication pipeline. The
quorum leader accepts writes from the application layer. The writes are
formatted onto low-level cache blocks. Those cache blocks are replicated from
the quorum leader to the quorum followers along the pipeline.QuorumPipeline
Modifier and Type | Method and Description |
---|---|
IHALogRootBlocksResponse |
getHALogRootBlocksForWriteSet(IHALogRootBlocksRequest msg)
Request the root blocks for the HA Log for the specified commit point.
|
IHAWriteSetStateResponse |
getHAWriteSetState(IHAWriteSetStateRequest req)
Request metadata about the current write set from the quorum leader.
|
InetSocketAddress |
getWritePipelineAddr()
Return the address at which this service will listen for write pipeline
messages sent from the upstream service.
|
Future<Void> |
moveToEndOfPipeline()
Instruct the service to move to the end of the write pipeline.
|
Future<Void> |
receiveAndReplicate(IHASyncRequest req,
IHASendState snd,
IHAWriteMessage msg)
Accept metadata describing an NIO buffer transfer along the write
pipeline.
|
Future<IHAPipelineResetResponse> |
resetPipeline(IHAPipelineResetRequest req)
Reset the pipeline (blocking).
|
Future<Void> |
sendHALogForWriteSet(IHALogRequest msg)
The recipient will send the
WriteCache blocks for the specified
write set on the write pipeline. |
Future<IHASendStoreResponse> |
sendHAStore(IHARebuildRequest msg)
Send the raw blocks for the requested backing store across the write
pipeline.
|
InetSocketAddress getWritePipelineAddr() throws IOException
IOException
Future<Void> moveToEndOfPipeline() throws IOException
IOException
Future<IHAPipelineResetResponse> resetPipeline(IHAPipelineResetRequest req) throws IOException
HAReceiveService
(including the inner HASendService
). The
next message and payload relayed from the leader will cause new socket
connections to be established.msg
- The request.Future
for the operation on the remote service.IOException
Future<Void> receiveAndReplicate(IHASyncRequest req, IHASendState snd, IHAWriteMessage msg) throws IOException
req
- A request for an HALog (optional). This is only non-null when
historical WriteCache
blocks are being replayed down
the write pipeline in order to synchronize a service.snd
- Metadata about the state of the sender and potentially the
routing of the payload along the write replication pipeline.msg
- The metadata.Future
which will become available once the buffer
transfer is complete.IOException
IHAWriteSetStateResponse getHAWriteSetState(IHAWriteSetStateRequest req) throws IOException
req
- The request.IOException
IHALogRootBlocksResponse getHALogRootBlocksForWriteSet(IHALogRootBlocksRequest msg) throws IOException
msg
- The request (specifies the desired HA Log by the commit
counter of the closing root block).IOException
Future<Void> sendHALogForWriteSet(IHALogRequest msg) throws IOException
WriteCache
blocks for the specified
write set on the write pipeline. These WriteCache
blocks will be
visible to ALL services in the write pipeline. It is important that all
services ignore WriteCache
blocks that are not in
sequence for the current write set unless they have explicitly requested
an HALog using this method.
Note: The WriteCache
blocks are sent on the write pipeline.
Therefore, a service MUST NOT request the write set from a service that
is downstream from it in the write pipeline. It is always safe to request
the data from the leader.
Note: The HAWriteMessage
includes a quorum token. When historical
WriteCache
blocks are being replicated in response to this
method, the will be replicated using the quorum token that was in effect
for that write set. Implementations MUST NOT perform asserts on the
quorum token until after they have determined that the message is for the
current write set.
Note: DO NOT use a ThickFuture
for the returned Future
.
That will defeat the ability of the requester to cancel the
Future
.
req
- A request for an HALog.Future
that may be used to cancel the remote process
sending the data through the write pipeline.IOException
Future<IHASendStoreResponse> sendHAStore(IHARebuildRequest msg) throws IOException
Note: This method supports disaster recovery of a service from a met quorum. This procedure can only be used when a met quorum exists.
Note: DO NOT use a ThickFuture
for the returned Future
.
That will defeat the ability of the requester to cancel the
Future
.
req
- A request to replicate a backing store.Future
that may be used to cancel the remote process
sending the data through the write pipeline. The Future
will report the current root block in effect as of the moment
when the sendHAStore
operation was completed.IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.