public class FSTStructFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_CLASSES |
static int |
SIZE_ALIGN |
| Constructor and Description |
|---|
FSTStructFactory() |
| Modifier and Type | Method and Description |
|---|---|
static int |
align(int val,
int align) |
int |
calcStructSize(FSTStruct onHeapStruct) |
protected int |
computeElemSize(Object container,
Object[] objectValue,
FSTClazzInfo.FSTFieldInfo fi) |
FSTStruct |
createPrimitiveArrayBasePointer(byte[] base,
long objectBaseOffset,
int arrayStructIndex) |
FSTStruct |
createStructPointer(byte[] b,
int index,
int clzId)
allocates a StructAccessor ("pointer") matching the struct data expected in the byte
array at given position with given classId.
|
FSTStruct |
createStructWrapper(byte[] b,
int index)
allocates a StructAccessor ("pointer") matching the struct data expected in the byte
array at given position.
|
FSTStruct |
createTypedArrayBasePointer(byte[] base,
long objectBaseOffset,
int arrayStructIndex) |
<T extends FSTStruct> |
createWrapper(Class<T> onHeap,
byte[] bytes,
int index) |
void |
detach(FSTStruct structPointer) |
void |
fillPrimitiveArrayBasePointer(FSTStruct result,
byte[] base,
long objectBaseOffset,
int arrayStructIndex) |
void |
fillTypedArrayBasePointer(FSTStruct result,
byte[] base,
long objectBaseOffset,
int arrayStructIndex) |
Class |
getClazz(int clzId) |
int |
getClzId(Class c) |
static FSTStructFactory |
getInstance() |
Class |
getProxyClass(Class clz) |
int |
getShallowStructSize(Class clz) |
FSTStruct |
getStructPointer(byte[] b,
int index)
returns a struct wrapper for given structured object from the thread local wrapper cache.
|
FSTStruct |
getStructPointerByOffset(byte[] b,
long offset) |
void |
registerClz(Class... classes) |
void |
registerSystemClz(byte startVal,
Class... classes) |
byte[] |
toByteArray(FSTStruct onHeapStruct) |
int |
toByteArray(FSTStruct onHeapStruct,
byte[] bytes,
int index) |
<T extends FSTStruct> |
toStruct(T onHeap) |
<T extends FSTStruct> |
toStructArray(int size,
T onHeap) |
public static int SIZE_ALIGN
public static final int MAX_CLASSES
public static FSTStructFactory getInstance()
public <T extends FSTStruct> T createWrapper(Class<T> onHeap, byte[] bytes, int index) throws Exception
Exceptionpublic FSTStruct createStructWrapper(byte[] b, int index)
b - index - public FSTStruct createStructPointer(byte[] b, int index, int clzId)
b - index - public FSTStruct createTypedArrayBasePointer(byte[] base, long objectBaseOffset, int arrayStructIndex)
public void fillTypedArrayBasePointer(FSTStruct result, byte[] base, long objectBaseOffset, int arrayStructIndex)
public void fillPrimitiveArrayBasePointer(FSTStruct result, byte[] base, long objectBaseOffset, int arrayStructIndex)
public FSTStruct createPrimitiveArrayBasePointer(byte[] base, long objectBaseOffset, int arrayStructIndex)
public <T extends FSTStruct> StructArray<T> toStructArray(int size, T onHeap)
public <T extends FSTStruct> T toStruct(T onHeap)
public void detach(FSTStruct structPointer)
public FSTStruct getStructPointerByOffset(byte[] b, long offset)
public FSTStruct getStructPointer(byte[] b, int index)
b - index - public static int align(int val,
int align)
public int calcStructSize(FSTStruct onHeapStruct)
protected int computeElemSize(Object container, Object[] objectValue, FSTClazzInfo.FSTFieldInfo fi)
public void registerClz(Class... classes)
public void registerSystemClz(byte startVal,
Class... classes)
public int getClzId(Class c)
public Class getClazz(int clzId)
public byte[] toByteArray(FSTStruct onHeapStruct)
public int toByteArray(FSTStruct onHeapStruct, byte[] bytes, int index) throws Exception
Exceptionpublic int getShallowStructSize(Class clz)
Copyright © 2013. All rights reserved.