S
- the message type to sendR
- the message type to receivepublic class SnapshotUploader<S,R> extends Object implements io.grpc.stub.StreamObserver<R>, io.grpc.stub.ClientResponseObserver<S,R>
Modifier and Type | Method and Description |
---|---|
void |
beforeStart(io.grpc.stub.ClientCallStreamObserver<S> requestStream) |
static SnapshotUploader<UploadSnapshotPRequest,UploadSnapshotPResponse> |
forFollower(org.apache.ratis.statemachine.impl.SimpleStateMachineStorage storage,
org.apache.ratis.statemachine.SnapshotInfo snapshot)
Builds a stream for follower to upload a snapshot.
|
static SnapshotUploader<DownloadSnapshotPResponse,DownloadSnapshotPRequest> |
forLeader(org.apache.ratis.statemachine.impl.SimpleStateMachineStorage storage,
org.apache.ratis.statemachine.SnapshotInfo snapshot,
io.grpc.stub.StreamObserver<DownloadSnapshotPResponse> stream)
Builds a stream for leader to upload a snapshot.
|
CompletableFuture<org.apache.ratis.statemachine.SnapshotInfo> |
getCompletionFuture() |
void |
onCompleted() |
void |
onError(Throwable t) |
void |
onNext(R value) |
public static SnapshotUploader<DownloadSnapshotPResponse,DownloadSnapshotPRequest> forLeader(org.apache.ratis.statemachine.impl.SimpleStateMachineStorage storage, org.apache.ratis.statemachine.SnapshotInfo snapshot, io.grpc.stub.StreamObserver<DownloadSnapshotPResponse> stream)
storage
- the snapshot storagesnapshot
- the snapshot to uploadstream
- the download streampublic static SnapshotUploader<UploadSnapshotPRequest,UploadSnapshotPResponse> forFollower(org.apache.ratis.statemachine.impl.SimpleStateMachineStorage storage, org.apache.ratis.statemachine.SnapshotInfo snapshot)
storage
- the snapshot storagesnapshot
- the snapshot to uploadpublic void onError(Throwable t)
onError
in interface io.grpc.stub.StreamObserver<R>
public void onCompleted()
onCompleted
in interface io.grpc.stub.StreamObserver<R>
public CompletableFuture<org.apache.ratis.statemachine.SnapshotInfo> getCompletionFuture()
SnapshotReplicationManager
Copyright © 2023. All Rights Reserved.