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(IMemoryAwareResourcePool resourcePool) |
MarshObjectConvertor(IMemoryAwareResourcePool resourcePool,
ObjectInputStreamFactory objectInputStreamFactory) |
| 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<MarshObjectConvertor> |
getFactory() |
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) |
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 MarshObjectConvertor()
public MarshObjectConvertor(IMemoryAwareResourcePool resourcePool)
public MarshObjectConvertor(IMemoryAwareResourcePool resourcePool, ObjectInputStreamFactory objectInputStreamFactory)
public byte[] toBinary(Object o) throws IOException
toBinary in interface IMarshObjectConvertorIOExceptionprotected byte[] serializeToByteArray(Object o) throws IOException
IOExceptionpublic Object fromBinary(byte[] data) throws IOException, ClassNotFoundException
fromBinary in interface IMarshObjectConvertorIOExceptionClassNotFoundExceptionpublic 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.