Codota Logo
NioDatagramWorkerPool.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.jboss.netty.channel.socket.nio.NioDatagramWorkerPool
constructor

Best Java code snippets using org.jboss.netty.channel.socket.nio.NioDatagramWorkerPool.<init> (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: io.netty/netty

/**
 * Creates a new instance.
 * <p>
 * Please note that the {@link InternetProtocolFamily} of the channel will be platform (and possibly
 * configuration) dependent and therefore unspecified.
 * Use {@link #NioDatagramChannelFactory(Executor, int, InternetProtocolFamily)} if unsure.
 *
 * @param workerExecutor
 *            the {@link Executor} which will execute the I/O worker threads
 * @param workerCount
 *            the maximum number of I/O worker threads
 */
public NioDatagramChannelFactory(final Executor workerExecutor, final int workerCount) {
  this(new NioDatagramWorkerPool(workerExecutor, workerCount));
}
origin: io.netty/netty

/**
 * Creates a new instance.
 *
 * @param workerExecutor
 *        the {@link Executor} which will execute the I/O worker threads
 * @param workerCount
 *        the maximum number of I/O worker threads
 * @param family
 *        the {@link InternetProtocolFamily} to use. This should be used for UDP multicast.
 *        <strong>Be aware that this option is only considered when running on java7+</strong>
 */
public NioDatagramChannelFactory(final Executor workerExecutor,
    final int workerCount, InternetProtocolFamily family) {
  this(new NioDatagramWorkerPool(workerExecutor, workerCount), family);
}
origin: io.netty/netty

/**
 * Create a new {@link NioDatagramChannelFactory} with a {@link Executors#newCachedThreadPool()}.
 *
 * See {@link #NioDatagramChannelFactory(Executor)}
 */
public NioDatagramChannelFactory(InternetProtocolFamily family) {
  workerPool = new NioDatagramWorkerPool(Executors.newCachedThreadPool(), SelectorUtil.DEFAULT_IO_THREADS);
  this.family = family;
  sink = new NioDatagramPipelineSink(workerPool);
  releasePool = true;
}
origin: org.apache.camel/camel-netty

protected void setupUDPCommunication() throws Exception {
  if (datagramChannelFactory == null) {
    int count = configuration.getWorkerCount() > 0 ? configuration.getWorkerCount() : NettyHelper.DEFAULT_IO_THREADS;
    workerPool = new NioDatagramWorkerPool(Executors.newCachedThreadPool(), count);
    datagramChannelFactory = new NioDatagramChannelFactory(workerPool);
  }
}
origin: k3po/k3po

/**
 * Returns a {@link ClientBootstrap} instance for the named transport.
 */
@Override
public synchronized ClientBootstrap newClientBootstrap() throws Exception {
  if (clientChannelFactory == null) {
    Executor workerExecutor = executorServiceFactory.newExecutorService("worker.client");
    NioDatagramWorkerPool workerPool = new NioDatagramWorkerPool(workerExecutor, 1);
    clientChannelFactory = new NioDatagramChannelFactory(workerPool);
    // unshared
    channelFactories.add(clientChannelFactory);
  }
  return new UdpClientBootstrap(clientChannelFactory, timer);
}
origin: k3po/k3po

/**
 * Returns a {@link ServerBootstrap} instance for the named transport.
 */
@Override
public synchronized ServerBootstrap newServerBootstrap() throws Exception {
  if (serverChannelFactory == null) {
    Executor workerExecutor = executorServiceFactory.newExecutorService("worker.server");
    NioDatagramWorkerPool workerPool = new NioDatagramWorkerPool(workerExecutor, 1);
    serverChannelFactory = new UdpServerChannelFactory(workerPool, timer);
    // unshared
    channelFactories.add(serverChannelFactory);
  }
  return new ServerBootstrap(serverChannelFactory);
}
origin: org.apache.camel/camel-netty

protected void startServerBootstrap() throws Exception {
  workerPool = new NioDatagramWorkerPool(Executors.newCachedThreadPool(), count);
org.jboss.netty.channel.socket.nioNioDatagramWorkerPool<init>

Popular methods of NioDatagramWorkerPool

  • releaseExternalResources
  • shutdown

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now