public class FSTTypedStructAllocator<T extends FSTStruct> extends FSTStructAllocator
chunk, chunkIndex, chunkSize| Constructor and Description |
|---|
FSTTypedStructAllocator(int chunkSizeBytes,
T template)
Create a Structallocator for the given template.
|
FSTTypedStructAllocator(T ontpl)
Create a Structallocator for the given template.
|
FSTTypedStructAllocator(T ontpl,
int objectsPerChunk)
Create a Structallocator for the given template.
|
| Modifier and Type | Method and Description |
|---|---|
static FSTStruct |
createStructPointer(byte[] b,
int index) |
int |
getTemplateSize() |
static FSTStruct |
getVolatileStructPointer(byte[] b,
int index) |
StructArray<T> |
newArray(int size)
create a new struct array of same type as template
|
<K extends FSTStruct> |
newMap(int size,
K keyTemplate)
create a fixed size struct hashmap.
|
static <C extends FSTStruct> |
newPointer(Class<C> clazz) |
T |
newStruct() |
static <T extends FSTStruct> |
toStruct(T onHeapTemplate) |
getFactory, newArray, newMap, newStructpublic FSTTypedStructAllocator(T ontpl)
ontpl - public FSTTypedStructAllocator(T ontpl, int objectsPerChunk)
ontpl - objectsPerChunk - public FSTTypedStructAllocator(int chunkSizeBytes,
T template)
template - chunkSizeBytes - public static FSTStruct createStructPointer(byte[] b, int index)
b - index - public static <T extends FSTStruct> T toStruct(T onHeapTemplate)
T - onHeapTemplate - public static FSTStruct getVolatileStructPointer(byte[] b, int index)
b - index - public static <C extends FSTStruct> C newPointer(Class<C> clazz)
C - clazz - public StructArray<T> newArray(int size)
size - public <K extends FSTStruct> StructMap<K,T> newMap(int size, K keyTemplate)
K - size - keyTemplate - public T newStruct()
public int getTemplateSize()
Copyright © 2013. All rights reserved.