/** * On construction, adds the size of this call to the running count of outstanding call sizes. * Presumption is that we are put on a queue while we wait on an executor to run us. During this * time we occupy heap. */ // The constructor is shutdown so only RpcServer in this class can make one of these. CallRunner(final RpcServerInterface rpcServer, final RpcCall call) { this.call = call; this.rpcServer = rpcServer; // Add size of the call to queue size. if (call != null && rpcServer != null) { this.rpcServer.addCallSize(call.getSize()); } }
} finally { if (!sucessful) { this.rpcServer.addCallSize(call.getSize() * -1);
RpcServer.CurCall.set(null); if (resultPair != null) { this.rpcServer.addCallSize(call.getSize() * -1); sucessful = true; } finally { if (!sucessful) { this.rpcServer.addCallSize(call.getSize() * -1);
/** * On construction, adds the size of this call to the running count of outstanding call sizes. * Presumption is that we are put on a queue while we wait on an executor to run us. During this * time we occupy heap. */ // The constructor is shutdown so only RpcServer in this class can make one of these. CallRunner(final RpcServerInterface rpcServer, final Call call) { this.call = call; this.rpcServer = rpcServer; // Add size of the call to queue size. this.rpcServer.addCallSize(call.getSize()); }
this.rpcServer.addCallSize(call.getSize() * -1); sucessful = true; } finally { if (!sucessful) { this.rpcServer.addCallSize(call.getSize() * -1);