Tabnine Logo
OrderedMemoryAwareThreadPoolExecutor.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor
constructor

Best Java code snippets using org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor.<init> (Showing top 12 results out of 315)

origin: menacher/java-game-server

public synchronized static ExecutionHandler getExecutionHandler()
{
  if(null == EXECUTION_HANDLER){
    EXECUTION_HANDLER = new ExecutionHandler( new OrderedMemoryAwareThreadPoolExecutor(16, 1048576, 1048576));
  }
  return EXECUTION_HANDLER;
}
 
origin: resteasy/Resteasy

public HttpServerPipelineFactory(final RequestDispatcher dispatcher, final String root, final int executorThreadCount, final int maxRequestSize, final boolean isKeepAlive, final List<ChannelHandler> additionalChannelHandlers)
{
 this.resteasyDecoder = new RestEasyHttpRequestDecoder(dispatcher.getDispatcher(), root, getProtocol(), isKeepAlive);
 this.resteasyEncoder = new RestEasyHttpResponseEncoder(dispatcher);
 this.resteasyRequestHandler = new RequestHandler(dispatcher);
 if (executorThreadCount > 0)
 {
   this.executionHandler = new ExecutionHandler(new OrderedMemoryAwareThreadPoolExecutor(executorThreadCount, 0L, 0L));
 }
 else
 {
   this.executionHandler = null;
 }
 this.maxRequestSize = maxRequestSize;
 this.additionalChannelHandlers = additionalChannelHandlers;
}
origin: org.openmobster.core/dataService

public TextProtocolPipelineFactory()
{
  this.eventExecutor = new OrderedMemoryAwareThreadPoolExecutor(5, 1000000, 10000000, 100,
  TimeUnit.MILLISECONDS);
}

origin: apache/james-project

protected ExecutionHandler createExecutionHandler(int size) {
  return new ExecutionHandler(new OrderedMemoryAwareThreadPoolExecutor(size, 0, 0));
}

origin: org.apache.james.protocols/protocols-netty

protected ExecutionHandler createExecutionHandler(int size) {
  return new ExecutionHandler(new OrderedMemoryAwareThreadPoolExecutor(size, 0, 0));
}

origin: org.jboss.resteasy/resteasy-netty

public HttpServerPipelineFactory(RequestDispatcher dispatcher, String root, int executorThreadCount, int maxRequestSize, boolean isKeepAlive, List<ChannelHandler> additionalChannelHandlers)
{
 this.resteasyDecoder = new RestEasyHttpRequestDecoder(dispatcher.getDispatcher(), root, getProtocol(), isKeepAlive);
 this.resteasyEncoder = new RestEasyHttpResponseEncoder(dispatcher);
 this.resteasyRequestHandler = new RequestHandler(dispatcher);
 if (executorThreadCount > 0) 
 {
   this.executionHandler = new ExecutionHandler(new OrderedMemoryAwareThreadPoolExecutor(executorThreadCount, 0L, 0L));
 } 
 else 
 {
   this.executionHandler = null;
 }
 this.maxRequestSize = maxRequestSize;
 this.additionalChannelHandlers = additionalChannelHandlers;
}
origin: com.proofpoint.platform/http-client-experimental

this.executor = new OrderedMemoryAwareThreadPoolExecutor(asyncConfig.getWorkerThreads(), 0, 0, 30, TimeUnit.SECONDS, workerThreadFactory);
origin: org.graylog2/graylog2-shared

