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

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

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

origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: org.mule.glassfish.grizzly/grizzly-framework

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: org.glassfish.grizzly/grizzly-core

/**
 * Get the size of local thread memory pool.
 *
 * @return the size of local thread memory pool.
 */
public int getReadyThreadBufferSize() {
  ThreadLocalPool threadLocalPool = getThreadLocalPool();
  if (threadLocalPool != null) {
    return threadLocalPool.remaining();
  }
  return 0;
}
origin: javaee/grizzly

protected HeapBuffer allocateHeapBufferAtLeast(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
      remaining = threadLocalCache.remaining();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, remaining);
  } else {
    return createTrimAwareBuffer(size);
  }
}

origin: javaee/grizzly

protected HeapBuffer allocateHeapBuffer(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    final int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, size);
  } else {
    return createTrimAwareBuffer(size);
  }
}
origin: org.glassfish.grizzly/grizzly-core

protected HeapBuffer allocateHeapBuffer(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    final int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, size);
  } else {
    return createTrimAwareBuffer(size);
  }
}
origin: org.glassfish.grizzly/grizzly-websockets-server

protected HeapBuffer allocateHeapBuffer(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    final int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, size);
  } else {
    return createTrimAwareBuffer(size);
  }
}
origin: javaee/grizzly

protected HeapBuffer allocateHeapBuffer(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    final int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, size);
  } else {
    return createTrimAwareBuffer(size);
  }
}
origin: javaee/grizzly

protected HeapBuffer allocateHeapBuffer(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    final int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, size);
  } else {
    return createTrimAwareBuffer(size);
  }
}
origin: javaee/grizzly

protected HeapBuffer allocateHeapBuffer(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    final int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, size);
  } else {
    return createTrimAwareBuffer(size);
  }
}
origin: javaee/grizzly

protected HeapBuffer allocateHeapBuffer(final int size) {
  if (size > maxBufferSize) {
    // Don't use pool
    return createTrimAwareBuffer(size);
  }
  final ThreadLocalPool<HeapBuffer> threadLocalCache = getHeapBufferThreadLocalPool();
  if (threadLocalCache != null) {
    final int remaining = threadLocalCache.remaining();
    if (remaining == 0 || remaining < size) {
      reallocatePoolBuffer();
    }
    return (HeapBuffer) allocateFromPool(threadLocalCache, size);
  } else {
    return createTrimAwareBuffer(size);
  }
}
org.glassfish.grizzly.memoryThreadLocalPoolremaining

Popular methods of ThreadLocalPool

  • allocate
  • isLastAllocated
  • reallocate
  • reduceLastAllocated
  • release
  • reset
  • wantReset

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • Menu (java.awt)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Best IntelliJ 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