Tabnine Logo
Pool.holder
Code IndexAdd Tabnine to your IDE (free)

How to use
holder
method
in
com.wizzardo.tools.misc.pool.Pool

Best Java code snippets using com.wizzardo.tools.misc.pool.Pool.holder (Showing top 4 results out of 315)

origin: wizzardo/http

  public static PooledReadableByteArray get() {
    return pool.holder().get();
  }
}
origin: wizzardo/http

@Override
public T get() {
  T value = ref.get();
  if (value == null) {
    return pool.holder().get();
  } else {
    pool.reset(value);
  }
  return value;
}
origin: wizzardo/tools

public static <R> R withBuilder(Mapper<ExceptionDrivenStringBuilder, R> consumer) {
  Holder<ExceptionDrivenStringBuilder> holder = ExceptionDrivenStringBuilder.SHARED_POOL.holder();
  try {
    ExceptionDrivenStringBuilder builder = holder.get();
    return consumer.map(builder);
  } finally {
    holder.close();
  }
}
origin: wizzardo/tools

  @Override
  public void run() {
    Holder<Integer> holder = pool.holder();
    Integer value = 0;
    try {
      value = holder.get();
      Thread.sleep(100);
    } catch (Exception ignored) {
    } finally {
      holder.close();
    }
    Assert.assertEquals(1, value.intValue());
  }
}).start();
com.wizzardo.tools.misc.poolPoolholder

Popular methods of Pool

  • release
  • reset
  • create
  • get
  • provide
  • size

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JTextField (javax.swing)
  • Top 12 Jupyter Notebook extensions
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