protected void incrOutstandingRequests(RequestHeader h) { if (h.getXid() >= 0) { synchronized (this) { outstandingRequests++; } synchronized (this.factory) { // check throttling if (zkServer.getInProcess() > outstandingLimit) { if (LOG.isDebugEnabled()) { LOG.debug("Throttling recv " + zkServer.getInProcess()); } disableRecv(); // following lines should not be needed since we are // already reading // } else { // enableRecv(); } } } }
disableRecv(); if (connReq.getSessionId() != 0) { long clientSessionId = connReq.getSessionId();
disableRecv(); } else { if (LOG.isDebugEnabled()) { LOG.debug("Throttling recv " + zk.getInProcess()); disableRecv();