new OrderedMemoryAwareThreadPoolExecutor(
    configuration.getRestThreadPoolSize(),
    1048576,
origin: org.apache.camel/camel-netty

protected OrderedMemoryAwareThreadPoolExecutor createExecutorService() {
  // use ordered thread pool, to ensure we process the events in order, and can send back
  // replies in the expected order. eg this is required by TCP.
  // and use a Camel thread factory so we have consistent thread namings
  // we should use a shared thread pool as recommended by Netty
  
  // NOTE: if we don't specify the MaxChannelMemorySize and MaxTotalMemorySize, the thread pool
  // could eat up all the heap memory when the tasks are added very fast
  
  String pattern = getCamelContext().getExecutorServiceManager().getThreadNamePattern();
  ThreadFactory factory = new CamelThreadFactory(pattern, "NettyOrderedWorker", true);
  return new OrderedMemoryAwareThreadPoolExecutor(getMaximumPoolSize(),
      configuration.getMaxChannelMemorySize(), configuration.getMaxTotalMemorySize(),
      30, TimeUnit.SECONDS, factory);
}
origin: xose/netty-xmpp

@Override
protected void startUp() throws Exception {
  executionHandler = new ExecutionHandler(new OrderedMemoryAwareThreadPoolExecutor(4, 0, 0));
  bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
  bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
    @Override
    public ChannelPipeline getPipeline() throws Exception {
      final ChannelPipeline pipeline = Channels.pipeline();
      //pipeline.addLast("logger", new LoggingHandler(InternalLogLevel.INFO));
      pipeline.addLast("xmlFramer", new XMLFrameDecoder());
      pipeline.addLast("xmlDecoder", new XMLElementDecoder());
      pipeline.addLast("xmppDecoder", new XEP0114Decoder(xmppHost, xmppSecret));
      pipeline.addLast("executor", executionHandler);
      pipeline.addLast("xmppHandler", new XMPPStreamHandler(component));
      return pipeline;
    }
  });
  final ChannelFuture future = bootstrap.connect(serverAddress).await();
  if (!future.isSuccess()) {
    bootstrap.releaseExternalResources();
    executionHandler.releaseExternalResources();
    future.rethrowIfFailed();
  }
  channel = future.getChannel();
  component.init(channel, JID.jid("localhost"), JID.jid(xmppHost)); // FIXME
}
origin: os-libera/OpenVirteX

public OpenVirteXController(CmdLineSettings settings) {
  this.ofHost = settings.getOFHost();
  this.ofPort = settings.getOFPort();
  this.dbHost = settings.getDBHost();
  this.dbPort = settings.getDBPort();
  this.dbClear = settings.getDBClear();
  this.maxVirtual = settings.getNumberOfVirtualNets();
  this.statsRefresh = settings.getStatsRefresh();
  this.nClientThreads = settings.getClientThreads();
  this.nServerThreads = settings.getServerThreads();
  this.useBDDP = settings.getUseBDDP();
  // by default, use Mac addresses to store vLinks informations
  this.ovxLinkField = OVXLinkField.MAC_ADDRESS;
  this.clientThreads = new OrderedMemoryAwareThreadPoolExecutor(
      nClientThreads, 1048576, 1048576, 5, TimeUnit.SECONDS);
  this.serverThreads = new OrderedMemoryAwareThreadPoolExecutor(
      nServerThreads, 1048576, 1048576, 5, TimeUnit.SECONDS);
  this.pfact = new SwitchChannelPipeline(this, this.serverThreads);
  OpenVirteXController.instance = this;
  OpenVirteXController.tenantIdCounter = new BitSetIndex(
      IndexType.TENANT_ID);
}
origin: kakaochatfriend/KakaoChatFriendAPI

  new OrderedMemoryAwareThreadPoolExecutor( coreThreadCnt, maxMemory, maxMemory);
final ExecutionHandler executionHandler = new ExecutionHandler(executor);
  new OrderedMemoryAwareThreadPoolExecutor( coreThreadCnt, maxMemory, maxMemory);
final ExecutionHandler executionHandler2 = new ExecutionHandler(executor2);
org.jboss.netty.handler.executionOrderedMemoryAwareThreadPoolExecutor<init>

Javadoc

Creates a new instance.

Popular methods of OrderedMemoryAwareThreadPoolExecutor

  • afterExecute
  • beforeExecute
  • shutdownNow
  • doUnorderedExecute
  • getChildExecutor
  • getChildExecutorKey
  • onAfterExecute
  • removeChildExecutor
  • shutdown

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Best plugins for Eclipse
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