Tabnine Logo
NioReceiver.getExecutor
Code IndexAdd Tabnine to your IDE (free)

How to use
getExecutor
method
in
org.apache.catalina.tribes.transport.nio.NioReceiver

Best Java code snippets using org.apache.catalina.tribes.transport.nio.NioReceiver.getExecutor (Showing top 4 results out of 315)

origin: org.apache.catalina.springsource/com.springsource.org.apache.catalina.tribes.springsource

/**
 * Sample data handler method for a channel with data ready to read.
 * @param key A SelectionKey object associated with a channel
 *  determined by the selector to be ready for reading.  If the
 *  channel returns an EOF condition, it is closed here, which
 *  automatically invalidates the associated key.  The selector
 *  will then de-register the channel on the next select call.
 */
protected void readDataFromSocket(SelectionKey key) throws Exception {
  NioReplicationTask task = (NioReplicationTask) getTaskPool().getRxTask();
  if (task == null) {
    // No threads/tasks available, do nothing, the selection
    // loop will keep calling this method until a
    // thread becomes available, the thread pool itself has a waiting mechanism
    // so we will not wait here.
    if (log.isDebugEnabled()) log.debug("No TcpReplicationThread available");
  } else {
    // invoking this wakes up the worker thread then returns
    //add task to thread pool
    task.serviceChannel(key);
    getExecutor().execute(task);
  }
}
origin: codefollower/Tomcat-Research

/**
 * Sample data handler method for a channel with data ready to read.
 * @param key A SelectionKey object associated with a channel
 *  determined by the selector to be ready for reading.  If the
 *  channel returns an EOF condition, it is closed here, which
 *  automatically invalidates the associated key.  The selector
 *  will then de-register the channel on the next select call.
 */
protected void readDataFromSocket(SelectionKey key) throws Exception {
  NioReplicationTask task = (NioReplicationTask) getTaskPool().getRxTask();
  if (task == null) {
    // No threads/tasks available, do nothing, the selection
    // loop will keep calling this method until a
    // thread becomes available, the thread pool itself has a waiting mechanism
    // so we will not wait here.
    if (log.isDebugEnabled()) log.debug("No TcpReplicationThread available");
  } else {
    // invoking this wakes up the worker thread then returns
    //add task to thread pool
    task.serviceChannel(key);
    getExecutor().execute(task);
  }
}
origin: org.apache.geronimo.ext.tomcat/tribes

/**
 * Sample data handler method for a channel with data ready to read.
 * @param key A SelectionKey object associated with a channel
 *  determined by the selector to be ready for reading.  If the
 *  channel returns an EOF condition, it is closed here, which
 *  automatically invalidates the associated key.  The selector
 *  will then de-register the channel on the next select call.
 */
protected void readDataFromSocket(SelectionKey key) throws Exception {
  NioReplicationTask task = (NioReplicationTask) getTaskPool().getRxTask();
  if (task == null) {
    // No threads/tasks available, do nothing, the selection
    // loop will keep calling this method until a
    // thread becomes available, the thread pool itself has a waiting mechanism
    // so we will not wait here.
    if (log.isDebugEnabled()) log.debug("No TcpReplicationThread available");
  } else {
    // invoking this wakes up the worker thread then returns
    //add task to thread pool
    task.serviceChannel(key);
    getExecutor().execute(task);
  }
}
origin: org.apache.tomcat/tomcat-tribes

/**
 * Sample data handler method for a channel with data ready to read.
 * @param key A SelectionKey object associated with a channel
 *  determined by the selector to be ready for reading.  If the
 *  channel returns an EOF condition, it is closed here, which
 *  automatically invalidates the associated key.  The selector
 *  will then de-register the channel on the next select call.
 * @throws Exception IO error with channel
 */
protected void readDataFromSocket(SelectionKey key) throws Exception {
  NioReplicationTask task = (NioReplicationTask) getTaskPool().getRxTask();
  if (task == null) {
    // No threads/tasks available, do nothing, the selection
    // loop will keep calling this method until a
    // thread becomes available, the thread pool itself has a waiting mechanism
    // so we will not wait here.
    if (log.isDebugEnabled()) log.debug("No TcpReplicationThread available");
  } else {
    // invoking this wakes up the worker thread then returns
    //add task to thread pool
    task.serviceChannel(key);
    getExecutor().execute(task);
  }
}
org.apache.catalina.tribes.transport.nioNioReceivergetExecutor

Popular methods of NioReceiver

  • addEvent
  • bind
  • cancelledKey
  • doListen
  • events
  • getAutoBind
  • getBind
  • getMaxThreads
  • getMinThreads
  • getOoBInline
  • getRxBufSize
  • getSelectorTimeout
  • getRxBufSize,
  • getSelectorTimeout,
  • getSoKeepAlive,
  • getSoLingerOn,
  • getSoLingerTime,
  • getSoReuseAddress,
  • getSoTrafficClass,
  • getTaskPool,
  • getTcpNoDelay

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now