public class FSTStructAllocator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
chunk |
protected int |
chunkIndex |
protected int |
chunkSize |
| Modifier | Constructor and Description |
|---|---|
protected |
FSTStructAllocator() |
|
FSTStructAllocator(int chunkSizeBytes)
Create a Structallocator with given chunk size in bytes.
|
| Modifier and Type | Method and Description |
|---|---|
static FSTStruct |
createStructPointer(byte[] b,
int index) |
protected FSTStructFactory |
getFactory() |
static FSTStruct |
getVolatileStructPointer(byte[] b,
int index) |
<X extends FSTStruct> |
newArray(int size,
X templ)
create a new struct array of same type as template
|
<K extends FSTStruct,V extends FSTStruct> |
newMap(int size,
K keyTemplate,
V valueTemplate)
create a fixed size struct hashmap.
|
static <C extends FSTStruct> |
newPointer(Class<C> clazz) |
<S extends FSTStruct> |
newStruct(S aTemplate)
allocate a Struct instance from an arbitrary template.
|
static <T extends FSTStruct> |
toStruct(T onHeapTemplate) |
protected int chunkSize
protected byte[] chunk
protected int chunkIndex
protected FSTStructAllocator()
public FSTStructAllocator(int chunkSizeBytes)
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 <X extends FSTStruct> StructArray<X> newArray(int size, X templ)
size - public <K extends FSTStruct,V extends FSTStruct> StructMap<K,V> newMap(int size, K keyTemplate, V valueTemplate)
K - size - keyTemplate - public <S extends FSTStruct> S newStruct(S aTemplate)
S - aTemplate - protected FSTStructFactory getFactory()
Copyright © 2013. All rights reserved.