Search in sources :

Example 16 with QueryCacheRecord

use of com.hazelcast.map.impl.querycache.subscriber.record.QueryCacheRecord in project hazelcast by hazelcast.

the class DefaultQueryCacheRecordStore method addWithoutEvictionCheck.

/**
 * Similar to {@link #addWithoutEvictionCheck} with explicit
 * {@link CachedQueryEntry} arguments, to be reused when saving to index.
 * Suitable for usage with {@link #addBatch(Iterator, BiConsumer)}.
 */
public QueryCacheRecord addWithoutEvictionCheck(Data keyData, Data valueData, CachedQueryEntry newEntry, CachedQueryEntry oldEntry) {
    QueryCacheRecord newRecord = recordFactory.createRecord(valueData);
    QueryCacheRecord oldRecord = cache.put(toQueryCacheKey(keyData), newRecord);
    saveIndex(keyData, newRecord, oldRecord, newEntry, oldEntry);
    return oldRecord;
}
Also used : QueryCacheRecord(com.hazelcast.map.impl.querycache.subscriber.record.QueryCacheRecord)

Aggregations

QueryCacheRecord (com.hazelcast.map.impl.querycache.subscriber.record.QueryCacheRecord)16 Map (java.util.Map)7 Data (com.hazelcast.nio.serialization.Data)6 CachedQueryEntry (com.hazelcast.query.impl.CachedQueryEntry)6 InternalSerializationService (com.hazelcast.internal.serialization.InternalSerializationService)5 IMap (com.hazelcast.core.IMap)4 Data (com.hazelcast.internal.serialization.Data)3 AbstractMap (java.util.AbstractMap)3 IMap (com.hazelcast.map.IMap)2 QueryEntry (com.hazelcast.query.impl.QueryEntry)2 QueryableEntry (com.hazelcast.query.impl.QueryableEntry)2 ConcurrentMap (java.util.concurrent.ConcurrentMap)2 IndexConfig (com.hazelcast.config.IndexConfig)1