public class MarshObjectConvertor extends Resource implements MarshObjectConvertorResource
ResourcePool only.| Modifier and Type | Class and Description |
|---|---|
protected static class |
MarshObjectConvertor.MarshObjectConvertorFactory |
| Constructor and Description |
|---|
MarshObjectConvertor() |
MarshObjectConvertor(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<MarshObjectConvertor> |
getFactory() |
MarshObject |
getMarshObject(Object o)
Convert Object to MarshObject
|
Object |
getObject(byte[] bytes) |
Object |
getObject(MarshObject marsh)
Convert MarshObject to Object
|
protected ObjectInputStream |
getObjectInputStream(InputStream is)
Wrap given InputStream with ObjectInputStream
|
protected ObjectOutputStream |
getObjectOutputStream(OutputStream os)
Wrap given OutputStream with ObjectInputStream
|
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 MarshObjectConvertor()
public MarshObjectConvertor(ISmartLengthBasedCacheCallback cacheCallback)
public MarshObject getMarshObject(Object o) throws IOException
IMarshObjectConvertorgetMarshObject in interface IMarshObjectConvertoro - Original objectIOExceptionprotected byte[] serializeToByteArray(Object o) throws IOException
IOExceptionpublic Object getObject(MarshObject marsh) throws IOException, ClassNotFoundException
IMarshObjectConvertorgetObject in interface IMarshObjectConvertormarsh - MarshObject to convertIOExceptionClassNotFoundExceptionpublic Object getObject(byte[] bytes) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic 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()protected ObjectInputStream getObjectInputStream(InputStream is) throws IOException
IOExceptionprotected ObjectOutputStream getObjectOutputStream(OutputStream os) throws IOException
IOExceptionpublic static IResourceFactory<MarshObjectConvertor> getFactory()
public long getUsedMemory()
getUsedMemory in interface IMemoryAwareResourceCopyright © GigaSpaces.