Tabnine Logo
ByteBufferManager$ByteBufferThreadLocalPool.isLastAllocated
Code IndexAdd Tabnine to your IDE (free)

How to use
isLastAllocated
method
in
org.glassfish.grizzly.memory.ByteBufferManager$ByteBufferThreadLocalPool

Best Java code snippets using org.glassfish.grizzly.memory.ByteBufferManager$ByteBufferThreadLocalPool.isLastAllocated (Showing top 20 results out of 315)

origin: javaee/grizzly

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: org.mule.glassfish.grizzly/grizzly-framework

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: org.mule.glassfish.grizzly/grizzly-framework

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: org.glassfish.grizzly/grizzly-websockets-server

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: javaee/grizzly

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: javaee/grizzly

@Override
public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) {
  if (isLastAllocated(oldByteBuffer)
      && remaining() + oldByteBuffer.capacity() >= newSize) {
    lastAllocatedIndex--;
    pool.position(pool.position() - oldByteBuffer.capacity());
    final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize);
    newByteBuffer.position(oldByteBuffer.position());
    return addHistory(newByteBuffer);
  }
  return null;
}
origin: org.glassfish.grizzly/grizzly-websockets-server

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
origin: javaee/grizzly

@Override
public boolean release(ByteBuffer underlyingBuffer) {
  if (isLastAllocated(underlyingBuffer)) {
    pool.position(pool.position() - underlyingBuffer.capacity());
    allocationHistory[--lastAllocatedIndex] = null;
    return true;
  } else if (wantReset(underlyingBuffer.capacity())) {
    reset(underlyingBuffer);
    return true;
  }
  return false;
}
org.glassfish.grizzly.memoryByteBufferManager$ByteBufferThreadLocalPoolisLastAllocated

Popular methods of ByteBufferManager$ByteBufferThreadLocalPool

  • <init>
  • addHistory
  • hasRemaining
  • remaining
  • reset
  • wantReset

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JCheckBox (javax.swing)
  • JOptionPane (javax.swing)
  • Top PhpStorm 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