public class ObjectIdCompactSerializer extends Object implements CompactSerializer<org.bson.types.ObjectId>
ObjectId
.Constructor and Description |
---|
ObjectIdCompactSerializer() |
Modifier and Type | Method and Description |
---|---|
Class<org.bson.types.ObjectId> |
getCompactClass() |
String |
getTypeName()
Returns the unique type name for the class
T . |
org.bson.types.ObjectId |
read(CompactReader reader) |
void |
write(CompactWriter writer,
org.bson.types.ObjectId object) |
@Nonnull public org.bson.types.ObjectId read(@Nonnull CompactReader reader)
read
in interface CompactSerializer<org.bson.types.ObjectId>
reader
- reader to read fields of an objectpublic void write(@Nonnull CompactWriter writer, @Nonnull org.bson.types.ObjectId object)
write
in interface CompactSerializer<org.bson.types.ObjectId>
writer
- CompactWriter to serialize the fields ontoobject
- to be serialized.@Nonnull public String getTypeName()
CompactSerializer
T
.
If the class T
is ever evolved by adding or removing fields, the
type name for the evolved serializers must be the same with the initial
version.
getTypeName
in interface CompactSerializer<org.bson.types.ObjectId>
@Nonnull public Class<org.bson.types.ObjectId> getCompactClass()
getCompactClass
in interface CompactSerializer<org.bson.types.ObjectId>
Copyright © 2023 Hazelcast, Inc.. All rights reserved.