use of com.hazelcast.map.EntryLoader.MetadataAwareValue in project hazelcast by hazelcast.
the class WriteThroughStore method add.
@Override
public Object add(Data key, Object value, long expirationTime, long time, UUID transactionId) {
Object objectKey = toObject(key);
Object objectValue = toObject(value);
if (getStore().isWithExpirationTime()) {
expirationTime = getUserExpirationTime(expirationTime);
getStore().store(objectKey, new MetadataAwareValue(objectValue, expirationTime));
} else {
getStore().store(objectKey, objectValue);
}
// if store is not a post-processing map-store, then avoid extra de-serialization phase.
return getStore().isPostProcessingMapStore() ? objectValue : value;
}
use of com.hazelcast.map.EntryLoader.MetadataAwareValue in project hazelcast by hazelcast.
the class ExtendedValueTest method testWithNoDate.
@Test
public void testWithNoDate() {
MetadataAwareValue entry = new MetadataAwareValue<>("value");
assertEquals(NO_TIME_SET, entry.getExpirationTime());
}
Aggregations