public final class RmNettyRemotingClient extends AbstractNettyRemotingClient
basketMap, enableClientBatchSendRequest, mergeLock, mergeMsgMapfutures, idGenerator, isSending, lock, messageExecutor, nowMills, processorTable, rpcHooks, timerExecutor| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
static RmNettyRemotingClient |
getInstance()
Gets instance.
|
static RmNettyRemotingClient |
getInstance(String applicationId,
String transactionServiceGroup)
Gets instance.
|
String |
getMergedResourceKeys() |
protected Function<String,NettyPoolKey> |
getPoolKeyFunction()
Get pool key function.
|
long |
getRpcRequestTimeout()
get Rpc Request Timeout
|
protected String |
getTransactionServiceGroup()
Get transaction service group.
|
void |
init() |
boolean |
isEnableClientBatchSendRequest()
Whether to enable batch sending of requests, hand over to subclass implementation.
|
void |
onRegisterMsgFail(String serverAddress,
io.netty.channel.Channel channel,
Object response,
AbstractMessage requestMessage)
On register msg fail.
|
void |
onRegisterMsgSuccess(String serverAddress,
io.netty.channel.Channel channel,
Object response,
AbstractMessage requestMessage)
On register msg success.
|
void |
registerResource(String resourceGroupId,
String resourceId)
Register new db key.
|
void |
sendRegisterMessage(String serverAddress,
io.netty.channel.Channel channel,
String resourceId) |
void |
setApplicationId(String applicationId)
Sets application id.
|
void |
setResourceManager(ResourceManager resourceManager)
Sets resource manager.
|
void |
setTransactionServiceGroup(String transactionServiceGroup)
Sets transaction service group.
|
destroyChannel, doSelect, getClientChannelManager, getTransactionMessageHandler, getXid, loadBalance, registerProcessor, sendAsyncRequest, sendAsyncResponse, sendSyncRequest, sendSyncRequest, setTransactionMessageHandlerbuildRequestMessage, buildResponseMessage, destroyChannel, doAfterRpcHooks, doBeforeRpcHooks, getAddressFromChannel, getAddressFromContext, getFutures, getGroup, getNextMessageId, processMessage, sendAsync, sendSync, setGrouppublic void init()
init in class AbstractNettyRemotingClientpublic static RmNettyRemotingClient getInstance(String applicationId, String transactionServiceGroup)
applicationId - the application idtransactionServiceGroup - the transaction service grouppublic static RmNettyRemotingClient getInstance()
public void setApplicationId(String applicationId)
applicationId - the application idpublic void setTransactionServiceGroup(String transactionServiceGroup)
transactionServiceGroup - the transaction service grouppublic void setResourceManager(ResourceManager resourceManager)
resourceManager - the resource managerpublic void onRegisterMsgSuccess(String serverAddress, io.netty.channel.Channel channel, Object response, AbstractMessage requestMessage)
RemotingClientserverAddress - the server addresschannel - the channelresponse - the responserequestMessage - the request messagepublic void onRegisterMsgFail(String serverAddress, io.netty.channel.Channel channel, Object response, AbstractMessage requestMessage)
RemotingClientserverAddress - the server addresschannel - the channelresponse - the responserequestMessage - the request messagepublic void registerResource(String resourceGroupId, String resourceId)
resourceGroupId - the resource group idresourceId - the db keypublic void sendRegisterMessage(String serverAddress, io.netty.channel.Channel channel, String resourceId)
public String getMergedResourceKeys()
public void destroy()
destroy in interface Disposabledestroy in class AbstractNettyRemotingClientprotected Function<String,NettyPoolKey> getPoolKeyFunction()
AbstractNettyRemotingClientgetPoolKeyFunction in class AbstractNettyRemotingClientprotected String getTransactionServiceGroup()
AbstractNettyRemotingClientgetTransactionServiceGroup in class AbstractNettyRemotingClientpublic boolean isEnableClientBatchSendRequest()
AbstractNettyRemotingClientisEnableClientBatchSendRequest in class AbstractNettyRemotingClientpublic long getRpcRequestTimeout()
AbstractNettyRemotingClientgetRpcRequestTimeout in class AbstractNettyRemotingClientCopyright © 2023 Seata. All rights reserved.