Tabnine Logo
DirectByteBufferRecord.release
Code IndexAdd Tabnine to your IDE (free)

How to use
release
method
in
org.glassfish.grizzly.nio.DirectByteBufferRecord

Best Java code snippets using org.glassfish.grizzly.nio.DirectByteBufferRecord.release (Showing top 20 results out of 315)

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

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: org.glassfish.grizzly/grizzly-core

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: org.mule.glassfish.grizzly/grizzly-framework

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: org.glassfish.grizzly/grizzly-http-server-core

@Override
public void dispose() {
  record.release();
  record = null;
  super.dispose();
}

origin: javaee/grizzly

private int readNonConnected(final UDPNIOConnection connection, Buffer buffer,
    final ReadResult<Buffer, SocketAddress> currentResult)
    throws IOException {
  final SocketAddress peerAddress;
  final int read;
  final DirectByteBufferRecord ioRecord =
          DirectByteBufferRecord.get();
  try {
    final ByteBuffer directByteBuffer =
        ioRecord.allocate(buffer.limit());
    final int initialBufferPos = directByteBuffer.position();
    peerAddress = ((DatagramChannel) connection.getChannel()).receive(
        directByteBuffer);
    read = directByteBuffer.position() - initialBufferPos;
    if (read > 0) {
      directByteBuffer.flip();
      buffer.put(directByteBuffer);
    }
  } finally {
    ioRecord.release();
  }
  final boolean hasRead = (read > 0);
  if (hasRead && currentResult != null) {
    currentResult.setMessage(buffer);
    currentResult.setReadSize(currentResult.getReadSize() + read);
    currentResult.setSrcAddress(peerAddress);
  }
  return read;
}
origin: org.mule.glassfish.grizzly/grizzly-framework

private int readNonConnected(final UDPNIOConnection connection, Buffer buffer,
    final ReadResult<Buffer, SocketAddress> currentResult)
    throws IOException {
  final SocketAddress peerAddress;
  final int read;
  final DirectByteBufferRecord ioRecord =
          DirectByteBufferRecord.get();
  try {
    final ByteBuffer directByteBuffer =
        ioRecord.allocate(buffer.limit());
    final int initialBufferPos = directByteBuffer.position();
    peerAddress = ((DatagramChannel) connection.getChannel()).receive(
        directByteBuffer);
    read = directByteBuffer.position() - initialBufferPos;
    if (read > 0) {
      directByteBuffer.flip();
      buffer.put(directByteBuffer);
    }
  } finally {
    ioRecord.release();
  }
  final boolean hasRead = (read > 0);
  if (hasRead && currentResult != null) {
    currentResult.setMessage(buffer);
    currentResult.setReadSize(currentResult.getReadSize() + read);
    currentResult.setSrcAddress(peerAddress);
  }
  return read;
}
origin: javaee/grizzly

private int readNonConnected(final UDPNIOConnection connection, Buffer buffer,
    final ReadResult<Buffer, SocketAddress> currentResult)
    throws IOException {
  final SocketAddress peerAddress;
  final int read;
  final DirectByteBufferRecord ioRecord =
          DirectByteBufferRecord.get();
  try {
    final ByteBuffer directByteBuffer =
        ioRecord.allocate(buffer.limit());
    final int initialBufferPos = directByteBuffer.position();
    peerAddress = ((DatagramChannel) connection.getChannel()).receive(
        directByteBuffer);
    read = directByteBuffer.position() - initialBufferPos;
    if (read > 0) {
      directByteBuffer.flip();
      buffer.put(directByteBuffer);
    }
  } finally {
    ioRecord.release();
  }
  final boolean hasRead = (read > 0);
  if (hasRead && currentResult != null) {
    currentResult.setMessage(buffer);
    currentResult.setReadSize(currentResult.getReadSize() + read);
    currentResult.setSrcAddress(peerAddress);
  }
  return read;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

private int readNonConnected(final UDPNIOConnection connection, Buffer buffer,
    final ReadResult<Buffer, SocketAddress> currentResult)
    throws IOException {
  final SocketAddress peerAddress;
  final int read;
  final DirectByteBufferRecord ioRecord =
          DirectByteBufferRecord.get();
  try {
    final ByteBuffer directByteBuffer =
        ioRecord.allocate(buffer.limit());
    final int initialBufferPos = directByteBuffer.position();
    peerAddress = ((DatagramChannel) connection.getChannel()).receive(
        directByteBuffer);
    read = directByteBuffer.position() - initialBufferPos;
    if (read > 0) {
      directByteBuffer.flip();
      buffer.put(directByteBuffer);
    }
  } finally {
    ioRecord.release();
  }
  final boolean hasRead = (read > 0);
  if (hasRead && currentResult != null) {
    currentResult.setMessage(buffer);
    currentResult.setReadSize(currentResult.getReadSize() + read);
    currentResult.setSrcAddress(peerAddress);
  }
  return read;
}
origin: javaee/grizzly

private int readNonConnected(final UDPNIOConnection connection, Buffer buffer,
    final ReadResult<Buffer, SocketAddress> currentResult)
    throws IOException {
  final SocketAddress peerAddress;
  final int read;
  final DirectByteBufferRecord ioRecord =
          DirectByteBufferRecord.get();
  try {
    final ByteBuffer directByteBuffer =
        ioRecord.allocate(buffer.limit());
    final int initialBufferPos = directByteBuffer.position();
    peerAddress = ((DatagramChannel) connection.getChannel()).receive(
        directByteBuffer);
    read = directByteBuffer.position() - initialBufferPos;
    if (read > 0) {
      directByteBuffer.flip();
      buffer.put(directByteBuffer);
    }
  } finally {
    ioRecord.release();
  }
  final boolean hasRead = (read > 0);
  if (hasRead && currentResult != null) {
    currentResult.setMessage(buffer);
    currentResult.setReadSize(currentResult.getReadSize() + read);
    currentResult.setSrcAddress(peerAddress);
  }
  return read;
}
origin: javaee/grizzly

private int readNonConnected(final UDPNIOConnection connection, Buffer buffer,
    final ReadResult<Buffer, SocketAddress> currentResult)
    throws IOException {
  final SocketAddress peerAddress;
  final int read;
  final DirectByteBufferRecord ioRecord =
          DirectByteBufferRecord.get();
  try {
    final ByteBuffer directByteBuffer =
        ioRecord.allocate(buffer.limit());
    final int initialBufferPos = directByteBuffer.position();
    peerAddress = ((DatagramChannel) connection.getChannel()).receive(
        directByteBuffer);
    read = directByteBuffer.position() - initialBufferPos;
    if (read > 0) {
      directByteBuffer.flip();
      buffer.put(directByteBuffer);
    }
  } finally {
    ioRecord.release();
  }
  final boolean hasRead = (read > 0);
  if (hasRead && currentResult != null) {
    currentResult.setMessage(buffer);
    currentResult.setReadSize(currentResult.getReadSize() + read);
    currentResult.setSrcAddress(peerAddress);
  }
  return read;
}
origin: javaee/grizzly

ioRecord.release();
origin: org.glassfish.grizzly/grizzly-http-server-core

ioRecord.release();
org.glassfish.grizzly.nioDirectByteBufferRecordrelease

Popular methods of DirectByteBufferRecord

  • <init>
  • allocate
  • ensureArraySize
  • finishBufferSlice
  • get
  • getArray
  • getArraySize
  • getDirectBuffer
  • getDirectBufferSlice
  • putToArray
  • reset
  • sliceBuffer
  • reset,
  • sliceBuffer,
  • switchToSoft,
  • switchToStrong

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Notification (javax.management)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for Android Studio
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