Tabnine Logo
ThreadLocalPool.allocate
Code IndexAdd Tabnine to your IDE (free)

How to use
allocate
method
in
org.glassfish.grizzly.memory.ThreadLocalPool

Best Java code snippets using org.glassfish.grizzly.memory.ThreadLocalPool.allocate (Showing top 12 results out of 315)

origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: javaee/grizzly

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: org.glassfish.grizzly/grizzly-core

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
origin: org.mule.glassfish.grizzly/grizzly-framework

/**
 * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}.
 *
 * @param threadLocalCache the {@link ThreadLocalPool} to allocate from.
 * @param size the amount to allocate.
 *
 * @return an memory buffer, or <code>null</code> if the requested size
 *  exceeds the remaining free memory of the {@link ThreadLocalPool}.
 */
protected Object allocateFromPool(final ThreadLocalPool threadLocalCache,
                 final int size) {
  if (threadLocalCache.remaining() >= size) {
    ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size);
    return threadLocalCache.allocate(size);
  }
  return null;
}
org.glassfish.grizzly.memoryThreadLocalPoolallocate

Popular methods of ThreadLocalPool

  • isLastAllocated
  • reallocate
  • reduceLastAllocated
  • release
  • remaining
  • reset
  • wantReset

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • JCheckBox (javax.swing)
  • From CI to AI: The AI layer in your organization
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