use of org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordDataV1Serializer.EncryptedDataEntry in project ignite by apache.
the class StandaloneWalRecordsIterator method postProcessDataEntry.
/**
* Converts entry or lazy data entry into unwrapped entry
*
* @param processor cache object processor for de-serializing objects.
* @param fakeCacheObjCtx cache object context for de-serializing binary and unwrapping objects.
* @param dataEntry entry to process
* @return post precessed entry
* @throws IgniteCheckedException if failed
*/
@NotNull
private DataEntry postProcessDataEntry(final IgniteCacheObjectProcessor processor, final CacheObjectContext fakeCacheObjCtx, final DataEntry dataEntry) throws IgniteCheckedException {
if (dataEntry instanceof EncryptedDataEntry)
return dataEntry;
final KeyCacheObject key;
final CacheObject val;
boolean keepBinary = this.keepBinary || !fakeCacheObjCtx.kernalContext().marshallerContext().initialized();
if (dataEntry instanceof MarshalledDataEntry) {
final MarshalledDataEntry lazyDataEntry = (MarshalledDataEntry) dataEntry;
key = processor.toKeyCacheObject(fakeCacheObjCtx, lazyDataEntry.getKeyType(), lazyDataEntry.getKeyBytes());
final byte type = lazyDataEntry.getValType();
val = type == 0 ? null : processor.toCacheObject(fakeCacheObjCtx, type, lazyDataEntry.getValBytes());
} else {
key = dataEntry.key();
val = dataEntry.value();
}
return unwrapDataEntry(fakeCacheObjCtx, dataEntry, key, val, keepBinary);
}
Aggregations