Class HotRodEntryMarshaller
java.lang.Object
org.infinispan.persistence.remote.wrapper.HotRodEntryMarshaller
- All Implemented Interfaces:
Marshaller
@Deprecated(forRemoval=true)
public class HotRodEntryMarshaller
extends Object
implements Marshaller
Deprecated, for removal: This API element is subject to removal in a future version.
HotRodEntryMarshaller.
- Since:
- 5.2
- Author:
- Tristan Tarrant
-
Constructor Summary
ConstructorDescriptionHotRodEntryMarshaller
(ByteBufferFactory byteBufferFactory) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Returns a marshalled payload size predictor for a particular type.boolean
Deprecated, for removal: This API element is subject to removal in a future version.A method that checks whether the given object is marshallable as per the rules of this marshaller.Deprecated, for removal: This API element is subject to removal in a future version.objectFromByteBuffer
(byte[] buf) Deprecated, for removal: This API element is subject to removal in a future version.Unmarshalls an object from a byte array.objectFromByteBuffer
(byte[] buf, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.Unmarshalls an object from a specific portion of a byte array.Deprecated, for removal: This API element is subject to removal in a future version.A method that returns an instance ofByteBuffer
, which allows direct access to the byte array with minimal array copyingbyte[]
objectToByteBuffer
(Object obj) Deprecated, for removal: This API element is subject to removal in a future version.Marshalls an object to a byte array.byte[]
objectToByteBuffer
(Object obj, int estimatedSize) Deprecated, for removal: This API element is subject to removal in a future version.Marshalls an object to a byte array.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.commons.marshall.Marshaller
initialize, start, stop
-
Constructor Details
-
HotRodEntryMarshaller
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
objectToByteBuffer
public byte[] objectToByteBuffer(Object obj, int estimatedSize) throws IOException, InterruptedException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Marshaller
Marshalls an object to a byte array. The estimatedSize parameter is a hint that can be passed in to allow for efficient sizing of the byte array before attempting to marshall the object. The more accurate this estimate is, the less likely byte[]s will need to be resized to hold the byte stream generated by marshalling the object.- Specified by:
objectToByteBuffer
in interfaceMarshaller
- Parameters:
obj
- object to convert to a byte array. Must not be null.estimatedSize
- an estimate of how large the resulting byte array may be- Returns:
- a byte array with the marshalled form of the object
- Throws:
IOException
- if marshalling cannot complete due to some I/O errorInterruptedException
- if the marshalling was interrupted. Clients should take this as a sign that the marshaller is no longer available, maybe due to shutdown, and so no more unmarshalling should be attempted.
-
objectToByteBuffer
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Marshaller
Marshalls an object to a byte array.- Specified by:
objectToByteBuffer
in interfaceMarshaller
- Parameters:
obj
- object to convert to a byte array. Must not be null.- Returns:
- a byte array
- Throws:
IOException
- if marshalling cannot complete due to some I/O errorInterruptedException
- if the marshalling process was interrupted. Clients should take this as a sign that the marshaller is no longer available, maybe due to shutdown, and so no more marshalling should be attempted.
-
objectFromByteBuffer
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Marshaller
Unmarshalls an object from a byte array.- Specified by:
objectFromByteBuffer
in interfaceMarshaller
- Parameters:
buf
- byte array containing the binary representation of an object. Must not be null.- Returns:
- an object
- Throws:
IOException
- if unmarshalling cannot complete due to some I/O errorClassNotFoundException
- if the class of the object trying to unmarshall is unknown
-
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Marshaller
Unmarshalls an object from a specific portion of a byte array.- Specified by:
objectFromByteBuffer
in interfaceMarshaller
- Parameters:
buf
- byte array containing the binary representation of an object. Must not be null.offset
- point in buffer to start readinglength
- number of bytes to consider- Returns:
- an object
- Throws:
IOException
- if unmarshalling cannot complete due to some I/O errorClassNotFoundException
- if the class of the object trying to unmarshall is unknown
-
objectToBuffer
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Marshaller
A method that returns an instance ofByteBuffer
, which allows direct access to the byte array with minimal array copying- Specified by:
objectToBuffer
in interfaceMarshaller
- Parameters:
o
- object to marshall- Throws:
IOException
- if marshalling cannot complete due to some I/O errorInterruptedException
- if the marshalling process was interrupted. Clients should take this as a sign that the marshaller is no longer available, maybe due to shutdown, and so no more marshalling should be attempted.
-
isMarshallable
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Marshaller
A method that checks whether the given object is marshallable as per the rules of this marshaller.- Specified by:
isMarshallable
in interfaceMarshaller
- Parameters:
o
- object to verify whether it's marshallable or not- Returns:
- true if the object is marshallable, otherwise false
- Throws:
Exception
- if while checking whether the object was serializable or not, an exception arose
-
getBufferSizePredictor
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Marshaller
Returns a marshalled payload size predictor for a particular type. Accurate prediction of a type's serialized payload size helps avoid unnecessary copying and speeds up application performance.- Specified by:
getBufferSizePredictor
in interfaceMarshaller
- Parameters:
o
- Object for which serialized predictor will be returned- Returns:
- an instance of
BufferSizePredictor
-
mediaType
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
mediaType
in interfaceMarshaller
- Returns:
- the
MediaType
associated with the content produced by the marshaller
-
IdentityMarshaller
instead.