public ServerToClientFunctionResultSender(ChunkedMessage msg, int messageType, ServerConnection sc, Function function, ExecuteFunctionOperationContext authzContext) { this.msg = msg; this.msg.setVersion(sc.getClientVersion()); this.messageType = messageType; this.sc = sc; this.fn = function; this.authContext = authzContext; this.isSelector = sc.getAcceptor().isSelector(); if(this.isSelector){ this.commBuffer = msg.getCommBuffer(); } }
if (isSelector()) { Runnable r = new Runnable() { public void run() {
if (isSelector()) { Runnable r = new Runnable() { public void run() {
if (isSelector()) { ByteBuffer bb = ByteBuffer.allocateDirect(1); final SocketChannel sc = s.getChannel(); incClientServerCnxCount(); if (isSelector()) { serverConn.registerWithSelector(); } else {
public ServerToClientFunctionResultSender(ChunkedMessage msg, int messageType, ServerConnection sc, Function function, ExecuteFunctionOperationContext authzContext) { this.msg = msg; this.msg.setVersion(sc.getClientVersion()); this.messageType = messageType; this.sc = sc; this.fn = function; this.authContext = authzContext; this.logger = sc.getLogger(); this.isSelector = sc.getAcceptor().isSelector(); if(this.isSelector){ this.commBuffer = msg.getCommBuffer(); } }
if (isSelector()) { this.hsTimer.cancel(); if (this.tmpSel != null) {
theSocket.setSendBufferSize(socketBufferSize); theSocket.setReceiveBufferSize(socketBufferSize); if (getAcceptor().isSelector()) {
if (isSelector()) { this.hsTimer.cancel(); if (this.tmpSel != null) {
HashSet tmp_hs = null; SystemTimer tmp_timer = null; if (isSelector()) { final long tilt = System.currentTimeMillis() + 120 * 1000; if (isSelector()) { if (sc.useSSL()) { throw new IllegalArgumentException(LocalizedStrings.AcceptorImpl_SELECTOR_THREAD_POOLING_CAN_NOT_BE_USED_WITH_CLIENTSERVER_SSL_THE_SELECTOR_CAN_BE_DISABLED_BY_SETTING_MAXTHREADS0.toLocalizedString()); if (isSelector()) { tmp_pool = new PooledExecutorWithDMStats(new LinkedBlockingQueue(), this.maxThreads,
private void initStreams(Socket s, int socketBufferSize, MessageStats msgStats) { try { theSocket = s; theSocket.setSendBufferSize(socketBufferSize); theSocket.setReceiveBufferSize(socketBufferSize); if (getAcceptor().isSelector()) { // set it on the message to null. This causes Message // to fetch it from a thread local. That way we only need // one per thread in our selector thread pool instead of // one per connection. commBuffer = null; } else { commBuffer = allocateCommBuffer(socketBufferSize); } requestMsg.setComms(theSocket, commBuffer, msgStats); replyMsg.setComms(theSocket, commBuffer, msgStats); responseMsg.setComms(theSocket, commBuffer, msgStats); chunkedResponseMsg.setComms(theSocket, commBuffer, msgStats); queryResponseMsg.setComms(theSocket, commBuffer, msgStats); executeFunctionResponseMsg.setComms(theSocket, commBuffer, msgStats); registerInterestResponseMsg.setComms(theSocket, commBuffer, msgStats); errorMsg.setComms(theSocket, commBuffer, msgStats); } catch(RuntimeException re) { throw re; } catch(Exception e) { logger.severe(e); } }
HashSet tmp_hs = null; SystemTimer tmp_timer = null; if (isSelector()) { if (isSelector()) { if (this.socketCreator.useSSL()) { throw new IllegalArgumentException(LocalizedStrings.AcceptorImpl_SELECTOR_THREAD_POOLING_CAN_NOT_BE_USED_WITH_CLIENTSERVER_SSL_THE_SELECTOR_CAN_BE_DISABLED_BY_SETTING_MAXTHREADS0.toLocalizedString()); if (isSelector()) { tmp_pool = new PooledExecutorWithDMStats(new LinkedBlockingQueue(), this.maxThreads,
if (isSelector()) { ByteBuffer bb = ByteBuffer.allocateDirect(1); final SocketChannel sc = s.getChannel(); incClientServerCnxCount(); if (isSelector()) { serverConn.registerWithSelector(); } else {
public void run() { setOwner(); if (getAcceptor().isSelector()) { boolean finishedMsg = false; try {
public void run() { setOwner(); if (getAcceptor().isSelector()) { boolean finishedMsg = false; try {