Tabnine Logo
CleanupChannelGroup
Code IndexAdd Tabnine to your IDE (free)

How to use
CleanupChannelGroup
in
com.ning.http.client.providers.netty.channel

Best Java code snippets using com.ning.http.client.providers.netty.channel.CleanupChannelGroup (Showing top 4 results out of 315)

origin: com.ning/async-http-client

  @Override
  public boolean remove(Object o) {
    boolean removed = super.remove(o);
    if (removed) {
      if (maxTotalConnectionsEnabled)
        freeChannels.release();
      if (maxConnectionsPerHostEnabled) {
        Object partitionKey = channelId2PartitionKey.remove(Channel.class.cast(o).getId());
        if (partitionKey != null) {
          Semaphore freeChannelsForHost = freeChannelsPerHost.get(partitionKey);
          if (freeChannelsForHost != null)
            freeChannelsForHost.release();
        }
      }
    }
    return removed;
  }
};
origin: com.ning/async-http-client

  openChannels = new CleanupChannelGroup("asyncHttpClient") {
    @Override
    public boolean remove(Object o) {
  freeChannels = new Semaphore(config.getMaxConnections());
} else {
  openChannels = new CleanupChannelGroup("asyncHttpClient");
  freeChannels = null;
origin: io.gatling/async-http-client

  openChannels = new CleanupChannelGroup("asyncHttpClient") {
    @Override
    public boolean remove(Object o) {
  freeChannels = new Semaphore(config.getMaxConnections());
} else {
  openChannels = new CleanupChannelGroup("asyncHttpClient");
  freeChannels = null;
origin: io.gatling/async-http-client

  @Override
  public boolean remove(Object o) {
    boolean removed = super.remove(o);
    if (removed) {
      freeChannels.release();
      if (maxConnectionsPerHostEnabled) {
        String poolKey = channelId2KeyPool.remove(Channel.class.cast(o).getId());
        if (poolKey != null) {
          Semaphore freeChannelsForHost = freeChannelsPerHost.get(poolKey);
          if (freeChannelsForHost != null)
            freeChannelsForHost.release();
        }
      }
    }
    return removed;
  }
};
com.ning.http.client.providers.netty.channelCleanupChannelGroup

Javadoc

Extension of DefaultChannelGroup that's used mainly as a cleanup container, where #close() is only supposed to be called once.

Most used methods

  • <init>
  • remove

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • JTextField (javax.swing)
  • Top Vim plugins
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