Class IntegerMarshaller
java.lang.Object
org.apache.activemq.store.kahadb.disk.util.IntegerMarshaller
- All Implemented Interfaces:
Marshaller<Integer>
Implementation of a Marshaller for a Integer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanreadPayload(DataInput dataIn) Read the payload of the object from the DataInput stream.voidwritePayload(Integer object, DataOutput dataOut) Write the payload of the object to the DataOutput stream.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
IntegerMarshaller
public IntegerMarshaller()
-
-
Method Details
-
writePayload
Description copied from interface:MarshallerWrite the payload of the object to the DataOutput stream.- Specified by:
writePayloadin interfaceMarshaller<Integer>- Throws:
IOException
-
readPayload
Description copied from interface:MarshallerRead the payload of the object from the DataInput stream.- Specified by:
readPayloadin interfaceMarshaller<Integer>- Returns:
- unmarshalled object
- Throws:
IOException
-
getFixedSize
public int getFixedSize()- Specified by:
getFixedSizein interfaceMarshaller<Integer>- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
-
deepCopy
- Specified by:
deepCopyin interfaceMarshaller<Integer>- Returns:
- the source object since integers are immutable.
-
isDeepCopySupported
public boolean isDeepCopySupported()- Specified by:
isDeepCopySupportedin interfaceMarshaller<Integer>- Returns:
- true if the
Marshaller.deepCopy(Object)operations is supported.
-