public interface Broker extends Closeable
| Modifier and Type | Method and Description |
|---|---|
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 req,
int timeout)
请求Broker代理执行一个zbus消息请求,同步消息模式
具体请求算法,由实现确定,单节点时采用不做节点探测失败,多节点时做节点负载均衡和容错
|
org.zstacks.znet.RemotingClient getClient(ClientHint hint) throws IOException
hint - IOExceptionvoid closeClient(org.zstacks.znet.RemotingClient client)
throws IOException
client - IOExceptionvoid invokeAsync(org.zstacks.znet.Message msg,
org.zstacks.znet.ticket.ResultCallback callback)
throws IOException
msg - callback - IOExceptionorg.zstacks.znet.Message invokeSync(org.zstacks.znet.Message req,
int timeout)
throws IOException
req - timeout - IOExceptionCopyright © 2015. All rights reserved.