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
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • 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