org.apache.zookeeper.server.ZooKeeperServer.submitRequest()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.apache.zookeeper.server.ZooKeeperServer.submitRequest()方法的一些代码示例,展示了ZooKeeperServer.submitRequest()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperServer.submitRequest()方法的具体详情如下:
包路径:org.apache.zookeeper.server.ZooKeeperServer
类名称:ZooKeeperServer
方法名:submitRequest

ZooKeeperServer.submitRequest介绍

暂无

代码示例

代码示例来源:origin: org.apache.zookeeper/zookeeper

private void close(long sessionId) {
  submitRequest(null, sessionId, OpCode.closeSession, 0, null, null);
}

代码示例来源:origin: org.apache.zookeeper/zookeeper

/**
 * @param cnxn
 * @param sessionId
 * @param xid
 * @param bb
 */
private void submitRequest(ServerCnxn cnxn, long sessionId, int type,
    int xid, ByteBuffer bb, List<Id> authInfo) {
  Request si = new Request(cnxn, sessionId, xid, type, bb, authInfo);
  submitRequest(si);
}

代码示例来源:origin: apache/zookeeper

private void close(long sessionId) {
  Request si = new Request(null, sessionId, 0, OpCode.closeSession, null, null);
  setLocalSessionFlag(si);
  submitRequest(si);
}

代码示例来源:origin: org.apache.zookeeper/zookeeper

long createSession(ServerCnxn cnxn, byte passwd[], int timeout) {
  long sessionId = sessionTracker.createSession(timeout);
  Random r = new Random(sessionId ^ superSecret);
  r.nextBytes(passwd);
  ByteBuffer to = ByteBuffer.allocate(4);
  to.putInt(timeout);
  cnxn.setSessionId(sessionId);
  submitRequest(cnxn, sessionId, OpCode.createSession, 0, to, null);
  return sessionId;
}

代码示例来源:origin: apache/zookeeper

long createSession(ServerCnxn cnxn, byte passwd[], int timeout) {
  if (passwd == null) {
    // Possible since it's just deserialized from a packet on the wire.
    passwd = new byte[0];
  }
  long sessionId = sessionTracker.createSession(timeout);
  Random r = new Random(sessionId ^ superSecret);
  r.nextBytes(passwd);
  ByteBuffer to = ByteBuffer.allocate(4);
  to.putInt(timeout);
  cnxn.setSessionId(sessionId);
  Request si = new Request(cnxn, sessionId, 0, OpCode.createSession, to, null);
  setLocalSessionFlag(si);
  submitRequest(si);
  return sessionId;
}

代码示例来源:origin: apache/zookeeper

leader.getActiveServer().submitRequest(request);

代码示例来源:origin: apache/zookeeper

leader.getActiveServer().submitRequest(request);

代码示例来源:origin: apache/zookeeper

submitRequest(si);
return;

代码示例来源:origin: org.apache.zookeeper/zookeeper

h.getType(), incomingBuffer, cnxn.getAuthInfo());
si.setOwner(ServerCnxn.me);
submitRequest(si);

代码示例来源:origin: org.apache.hadoop/zookeeper

private void close(long sessionId) {
  submitRequest(null, sessionId, OpCode.closeSession, 0, null, null);
}

代码示例来源:origin: org.apache.hadoop/zookeeper

/**
 * @param cnxn
 * @param sessionId
 * @param xid
 * @param bb
 */
private void submitRequest(ServerCnxn cnxn, long sessionId, int type,
    int xid, ByteBuffer bb, List<Id> authInfo) {
  Request si = new Request(cnxn, sessionId, xid, type, bb, authInfo);
  submitRequest(si);
}

代码示例来源:origin: org.apache.hadoop/zookeeper

long createSession(ServerCnxn cnxn, byte passwd[], int timeout)
    throws InterruptedException {
  long sessionId = sessionTracker.createSession(timeout);
  Random r = new Random(sessionId ^ superSecret);
  r.nextBytes(passwd);
  ByteBuffer to = ByteBuffer.allocate(4);
  to.putInt(timeout);
  cnxn.setSessionId(sessionId);
  submitRequest(cnxn, sessionId, OpCode.createSession, 0, to, null);
  return sessionId;
}

代码示例来源:origin: org.apache.hadoop/zookeeper

Request si = new Request(this, sessionId, h.getXid(), h.getType(), incomingBuffer, authInfo);
si.setOwner(ServerCnxn.me);
zk.submitRequest(si);

相关文章

ZooKeeperServer类方法