@SPI public class BoltRaftRpcFactory extends Object implements RaftRpcFactory
RaftRpcFactory.ConfigHelper<T>DEFAULT| Constructor and Description |
|---|
BoltRaftRpcFactory() |
| Modifier and Type | Method and Description |
|---|---|
RpcClient |
createRpcClient(RaftRpcFactory.ConfigHelper<RpcClient> helper)
Creates a raft RPC client.
|
RpcServer |
createRpcServer(Endpoint endpoint,
RaftRpcFactory.ConfigHelper<RpcServer> helper)
Creates a raft RPC server.
|
void |
ensurePipeline()
Ensure RPC framework supports pipeline.
|
void |
registerProtobufSerializer(String className,
Object... args)
Register serializer with class name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateRpcClient, createRpcServer, defaultJRaftClientConfigHelper, defaultJRaftServerConfigHelper, getRpcResponseFactory, isReplicatorPipelineEnabledpublic void registerProtobufSerializer(String className, Object... args)
RaftRpcFactoryregisterProtobufSerializer in interface RaftRpcFactoryclassName - class nameargs - extended parameters, different implementers may need different parameters,
the order of parameters need a conventionpublic RpcClient createRpcClient(RaftRpcFactory.ConfigHelper<RpcClient> helper)
RaftRpcFactorycreateRpcClient in interface RaftRpcFactoryhelper - config helper for rpc client implpublic RpcServer createRpcServer(Endpoint endpoint, RaftRpcFactory.ConfigHelper<RpcServer> helper)
RaftRpcFactorycreateRpcServer in interface RaftRpcFactoryendpoint - server address to bindhelper - config helper for rpc server implpublic void ensurePipeline()
RaftRpcFactoryensurePipeline in interface RaftRpcFactoryCopyright © 2024. All rights reserved.