Tabnine Logo
CompositeBuffer.newBuffer
Code IndexAdd Tabnine to your IDE (free)

How to use
newBuffer
method
in
org.glassfish.grizzly.memory.CompositeBuffer

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

origin: javaee/grizzly

private void checkCompositeBuffer() {
  if (compositeBuffer == null) {
    final CompositeBuffer buffer = CompositeBuffer.newBuffer(
        memoryManager);
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    compositeBuffer = buffer;
  }
}
origin: javaee/grizzly

private void checkCompositeBuffer() {
  if (compositeBuffer == null) {
    final CompositeBuffer buffer = CompositeBuffer.newBuffer(
        memoryManager);
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    compositeBuffer = buffer;
  }
}
origin: javaee/grizzly

private CompositeBuffer newCompositeBuffer() {
  final CompositeBuffer cb = CompositeBuffer.newBuffer(this);
  cb.allowInternalBuffersDispose(true);
  cb.allowBufferDispose(true);
  return cb;
}
origin: javaee/grizzly

private void checkCompositeBuffer() {
  if (compositeBuffer == null) {
    final CompositeBuffer buffer = CompositeBuffer.newBuffer(
        memoryManager);
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    compositeBuffer = buffer;
  }
}
origin: javaee/grizzly

private CompositeBuffer newCompositeBuffer() {
  final CompositeBuffer cb = CompositeBuffer.newBuffer(this);
  cb.allowInternalBuffersDispose(true);
  cb.allowBufferDispose(true);
  return cb;
}
origin: javaee/grizzly

private void checkCompositeBuffer() {
  if (compositeBuffer == null) {
    final CompositeBuffer buffer = CompositeBuffer.newBuffer(
        memoryManager);
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    compositeBuffer = buffer;
  }
}
origin: org.mule.glassfish.grizzly/grizzly-framework

private CompositeBuffer newCompositeBuffer() {
  final CompositeBuffer cb = CompositeBuffer.newBuffer(this);
  cb.allowInternalBuffersDispose(true);
  cb.allowBufferDispose(true);
  return cb;
}
origin: org.glassfish.grizzly/grizzly-http-server

private CompositeBuffer obtainCompositeBuffer() {
  if (buffer == null) {
    buffer = CompositeBuffer.newBuffer(ctx.getMemoryManager());
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    buffer.disposeOrder(CompositeBuffer.DisposeOrder.LAST_TO_FIRST);
  }
  return buffer;
}
origin: javaee/grizzly

private CompositeBuffer obtainCompositeBuffer() {
  if (buffer == null) {
    buffer = CompositeBuffer.newBuffer(ctx.getMemoryManager());
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    buffer.disposeOrder(CompositeBuffer.DisposeOrder.LAST_TO_FIRST);
  }
  return buffer;
}
origin: javaee/grizzly

  private void flushCurrent() {
    currentBuffer.trim();
    if (compositeBuffer == null) {
      compositeBuffer = CompositeBuffer.newBuffer(mm);
    }
    
    compositeBuffer.append(currentBuffer);
    compositeBuffer.position(compositeBuffer.limit());
    currentBuffer = null;
  }    
}
origin: javaee/grizzly

  private void init() {
    if (buffer == null) {
      buffer = CompositeBuffer.newBuffer(memoryManager);
      buffer.allowInternalBuffersDispose(true);
      buffer.allowBufferDispose(true);
      buffer.append(memoryManager.allocate(DEFAULT_BUFFER_SIZE));
    }
  }
}
origin: javaee/grizzly

  private void flushCurrent() {
    currentBuffer.trim();
    if (compositeBuffer == null) {
      compositeBuffer = CompositeBuffer.newBuffer(mm);
    }
    
    compositeBuffer.append(currentBuffer);
    compositeBuffer.position(compositeBuffer.limit());
    currentBuffer = null;
  }    
}
origin: org.glassfish.grizzly/grizzly-websockets-server

