com.jniwrapper
Class DataBufferFactory
java.lang.Object
|
+--com.jniwrapper.DataBufferFactory
- public abstract class DataBufferFactory
- extends java.lang.Object
Abstract base for factory classes that produce instances of
appropriate DataBuffer
implementation.
The class also implements Singleton pattern and performs
initialization of factory instance of required class
depending on the JRE version and settings.
- See Also:
PROPERTY_UNSAFE
Field Summary |
static java.lang.String |
PROPERTY_SAFEMEM
If this system property is set JNI Wrapper will perform all native memory accesses using fail-safe native
methods that throw java exceptions instead of crashing the JVM on illegal memory accesses. |
static java.lang.String |
PROPERTY_UNSAFE
If this system property is defined JNI Wrapper will try to access native memory using sun.misc.Unsafe class
which usually results in better performance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_UNSAFE
public static final java.lang.String PROPERTY_UNSAFE
- If this system property is defined JNI Wrapper will try to access native memory using sun.misc.Unsafe class
which usually results in better performance.
- See Also:
- Constant Field Values
PROPERTY_SAFEMEM
public static final java.lang.String PROPERTY_SAFEMEM
- If this system property is set JNI Wrapper will perform all native memory accesses using fail-safe native
methods that throw java exceptions instead of crashing the JVM on illegal memory accesses.
- See Also:
- Constant Field Values
DataBufferFactory
protected DataBufferFactory()
getInstance
public static DataBufferFactory getInstance()
createArrayBuffer
public abstract DataBuffer createArrayBuffer(byte[] data)
allocateMemoryBuffer
public abstract MemoryBuffer allocateMemoryBuffer(int length)
createExternMemoryBuffer
public abstract MemoryBuffer createExternMemoryBuffer(long handle,
int length)