本文整理汇总了Java中org.apache.zookeeper.server.quorum.LearnerHandler类的典型用法代码示例。如果您正苦于以下问题:Java LearnerHandler类的具体用法?Java LearnerHandler怎么用?Java LearnerHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LearnerHandler类属于org.apache.zookeeper.server.quorum包,在下文中一共展示了LearnerHandler类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: followerInfo
import org.apache.zookeeper.server.quorum.LearnerHandler; //导入依赖的package包/类
public String followerInfo() {
StringBuilder sb = new StringBuilder();
for (LearnerHandler handler : leader.getLearners()) {
sb.append(handler.toString()).append("\n");
}
return sb.toString();
}
示例2: logQuorumPacket
import org.apache.zookeeper.server.quorum.LearnerHandler; //导入依赖的package包/类
static public void logQuorumPacket(Logger log, long mask,
char direction, QuorumPacket qp)
{
if (isTraceEnabled(log, mask)) {
logTraceMessage(log, mask, direction +
" " + LearnerHandler.packetToString(qp));
}
}
示例3: followerInfo
import org.apache.zookeeper.server.quorum.LearnerHandler; //导入依赖的package包/类
public String followerInfo() {
StringBuilder sb = new StringBuilder();
for (LearnerHandler handler : leader.learners) {
sb.append(handler.toString()).append("\n");
}
return sb.toString();
}