Class EnumSerializer
java.lang.Object
org.apache.geode.DataSerializer
org.springframework.data.gemfire.serialization.EnumSerializer
- All Implemented Interfaces:
Serializable
Generic serializer for all Java Enums. The class needs to be registered only once. Custom enums will then
be understood by the converter by calling
addEnum(Class)
.- See Also:
-
Serializable
DataSerializer
- Serialized Form
-
Field Summary
Fields inherited from class org.apache.geode.DataSerializer
DISALLOW_JAVA_SERIALIZATION, TRACE_SERIALIZABLE
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.geode.DataSerializer
equals, getContext, getEventId, hashCode, readArrayList, readArrayOfByteArrays, readBoolean, readBooleanArray, readByte, readByteArray, readCharacter, readCharArray, readClass, readConcurrentHashMap, readDate, readDouble, readDoubleArray, readEnum, readFile, readFloat, readFloatArray, readHashMap, readHashSet, readHashtable, readIdentityHashMap, readInetAddress, readIntArray, readInteger, readLinkedHashMap, readLinkedHashSet, readLinkedList, readLong, readLongArray, readNonPrimitiveClassName, readObject, readObjectArray, readPrimitiveBoolean, readPrimitiveByte, readPrimitiveChar, readPrimitiveDouble, readPrimitiveFloat, readPrimitiveInt, readPrimitiveLong, readPrimitiveShort, readProperties, readRegion, readShort, readShortArray, readStack, readString, readStringArray, readTreeMap, readTreeSet, readUnsignedByte, readUnsignedShort, readVector, register, setContext, setEventId, writeArrayList, writeArrayOfByteArrays, writeBoolean, writeBooleanArray, writeByte, writeByteArray, writeByteArray, writeCharacter, writeCharArray, writeClass, writeConcurrentHashMap, writeDate, writeDouble, writeDoubleArray, writeEnum, writeFile, writeFloat, writeFloatArray, writeHashMap, writeHashSet, writeHashtable, writeIdentityHashMap, writeInetAddress, writeIntArray, writeInteger, writeLinkedHashMap, writeLinkedHashSet, writeLinkedList, writeLong, writeLongArray, writeNonPrimitiveClassName, writeObject, writeObject, writeObjectArray, writeObjectAsByteArray, writePrimitiveBoolean, writePrimitiveByte, writePrimitiveChar, writePrimitiveDouble, writePrimitiveFloat, writePrimitiveInt, writePrimitiveLong, writePrimitiveShort, writeProperties, writeRegion, writeShort, writeShortArray, writeStack, writeString, writeStringArray, writeTreeMap, writeTreeSet, writeUnsignedByte, writeUnsignedShort, writeVector
-
Constructor Details
-
EnumSerializer
public EnumSerializer()
-
-
Method Details
-
toData
- Specified by:
toData
in classorg.apache.geode.DataSerializer
- Throws:
IOException
-
fromData
- Specified by:
fromData
in classorg.apache.geode.DataSerializer
- Throws:
IOException
ClassNotFoundException
-
addEnum
-
setId
public void setId(int id) Sets the id of this serializer. Default is 1024.- Parameters:
id
- identifier to set on this serializer.
-
getId
public int getId()- Specified by:
getId
in classorg.apache.geode.DataSerializer
-
getSupportedClasses
- Specified by:
getSupportedClasses
in classorg.apache.geode.DataSerializer
-