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

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

Best Java code snippets using org.apache.catalina.tribes.transport.nio.NioReceiver.getTaskPool (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.nioNioReceivergetTaskPool

Popular methods of NioReceiver

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ImageIO (javax.imageio)
  • Top plugins for Android Studio
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