Modifier and Type | Method and Description |
---|---|
protected long |
calculateHeapCost(Object obj) |
void |
clear(boolean isDuringShutdown) |
boolean |
containsKey(Data key) |
void |
destroy(boolean isDuringShutdown) |
void |
disposeDeferredBlocks() |
MapEntriesWithCursor |
fetchEntries(int tableIndex,
int size,
SerializationService serializationService) |
MapKeysWithCursor |
fetchKeys(int tableIndex,
int size) |
R |
get(Data key) |
R |
getIfSameKey(Data key)
Gives the same result as
Storage.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(Data key,
R record) |
void |
removeRecord(R record) |
void |
setSizeEstimator(SizeEstimator sizeEstimator) |
int |
size() |
void |
updateRecordValue(Data key,
R record,
Object value) |
protected void |
updateSizeEstimator(long recordSize) |
Collection<R> |
values() |
public void clear(boolean isDuringShutdown)
public Collection<R> values()
public void updateRecordValue(Data key, R record, Object value)
updateRecordValue
in interface Storage<Data,R extends Record>
public R getIfSameKey(Data key)
Storage
Storage.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.getIfSameKey
in interface Storage<Data,R extends Record>
public void destroy(boolean isDuringShutdown)
public SizeEstimator getSizeEstimator()
getSizeEstimator
in interface Storage<Data,R extends Record>
public boolean containsKey(Data key)
containsKey
in interface Storage<Data,R extends Record>
public void removeRecord(R record)
removeRecord
in interface Storage<Data,R extends Record>
protected void updateSizeEstimator(long recordSize)
protected long calculateHeapCost(Object obj)
public void setSizeEstimator(SizeEstimator sizeEstimator)
setSizeEstimator
in interface Storage<Data,R extends Record>
public void disposeDeferredBlocks()
disposeDeferredBlocks
in interface Storage<Data,R extends Record>
public Iterable<LazyEntryViewFromRecord> getRandomSamples(int sampleCount)
Storage
getRandomSamples
in interface Storage<Data,R extends Record>
sampleCount
- sample count.public MapKeysWithCursor fetchKeys(int tableIndex, int size)
public MapEntriesWithCursor fetchEntries(int tableIndex, int size, SerializationService serializationService)
fetchEntries
in interface Storage<Data,R extends Record>
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.