Class ObjectIdCompactSerializer
- java.lang.Object
-
- com.hazelcast.jet.mongodb.compact.ObjectIdCompactSerializer
-
- All Implemented Interfaces:
CompactSerializer<org.bson.types.ObjectId>
public class ObjectIdCompactSerializer extends java.lang.Object implements CompactSerializer<org.bson.types.ObjectId>
Compact serializer forObjectId
.
-
-
Constructor Summary
Constructors Constructor Description ObjectIdCompactSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<org.bson.types.ObjectId>
getCompactClass()
java.lang.String
getTypeName()
Returns the unique type name for the classCompactSerializer
.org.bson.types.ObjectId
read(CompactReader reader)
void
write(CompactWriter writer, org.bson.types.ObjectId object)
-
-
-
Method Detail
-
read
@Nonnull public org.bson.types.ObjectId read(@Nonnull CompactReader reader)
- Specified by:
read
in interfaceCompactSerializer<org.bson.types.ObjectId>
- Parameters:
reader
- reader to read fields of an object- Returns:
- the object created as a result of read method
-
write
public void write(@Nonnull CompactWriter writer, @Nonnull org.bson.types.ObjectId object)
- Specified by:
write
in interfaceCompactSerializer<org.bson.types.ObjectId>
- Parameters:
writer
- CompactWriter to serialize the fields ontoobject
- to be serialized.
-
getTypeName
@Nonnull public java.lang.String getTypeName()
Description copied from interface:CompactSerializer
Returns the unique type name for the classCompactSerializer
.If the class
CompactSerializer
is ever evolved by adding or removing fields, the type name for the evolved serializers must be the same with the initial version.- Specified by:
getTypeName
in interfaceCompactSerializer<org.bson.types.ObjectId>
- Returns:
- the type name
-
getCompactClass
@Nonnull public java.lang.Class<org.bson.types.ObjectId> getCompactClass()
- Specified by:
getCompactClass
in interfaceCompactSerializer<org.bson.types.ObjectId>
- Returns:
- the class to be serialized with this serializer.
-
-