com.neeve.pkt
Class PktIOBuffer

java.lang.Object
  extended by com.neeve.io.IOBuffer
      extended by com.neeve.pkt.PktIOBuffer
All Implemented Interfaces:
UtlPool.Item<com.neeve.io.IOBuffer>, UtlReferenceTracker.HasReferenceTracker

Deprecated. Since 1.9. Use IOBuffer instead.

@Deprecated
public final class PktIOBuffer
extends com.neeve.io.IOBuffer

Implements an IO buffer.

A packet IO buffer is essentially a poolable ByteBuffer. It serves as the unit for IO (network or otherwise). A packet buffers (PktBuffer) serves as window into an IO buffer. The window spans the contents of the packet header or body that the packet buffer backs.

Threading:
As with the contained ByteBuffer object, a packet buffer is not thread safe i.e. only one thread can be executing the packet buffer methods at any point in time.

Field Summary
 
Fields inherited from class com.neeve.io.IOBuffer
DISABLE_NATIVE_BUFFERS
 
Method Summary
static PktIOBuffer create(int length, boolean isNative)
          Deprecated. Since 1.9. Use IOBuffer instead.
static PktIOBuffer createNative(int length)
          Deprecated. Since 1.9. Use IOBuffer instead.
 
Methods inherited from class com.neeve.io.IOBuffer
acquire, adjustHighwater, create, createNative, dispose, getBuffer, getBufferUnsafe, getCapacity, getHighwater, getLength, getOwnerCount, getPool, init, isNative, isNativeXIOBufferEnabled, isSingleMasterDirectBufferEnabled, numSlabs, referenceTracker, releaseBuffer, setByteOrder, setNoWipe, setPool, slab, smallestSlabSize, takeBuffer, toString, wrap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

@Deprecated
public static PktIOBuffer create(int length,
                                            boolean isNative)
Deprecated. Since 1.9. Use IOBuffer instead.

Create a new IO buffer

Parameters:
length - The length of the buffer to create.
isNative - Whether to create a buffer with native or heap storage.
Returns:
Returns the created IO buffer.
Threading:
This method is safe for concurrent access by multiple threads

createNative

@Deprecated
public static PktIOBuffer createNative(int length)
Deprecated. Since 1.9. Use IOBuffer instead.

Force create a native buffer

Parameters:
length - The length of the buffer to create.
Returns:
Returns the created IO buffer.
Threading:
This method is safe for concurrent access by multiple threads

This method creates a native buffer regardless of whether or not IOBuffer.DISABLE_NATIVE_BUFFERS is true. This method should only be used in cases where a native buffer is an absolute necessity, e.g. when working with native code that requires such a buffer.



Copyright © 2016 Neeve Research, LLC. All Rights Reserved.