use of com.hazelcast.internal.serialization.impl.compact.DefaultCompactReader in project hazelcast by hazelcast.
the class JavaRecordSerializer method read.
@Nonnull
@Override
public Object read(@Nonnull CompactReader reader) {
DefaultCompactReader compactReader = (DefaultCompactReader) reader;
Class<?> associatedClass = requireNonNull(compactReader.getAssociatedClass(), "AssociatedClass is required for JavaRecordSerializer");
JavaRecordReader recordReader = readersCache.get(associatedClass);
if (recordReader == null) {
populateReadersWriters(associatedClass);
recordReader = readersCache.get(associatedClass);
}
return recordReader.readRecord(compactReader, compactReader.getSchema());
}
Aggregations