public class CompressedMarshObjectConvertor extends Resource implements MarshObjectConvertorResource
ResourcePool only.| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
CompressedMarshObjectConvertor.CompressedMarshObjectConvertorFactory  | 
| Constructor and Description | 
|---|
CompressedMarshObjectConvertor(int level)  | 
CompressedMarshObjectConvertor(int level,
                              ISmartLengthBasedCacheCallback cacheCallback)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()
Cleans the resource of its contents so it can be returned to the pool. 
 | 
static IResourceFactory<CompressedMarshObjectConvertor> | 
getFactory()  | 
MarshObject | 
getMarshObject(Object o)
Convert Object to MarshObject 
 | 
Object | 
getObject(MarshObject marsh)
Convert MarshObject to Object 
 | 
protected ObjectInputStream | 
getObjectInputStream(InputStream is)  | 
protected ObjectOutputStream | 
getObjectOutputStream(OutputStream is)  | 
long | 
getUsedMemory()  | 
protected byte[] | 
serializeToByteArray(Object o)  | 
acquire, isAcquired, isFromPool, release, setAcquired, setFromPoolclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquire, isAcquired, isFromPool, release, setAcquired, setFromPoolpublic CompressedMarshObjectConvertor(int level)
public CompressedMarshObjectConvertor(int level,
                                      ISmartLengthBasedCacheCallback cacheCallback)
level - the compression level (0-9), The default setting is DEFAULT_COMPRESSION.IllegalArgumentException - if the compression level is invalidprotected byte[] serializeToByteArray(Object o) throws IOException
IOExceptionpublic MarshObject getMarshObject(Object o) throws IOException
IMarshObjectConvertorgetMarshObject in interface IMarshObjectConvertoro - Original objectIOExceptionpublic Object getObject(MarshObject marsh) throws IOException, ClassNotFoundException
IMarshObjectConvertorgetObject in interface IMarshObjectConvertormarsh - MarshObject to convertIOExceptionClassNotFoundExceptionprotected ObjectOutputStream getObjectOutputStream(OutputStream is) throws IOException
IOExceptionprotected ObjectInputStream getObjectInputStream(InputStream is) throws IOException
IOExceptionpublic void clear()
IResource You may use the
 IResource.isFromPool() indication to decide of a special action before returning a resource to
 the pool, or discard any actions on resources not returning to the pool.
clear in interface IResourceclear in class ResourceIResource.release()public static IResourceFactory<CompressedMarshObjectConvertor> getFactory()
public long getUsedMemory()
getUsedMemory in interface IMemoryAwareResourceCopyright © GigaSpaces.