public class ClusterTimeMeasureTicket extends ClusterTicketAdaptor implements ClusterTimeMeasure
| 构造器和说明 |
|---|
ClusterTimeMeasureTicket() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterJoin()
状态同步完成后调用,成功加入集群的通知。
|
void |
approach(ClusterToolKit toolKit)
通知进场(连接各种Channel、ClusterInvoker、RPCProxy)
|
void |
beforeJoin()
进场之前通知,通常用于锁住集群的当前模块,使当前节点的该模块进场时,其他节点的对应模块不会发生状态改变
|
void |
catchUpWith(ClusterNode node)
进场成功,跟随某个节点的状态(通常使用进场时注册的通信组件)
如果是第一台机器,则不会调用这个方法
|
long |
getCurrentTime(java.lang.String nodeId)
得到当前节点的时间
|
static ClusterTimeMeasureTicket |
getInstance() |
RPCTargetSwitcher |
getSwitcher() |
void |
onLeft()
离场时监听
|
public static ClusterTimeMeasureTicket getInstance()
public RPCTargetSwitcher getSwitcher()
public void beforeJoin()
ClusterTicketbeforeJoin 在接口中 ClusterTicketpublic void approach(ClusterToolKit toolKit)
ClusterTicketapproach 在接口中 ClusterTicketpublic void catchUpWith(ClusterNode node)
ClusterTicketcatchUpWith 在接口中 ClusterTicketpublic void afterJoin()
ClusterTicketafterJoin 在接口中 ClusterTicketpublic void onLeft()
ClusterTicketonLeft 在接口中 ClusterTicketpublic long getCurrentTime(java.lang.String nodeId)
ClusterTimeMeasuregetCurrentTime 在接口中 ClusterTimeMeasure