com.hazelcast.cache.impl.record
Class CacheRecordFactory<R extends CacheRecord>
java.lang.Object
com.hazelcast.cache.impl.record.CacheRecordFactory<R>
public class CacheRecordFactory<R extends CacheRecord>
- extends Object
Provides factory for CacheRecord
.
Key, value and expiryTime are packed into a subclass of
AbstractCacheRecord
depending on the configured inMemoryFormat.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
inMemoryFormat
protected InMemoryFormat inMemoryFormat
serializationService
protected SerializationService serializationService
CacheRecordFactory
public CacheRecordFactory(InMemoryFormat inMemoryFormat,
SerializationService serializationService)
newRecord
public R newRecord(Object value)
newRecordWithExpiry
public R newRecordWithExpiry(Object value,
long creationTime,
long expiryTime)
createCacheDataRecord
protected CacheRecord createCacheDataRecord(Data dataValue,
long creationTime,
long expiryTime)
createCacheObjectRecord
protected CacheRecord createCacheObjectRecord(Object objectValue,
long creationTime,
long expiryTime)
isExpiredAt
public static boolean isExpiredAt(long expirationTime,
long now)
- Determines whether the Cache Entry associated with this value would be expired
at the specified time.
- Parameters:
now
- time in milliseconds (since the Epoc).
- Returns:
- true if the value would be expired at the specified time.
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.