|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Buffer factory attempting to reduce buffer creation overhead. More...
Public Member Functions | |
| boolean | isFixed () |
| Returns true only if this factory does not allow to allocate more buffers as limited by the initial size. More... | |
| int | getAllocationSize () |
| Returns the allocation size used to create new internal buffers. More... | |
| void | destroy () |
| ByteBuffer | newDirectByteBuffer (final int size) |
| ByteBuffer | newDirectByteBuffer (final byte[] values, final int offset, final int lenght) |
| ByteBuffer | newDirectByteBuffer (final byte[] values, final int offset) |
| ByteBuffer | newDirectByteBuffer (final byte[] values) |
| DoubleBuffer | newDirectDoubleBuffer (final int numElements) |
| DoubleBuffer | newDirectDoubleBuffer (final double[] values, final int offset, final int lenght) |
| DoubleBuffer | newDirectDoubleBuffer (final double[] values, final int offset) |
| DoubleBuffer | newDirectDoubleBuffer (final double[] values) |
| FloatBuffer | newDirectFloatBuffer (final int numElements) |
| FloatBuffer | newDirectFloatBuffer (final float[] values, final int offset, final int lenght) |
| FloatBuffer | newDirectFloatBuffer (final float[] values, final int offset) |
| FloatBuffer | newDirectFloatBuffer (final float[] values) |
| IntBuffer | newDirectIntBuffer (final int numElements) |
| IntBuffer | newDirectIntBuffer (final int[] values, final int offset, final int lenght) |
| IntBuffer | newDirectIntBuffer (final int[] values, final int offset) |
| IntBuffer | newDirectIntBuffer (final int[] values) |
| LongBuffer | newDirectLongBuffer (final int numElements) |
| LongBuffer | newDirectLongBuffer (final long[] values, final int offset, final int lenght) |
| LongBuffer | newDirectLongBuffer (final long[] values, final int offset) |
| LongBuffer | newDirectLongBuffer (final long[] values) |
| ShortBuffer | newDirectShortBuffer (final int numElements) |
| ShortBuffer | newDirectShortBuffer (final short[] values, final int offset, final int lenght) |
| ShortBuffer | newDirectShortBuffer (final short[] values, final int offset) |
| ShortBuffer | newDirectShortBuffer (final short[] values) |
| CharBuffer | newDirectCharBuffer (final int numElements) |
| CharBuffer | newDirectCharBuffer (final char[] values, final int offset, final int lenght) |
| CharBuffer | newDirectCharBuffer (final char[] values, final int offset) |
| CharBuffer | newDirectCharBuffer (final char[] values) |
| boolean | equals (final Object obj) |
| String | toString () |
Static Public Member Functions | |
| static CachedBufferFactory | create () |
Creates a factory with initial size and allocation size set to DEFAULT_ALLOCATION_SIZE. More... | |
| static CachedBufferFactory | create (final int initialSize) |
| Creates a factory with the specified initial size. More... | |
| static CachedBufferFactory | create (final int initialSize, final boolean fixed) |
| Creates a factory with the specified initial size. More... | |
| static CachedBufferFactory | create (final int initialSize, final int allocationSize) |
| Creates a factory with the specified initial size and allocation size. More... | |
| static CachedBufferFactory | createSynchronized () |
Synchronized version of create(). More... | |
| static CachedBufferFactory | createSynchronized (final int initialSize) |
Synchronized version of create(int). More... | |
| static CachedBufferFactory | createSynchronized (final int initialSize, final boolean fixed) |
Synchronized version of create(int, boolean). More... | |
| static CachedBufferFactory | createSynchronized (final int initialSize, final int allocationSize) |
Synchronized version of create(int, int). More... | |
Static Public Attributes | |
| static final int | DEFAULT_ALLOCATION_SIZE = 1024 * 1024 |
| default size for internal buffer allocation. More... | |
Buffer factory attempting to reduce buffer creation overhead.
Direct ByteBuffers must be page aligned which increases creation overhead of small buffers significantly. This factory can be used as fixed size static or or dynamic allocating factory. The initial size and allocation size is configurable.
Fixed size factories may be used in systems with hard realtime requirements and/or predictable memory usage.
concurrency info:
Definition at line 64 of file CachedBufferFactory.java.
|
static |
Creates a factory with initial size and allocation size set to DEFAULT_ALLOCATION_SIZE.
Definition at line 88 of file CachedBufferFactory.java.
|
static |
Creates a factory with the specified initial size.
The allocation size is set to DEFAULT_ALLOCATION_SIZE.
Definition at line 96 of file CachedBufferFactory.java.
|
static |
Creates a factory with the specified initial size.
The allocation size is set to DEFAULT_ALLOCATION_SIZE.
| fixed | Creates a fixed size factory which will handle overflows (initial size) with RuntimeExceptions. |
Definition at line 106 of file CachedBufferFactory.java.
|
static |
Creates a factory with the specified initial size and allocation size.
Definition at line 113 of file CachedBufferFactory.java.
|
static |
Synchronized version of create().
Definition at line 121 of file CachedBufferFactory.java.
|
static |
Synchronized version of create(int).
Definition at line 128 of file CachedBufferFactory.java.
|
static |
Synchronized version of create(int, boolean).
Definition at line 135 of file CachedBufferFactory.java.
|
static |
Synchronized version of create(int, int).
Definition at line 142 of file CachedBufferFactory.java.
| void com.jogamp.common.nio.CachedBufferFactory.destroy | ( | ) |
Definition at line 171 of file CachedBufferFactory.java.
| boolean com.jogamp.common.nio.CachedBufferFactory.equals | ( | final Object | obj | ) |
Definition at line 308 of file CachedBufferFactory.java.
| int com.jogamp.common.nio.CachedBufferFactory.getAllocationSize | ( | ) |
Returns the allocation size used to create new internal buffers.
0 means that the buffer will not grows, see isFixed().
Definition at line 158 of file CachedBufferFactory.java.
| boolean com.jogamp.common.nio.CachedBufferFactory.isFixed | ( | ) |
Returns true only if this factory does not allow to allocate more buffers as limited by the initial size.
Definition at line 150 of file CachedBufferFactory.java.
| ByteBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectByteBuffer | ( | final byte[] | values | ) |
| ByteBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectByteBuffer | ( | final byte[] | values, |
| final int | offset | ||
| ) |
| ByteBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectByteBuffer | ( | final byte[] | values, |
| final int | offset, | ||
| final int | lenght | ||
| ) |
| ByteBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectByteBuffer | ( | final int | size | ) |
Definition at line 177 of file CachedBufferFactory.java.
| CharBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectCharBuffer | ( | final char[] | values | ) |
| CharBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectCharBuffer | ( | final char[] | values, |
| final int | offset | ||
| ) |
| CharBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectCharBuffer | ( | final char[] | values, |
| final int | offset, | ||
| final int | lenght | ||
| ) |
| CharBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectCharBuffer | ( | final int | numElements | ) |
Definition at line 291 of file CachedBufferFactory.java.
| DoubleBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectDoubleBuffer | ( | final double[] | values | ) |
| DoubleBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectDoubleBuffer | ( | final double[] | values, |
| final int | offset | ||
| ) |
| DoubleBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectDoubleBuffer | ( | final double[] | values, |
| final int | offset, | ||
| final int | lenght | ||
| ) |
| DoubleBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectDoubleBuffer | ( | final int | numElements | ) |
Definition at line 211 of file CachedBufferFactory.java.
| FloatBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectFloatBuffer | ( | final float[] | values | ) |
| FloatBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectFloatBuffer | ( | final float[] | values, |
| final int | offset | ||
| ) |
| FloatBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectFloatBuffer | ( | final float[] | values, |
| final int | offset, | ||
| final int | lenght | ||
| ) |
| FloatBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectFloatBuffer | ( | final int | numElements | ) |
Definition at line 227 of file CachedBufferFactory.java.
| IntBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectIntBuffer | ( | final int | numElements | ) |
Definition at line 243 of file CachedBufferFactory.java.
| IntBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectIntBuffer | ( | final int[] | values | ) |
| IntBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectIntBuffer | ( | final int[] | values, |
| final int | offset | ||
| ) |
| IntBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectIntBuffer | ( | final int[] | values, |
| final int | offset, | ||
| final int | lenght | ||
| ) |
| LongBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectLongBuffer | ( | final int | numElements | ) |
Definition at line 259 of file CachedBufferFactory.java.
| LongBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectLongBuffer | ( | final long[] | values | ) |
| LongBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectLongBuffer | ( | final long[] | values, |
| final int | offset | ||
| ) |
| LongBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectLongBuffer | ( | final long[] | values, |
| final int | offset, | ||
| final int | lenght | ||
| ) |
| ShortBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectShortBuffer | ( | final int | numElements | ) |
Definition at line 275 of file CachedBufferFactory.java.
| ShortBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectShortBuffer | ( | final short[] | values | ) |
| ShortBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectShortBuffer | ( | final short[] | values, |
| final int | offset | ||
| ) |
| ShortBuffer com.jogamp.common.nio.CachedBufferFactory.newDirectShortBuffer | ( | final short[] | values, |
| final int | offset, | ||
| final int | lenght | ||
| ) |
| String com.jogamp.common.nio.CachedBufferFactory.toString | ( | ) |
|
static |
default size for internal buffer allocation.
Definition at line 69 of file CachedBufferFactory.java.