public class CacheMarshaller210 extends CacheMarshaller200
CacheMarshaller200
, created to fix JBCACHE-1211.
To prevent ints taking too much space, they are written as variable-length ints. Details here on VInts.commandsFactory, IRE, MAGICNUMBER_ARRAY, MAGICNUMBER_ARRAY_LIST, MAGICNUMBER_BOOLEAN, MAGICNUMBER_BYTE, MAGICNUMBER_CHAR, MAGICNUMBER_DEFAULT_DATA_VERSION, MAGICNUMBER_DOUBLE, MAGICNUMBER_EXTENDED_RESPONSE, MAGICNUMBER_FASTCOPY_HASHMAP, MAGICNUMBER_FLOAT, MAGICNUMBER_FQN, MAGICNUMBER_GRAVITATERESULT, MAGICNUMBER_GTX, MAGICNUMBER_HASH_MAP, MAGICNUMBER_HASH_SET, MAGICNUMBER_IMMUTABLE_MAPCOPY, MAGICNUMBER_INTEGER, MAGICNUMBER_IPADDRESS, MAGICNUMBER_LINKED_LIST, MAGICNUMBER_LONG, MAGICNUMBER_MARSHALLEDVALUE, MAGICNUMBER_METHODCALL, MAGICNUMBER_NODEDATA, MAGICNUMBER_NODEDATA_EXCEPTION_MARKER, MAGICNUMBER_NODEDATA_MARKER, MAGICNUMBER_NULL, MAGICNUMBER_OBJECT, MAGICNUMBER_REF, MAGICNUMBER_REQUEST_IGNORED_RESPONSE, MAGICNUMBER_SERIALIZABLE, MAGICNUMBER_SHORT, MAGICNUMBER_STRING, MAGICNUMBER_TREE_MAP, MAGICNUMBER_TREE_SET, MAGICNUMBER_TXLOG_ENTRY
configuration, defaultClassLoader, defaultInactive, log, regionManager, trace, useRefs, useRegionBasedMarshalling
Constructor and Description |
---|
CacheMarshaller210() |
Modifier and Type | Method and Description |
---|---|
protected int |
readReference(ObjectInputStream in)
This version of readReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
|
protected int |
readUnsignedInt(ObjectInputStream in)
Reads an int stored in variable-length format.
|
protected long |
readUnsignedLong(ObjectInputStream in)
Reads an int stored in variable-length format.
|
protected void |
writeReference(ObjectOutputStream out,
int reference)
This version of writeReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
|
protected void |
writeUnsignedInt(ObjectOutputStream out,
int i)
Writes an int in a variable-length format.
|
protected void |
writeUnsignedLong(ObjectOutputStream out,
long i)
Writes an int in a variable-length format.
|
injectCommandsFactory, marshallDefaultDataVersion, marshallFqn, marshallObject, marshallString, objectFromObjectStream, objectFromObjectStreamRegionBased, objectToObjectStream, objectToObjectStream, regionalizedMethodCallFromObjectStream, unmarshallArray, unmarshallDefaultDataVersion, unmarshallFqn, unmarshallObject, unmarshallObject, unmarshallString
extractFqn, init, initLogger, objectFromByteBuffer, objectFromByteBuffer, objectFromStream, objectToBuffer, objectToByteBuffer, regionalizedMethodCallFromByteBuffer
protected void writeReference(ObjectOutputStream out, int reference) throws IOException
writeReference
in class CacheMarshaller200
out
- stream to write toreference
- reference to writeIOException
- propagated from OOSprotected int readReference(ObjectInputStream in) throws IOException
readReference
in class CacheMarshaller200
in
- stream to read fromIOException
- propagated from OUSprotected int readUnsignedInt(ObjectInputStream in) throws IOException
readUnsignedInt
in class CacheMarshaller200
IOException
protected void writeUnsignedInt(ObjectOutputStream out, int i) throws IOException
writeUnsignedInt
in class CacheMarshaller200
i
- int to writeIOException
protected long readUnsignedLong(ObjectInputStream in) throws IOException
readUnsignedLong
in class CacheMarshaller200
IOException
protected void writeUnsignedLong(ObjectOutputStream out, long i) throws IOException
writeUnsignedLong
in class CacheMarshaller200
i
- int to writeIOException
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.