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

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

Best Java code snippets using org.glassfish.grizzly.memory.PooledMemoryManager$PoolHeapBuffer.<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: 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

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  return b;
}
origin: javaee/grizzly

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  return b;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  return b;
}
origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  return b;
}
origin: javaee/grizzly

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  return b;
}
origin: javaee/grizzly

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  return b;
}
origin: javaee/grizzly

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  return b;
}
origin: javaee/grizzly

/**
 * Create a new {@link HeapBuffer} based on the current heap.
 * 
 * @param offs relative offset, the absolute value will calculated as (this.offset + offs)
 * @param capacity the capacity of this {@link HeapBuffer}.
 *
 * @return a new {@link HeapBuffer} based on the the method arguments.
 */
@Override
protected HeapBuffer createHeapBuffer(final int offs, final int capacity) {
  onShareHeap();
  final PoolHeapBuffer b =
      new PoolHeapBuffer(heap, offs + offset, capacity,
          null, // don't keep track of the owner for child buffers
          source, // pass the 'parent' buffer along
          shareCount); // pass the shareCount
  b.allowBufferDispose(true);
  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: org.mule.glassfish.grizzly/grizzly-framework

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

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: 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

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;
}
org.glassfish.grizzly.memoryPooledMemoryManager$PoolHeapBuffer<init>

Javadoc

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

Popular methods of PooledMemoryManager$PoolHeapBuffer

  • allowBufferDispose
  • asReadOnlyBuffer
  • checkDispose
    Override the default implementation to check the free status of this buffer (i.e., once released, op
  • clear
  • dispose0
  • onShareHeap
  • returnToPool

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Notification (javax.management)
  • JComboBox (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 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