public class HaBroker extends Object implements Broker
| Modifier and Type | Field and Description |
|---|---|
TrackAgent |
trackAgent |
| Constructor and Description |
|---|
HaBroker(HaBrokerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closeClient(org.zstacks.znet.RemotingClient client)
通知Broker可以关闭当前链接(具体是否关闭视实现而定,带有连接池功能,一般不执行物理关闭)
|
org.zstacks.znet.RemotingClient |
getClient(ClientHint hint)
向Broker索取一个链接对象
|
void |
invokeAsync(org.zstacks.znet.Message msg,
org.zstacks.znet.ticket.ResultCallback callback)
请求Broker代理执行一个zbus消息请求,异步消息模式
具体请求算法,由实现确定,单节点时采用不做节点探测失败,多节点时做节点负载均衡和容错
|
org.zstacks.znet.Message |
invokeSync(org.zstacks.znet.Message msg,
int timeout)
请求Broker代理执行一个zbus消息请求,同步消息模式
具体请求算法,由实现确定,单节点时采用不做节点探测失败,多节点时做节点负载均衡和容错
|
void |
onTrackTableUpdated(TrackTable trackTable) |
public TrackAgent trackAgent
public HaBroker(HaBrokerConfig config) throws IOException
IOExceptionpublic void onTrackTableUpdated(TrackTable trackTable)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void invokeAsync(org.zstacks.znet.Message msg,
org.zstacks.znet.ticket.ResultCallback callback)
throws IOException
BrokerinvokeAsync in interface BrokerIOExceptionpublic org.zstacks.znet.Message invokeSync(org.zstacks.znet.Message msg,
int timeout)
throws IOException
BrokerinvokeSync in interface BrokerIOExceptionpublic org.zstacks.znet.RemotingClient getClient(ClientHint hint) throws IOException
BrokergetClient in interface BrokerIOExceptionpublic void closeClient(org.zstacks.znet.RemotingClient client)
throws IOException
BrokercloseClient in interface BrokerIOExceptionCopyright © 2015. All rights reserved.