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,
IMemoryAwareResourcePool resourcePool) |
CompressedMarshObjectConvertor(int level,
IMemoryAwareResourcePool resourcePool,
ObjectInputStreamFactory objectInputStreamFactory,
boolean idempotent) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Cleans the resource of its contents so it can be returned to the pool.
|
Object |
fromBinary(byte[] data) |
static IResourceFactory<CompressedMarshObjectConvertor> |
getFactory() |
protected ObjectInputStream |
getObjectInputStream(InputStream is) |
protected ObjectOutputStream |
getObjectOutputStream(OutputStream is) |
long |
getUsedMemory() |
protected byte[] |
serializeToByteArray(Object o) |
byte[] |
toBinary(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)
level - the compression level (0-9), The default setting is DEFAULT_COMPRESSION.IllegalArgumentException - if the compression level is invalidpublic CompressedMarshObjectConvertor(int level,
IMemoryAwareResourcePool resourcePool)
public CompressedMarshObjectConvertor(int level,
IMemoryAwareResourcePool resourcePool,
ObjectInputStreamFactory objectInputStreamFactory,
boolean idempotent)
protected byte[] serializeToByteArray(Object o) throws IOException
IOExceptionpublic byte[] toBinary(Object o) throws IOException
toBinary in interface IMarshObjectConvertorIOExceptionpublic Object fromBinary(byte[] data) throws IOException, ClassNotFoundException
fromBinary in interface IMarshObjectConvertorIOExceptionClassNotFoundExceptionprotected 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.