Tabnine Logo
PooledMemoryManager$PoolByteBufferWrapper.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.glassfish.grizzly.memory.PooledMemoryManager$PoolByteBufferWrapper
constructor

Best Java code snippets using org.glassfish.grizzly.memory.PooledMemoryManager$PoolByteBufferWrapper.<init> (Showing top 20 results out of 315)

origin: javaee/grizzly

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: javaee/grizzly

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: javaee/grizzly

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: org.glassfish.grizzly/grizzly-websockets-server

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: org.glassfish.grizzly/grizzly-core

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: javaee/grizzly

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: javaee/grizzly

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: javaee/grizzly

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: javaee/grizzly

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: javaee/grizzly

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: javaee/grizzly

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: org.glassfish.grizzly/grizzly-core

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: javaee/grizzly

public PoolBuffer allocate() {
  final PoolBuffer buffer =
      (isDirect || FORCE_BYTE_BUFFER_BASED_BUFFERS) ?
      // if isDirect || FORCE_BYTE_BUFFER - allocate ByteBufferWrapper
      new PoolByteBufferWrapper(isDirect ?
          ByteBuffer.allocateDirect(bufferSize) :
          ByteBuffer.allocate(bufferSize), this) :
      
      // otherwise use HeapBuffer
      new PoolHeapBuffer(new byte[bufferSize], this);
      
  
  ProbeNotifier.notifyBufferAllocated(monitoringConfig, bufferSize);
  return buffer;
}
origin: javaee/grizzly

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: javaee/grizzly

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: javaee/grizzly

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: javaee/grizzly

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

origin: org.glassfish.grizzly/grizzly-websockets-server

@Override
protected ByteBufferWrapper wrapByteBuffer(final ByteBuffer buffer) {
  final PoolByteBufferWrapper b =
      new PoolByteBufferWrapper(buffer,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  shareCount.incrementAndGet();
  return b;
}

org.glassfish.grizzly.memoryPooledMemoryManager$PoolByteBufferWrapper<init>

Javadoc

Creates a new PoolBuffer instance wrapping the specified java.nio.ByteBuffer.

Popular methods of PooledMemoryManager$PoolByteBufferWrapper

  • allowBufferDispose
  • dispose0
  • returnToPool

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JComboBox (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