public final class FSTConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
static Integer[] |
intObjects |
| Modifier and Type | Method and Description |
|---|---|
int |
calcObjectReadTimeNotAUtility(int iterations,
Object obj)
for optimization purposes, do not use to benchmark processing time or in a regular program as
this methods creates a temporary binaryoutputstream and serializes the object in order to measure the
read time in picoseconds.
|
int |
calcObjectSizeBytesNotAUtility(Object obj)
for optimization purposes, do not use to benchmark processing time or in a regular program as
this methods creates a temporary binaryoutputstream and serializes the object in order to measure the
size.
|
int |
calcObjectWriteTimeNotAUtility(int iterations,
Object obj)
for optimization purposes, do not use to benchmark processing time or in a regular program as
this methods creates a temporary binaryoutputstream and serializes the object in order to measure the
write time in micros.
|
void |
clearCaches()
clear cached softref's and ThreadLocal.
|
static FSTConfiguration |
createDefaultConfiguration() |
static FSTConfiguration |
createStructConfiguration() |
Object |
getCachedObject(Class cl) |
FSTClazzInfo |
getClassInfo(Class type) |
ClassLoader |
getClassLoader()
mark the given class as being replaced by a copy of an equal instance.
|
FSTClazzNameRegistry |
getClassRegistry() |
FSTClazzInfo |
getClazzInfo(Class rowClass) |
FSTClazzInfoRegistry |
getCLInfoRegistry() |
FSTObjectCopy |
getCopier() |
static FSTConfiguration |
getDefaultConfiguration() |
static Integer |
getInt(int i) |
FSTObjectInput |
getObjectInput(byte[] arr) |
FSTObjectInput |
getObjectInput(byte[] arr,
int off,
int len)
take the given array as input. the array is NOT copied
|
FSTObjectInput |
getObjectInput(InputStream in)
utility for thread safety and reuse.
|
FSTObjectOutput |
getObjectOutput(OutputStream out)
utility for thread safety and reuse.
|
boolean |
isIgnoreSerialInterfaces() |
boolean |
isPreferSpeed() |
boolean |
isShareReferences() |
void |
registerClass(Class c)
attention: id should be > CUSTOM_ID_BASE
|
void |
registerSerializer(Class clazz,
FSTObjectSerializer ser,
boolean alsoForAllSubclasses) |
void |
returnObject(Object... cachedObs)
reuse heavy weight objects.
|
void |
setIgnoreSerialInterfaces(boolean ignoreSerialInterfaces) |
void |
setPreferSpeed(boolean preferSpeed)
this options lets FST favour speed of encoding over size of the encoded object.
|
void |
setSerializerRegistryDelegate(FSTSerializerRegistryDelegate del)
patch default serializer lookup. set to null to delete.
|
void |
setShareReferences(boolean shareReferences)
if false, identical objects will get serialized twice.
|
public static Integer[] intObjects
public static Integer getInt(int i)
public static FSTConfiguration getDefaultConfiguration()
public static FSTConfiguration createDefaultConfiguration()
public void registerSerializer(Class clazz, FSTObjectSerializer ser, boolean alsoForAllSubclasses)
public static FSTConfiguration createStructConfiguration()
public void returnObject(Object... cachedObs)
cachedObs - public boolean isPreferSpeed()
public void setPreferSpeed(boolean preferSpeed)
preferSpeed - public int calcObjectSizeBytesNotAUtility(Object obj) throws IOException
IOExceptionpublic void setSerializerRegistryDelegate(FSTSerializerRegistryDelegate del)
del - public int calcObjectWriteTimeNotAUtility(int iterations,
Object obj)
throws IOException
IOExceptionpublic int calcObjectReadTimeNotAUtility(int iterations,
Object obj)
throws Exception
Exceptionpublic void clearCaches()
public FSTObjectCopy getCopier()
public boolean isShareReferences()
public void setShareReferences(boolean shareReferences)
shareReferences - public void registerClass(Class c)
c - public FSTClazzNameRegistry getClassRegistry()
public FSTClazzInfoRegistry getCLInfoRegistry()
public ClassLoader getClassLoader()
public FSTClazzInfo getClassInfo(Class type)
public FSTObjectInput getObjectInput(InputStream in)
in - public FSTObjectInput getObjectInput(byte[] arr)
public FSTObjectInput getObjectInput(byte[] arr, int off, int len)
arr - off - len - public FSTObjectOutput getObjectOutput(OutputStream out)
out - - can be null (temp bytearrays stream is created then)public void setIgnoreSerialInterfaces(boolean ignoreSerialInterfaces)
public boolean isIgnoreSerialInterfaces()
public FSTClazzInfo getClazzInfo(Class rowClass)
Copyright © 2014. All rights reserved.