public class RaftJournalServiceClient extends AbstractMasterClient
AbstractClient.RpcCallable<V>
mAlwaysEnableTLS, mChannel, mClosed, mConnected, mContext, mServerAddress, mServiceVersion, mVersionService
Constructor and Description |
---|
RaftJournalServiceClient(MasterSelectionPolicy selectionPolicy,
java.util.function.Supplier<RetryPolicy> retryPolicySupplier)
Create a client that talks to a specific master.
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterConnect()
This method is called after the connection is made to the remote.
|
protected void |
beforeConnect()
This method is called before the connection is connected.
|
protected ServiceType |
getRemoteServiceType() |
protected String |
getServiceName() |
protected long |
getServiceVersion() |
Iterator<SnapshotData> |
requestLatestSnapshotData(SnapshotMetadata request)
Receive snapshot data from specified follower.
|
SnapshotMetadata |
requestLatestSnapshotInfo() |
afterDisconnect, getConfAddress, queryGrpcServerAddress
beforeDisconnect, checkVersion, close, connect, connectWithRuntimeException, createChannel, disconnect, getRemoteHostName, getRemoteServiceVersion, getRemoteSockAddress, isClosed, isConnected, retryRPC, retryRPC
public RaftJournalServiceClient(MasterSelectionPolicy selectionPolicy, java.util.function.Supplier<RetryPolicy> retryPolicySupplier)
selectionPolicy
- specifies which master is targetedretryPolicySupplier
- the retry policy to use when connecting to another masterprotected ServiceType getRemoteServiceType()
getRemoteServiceType
in class AbstractClient
protected String getServiceName()
getServiceName
in class AbstractClient
protected long getServiceVersion()
getServiceVersion
in class AbstractClient
protected void beforeConnect()
AbstractClient
beforeConnect
in class AbstractMasterClient
protected void afterConnect()
AbstractClient
afterConnect
in class AbstractClient
public SnapshotMetadata requestLatestSnapshotInfo()
SnapshotMetadata
from specified masterpublic Iterator<SnapshotData> requestLatestSnapshotData(SnapshotMetadata request)
request
- the request detailing which file to downloadCopyright © 2023. All Rights Reserved.