private CompositeBuffer obtainCompositeBuffer() {
  if (buffer == null) {
    buffer = CompositeBuffer.newBuffer(ctx.getMemoryManager());
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    buffer.disposeOrder(CompositeBuffer.DisposeOrder.LAST_TO_FIRST);
  }
  return buffer;
}
origin: javaee/grizzly

  private void init() {
    if (buffer == null) {
      buffer = CompositeBuffer.newBuffer(memoryManager);
      buffer.allowInternalBuffersDispose(true);
      buffer.allowBufferDispose(true);
      buffer.append(memoryManager.allocate(DEFAULT_BUFFER_SIZE));
    }
  }
}
origin: javaee/grizzly

  private void init() {
    if (buffer == null) {
      buffer = CompositeBuffer.newBuffer(memoryManager);
      buffer.allowInternalBuffersDispose(true);
      buffer.allowBufferDispose(true);
      buffer.append(memoryManager.allocate(DEFAULT_BUFFER_SIZE));
    }
  }
}
origin: javaee/grizzly

private CompositeBuffer obtainCompositeBuffer() {
  if (buffer == null) {
    buffer = CompositeBuffer.newBuffer(ctx.getMemoryManager());
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    buffer.disposeOrder(CompositeBuffer.DisposeOrder.LAST_TO_FIRST);
  }
  return buffer;
}
origin: javaee/grizzly

private CompositeBuffer obtainCompositeBuffer() {
  if (buffer == null) {
    buffer = CompositeBuffer.newBuffer(ctx.getMemoryManager());
    buffer.allowBufferDispose(true);
    buffer.allowInternalBuffersDispose(true);
    buffer.disposeOrder(CompositeBuffer.DisposeOrder.LAST_TO_FIRST);
  }
  return buffer;
}
origin: org.mule.glassfish.grizzly/grizzly-framework

  private void flushCurrent() {
    currentBuffer.trim();
    if (compositeBuffer == null) {
      compositeBuffer = CompositeBuffer.newBuffer(mm);
    }
    
    compositeBuffer.append(currentBuffer);
    compositeBuffer.position(compositeBuffer.limit());
    currentBuffer = null;
  }    
}
origin: org.glassfish.grizzly/grizzly-http-server-core

@Override
public Buffer toBuffer(final MemoryManager memoryManager) {
  final Buffer buffer = memoryManager.allocate(
      FRAME_HEADER_SIZE);
  
  serializeFrameHeader(buffer);
  buffer.trim();
  final CompositeBuffer cb = CompositeBuffer.newBuffer(memoryManager,
      buffer, compressedHeaders);
  
  cb.allowBufferDispose(true);
  cb.allowInternalBuffersDispose(true);
  return cb;
}
origin: javaee/grizzly

@Override
public Buffer toBuffer(final MemoryManager memoryManager) {
  final Buffer buffer = memoryManager.allocate(
      FRAME_HEADER_SIZE);
  
  serializeFrameHeader(buffer);
  buffer.trim();
  final CompositeBuffer cb = CompositeBuffer.newBuffer(memoryManager,
      buffer, compressedHeaders);
  
  cb.allowBufferDispose(true);
  cb.allowInternalBuffersDispose(true);
  return cb;
}
org.glassfish.grizzly.memoryCompositeBuffernewBuffer

Javadoc

Construct CompositeBuffer.

Popular methods of CompositeBuffer

  • append
  • allowInternalBuffersDispose
  • remaining
  • allowBufferDispose
  • dispose
  • shrink
  • get
  • position
  • bulk
    Iterates over Buffer bytes from position to limit and lets BulkOperation examine/change the buffer c
  • disposeOrder
    Sets the order in which internal Buffers will be disposed.
  • limit
  • replace
    Replace one internal Buffer with another one.
  • limit,
  • replace,
  • toByteBufferArray,
  • clear,
  • duplicate,
  • order,
  • prepend,
  • removeAll,
  • toBufferArray

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • 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