K
- the key type to be put in this storage.R
- the value type to be put in this storage.public interface Storage<K,R>
RecordStore
.
Includes basic storage operations.Modifier and Type | Method and Description |
---|---|
void |
clear(boolean isDuringShutdown) |
boolean |
containsKey(K key) |
void |
destroy(boolean isDuringShutdown) |
void |
disposeDeferredBlocks() |
MapEntriesWithCursor |
fetchEntries(int tableIndex,
int size,
SerializationService serializationService) |
MapKeysWithCursor |
fetchKeys(int tableIndex,
int size) |
R |
get(K key) |
R |
getIfSameKey(K key)
Gives the same result as
get(Object) , but with the additional constraint
that the supplied key must not just be equal to, but be exactly the same key blob (at the
same memory address) as the one stored. |
Iterable<LazyEntryViewFromRecord> |
getRandomSamples(int sampleCount)
Used for sampling based eviction, returns sampled entries.
|
SizeEstimator |
getSizeEstimator() |
boolean |
isEmpty() |
void |
put(K key,
R record) |
void |
removeRecord(R record) |
void |
setSizeEstimator(SizeEstimator sizeEstimator) |
int |
size() |
void |
updateRecordValue(K key,
R record,
Object value) |
Collection<R> |
values() |
R getIfSameKey(K key)
get(Object)
, but with the additional constraint
that the supplied key must not just be equal to, but be exactly the same key blob (at the
same memory address) as the one stored. The implementation of this method is only needed
for the HD memory-based implementations.void removeRecord(R record)
boolean containsKey(K key)
Collection<R> values()
int size()
boolean isEmpty()
void clear(boolean isDuringShutdown)
void destroy(boolean isDuringShutdown)
SizeEstimator getSizeEstimator()
void setSizeEstimator(SizeEstimator sizeEstimator)
void disposeDeferredBlocks()
Iterable<LazyEntryViewFromRecord> getRandomSamples(int sampleCount)
sampleCount
- sample count.MapKeysWithCursor fetchKeys(int tableIndex, int size)
MapEntriesWithCursor fetchEntries(int tableIndex, int size, SerializationService serializationService)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.