public interface RecordStore
Modifier and Type | Method and Description |
---|---|
boolean |
canAcquireLock(Data key,
String caller,
long threadId) |
void |
checkIfLoaded() |
int |
clear() |
void |
clearPartition() |
boolean |
containsKey(Data dataKey) |
boolean |
containsValue(Object testValue) |
boolean |
delete(Data dataKey) |
void |
deleteRecord(Data key) |
Set<Map.Entry<Data,Data>> |
entrySetData() |
Object |
evict(Data key,
boolean backup) |
int |
evictAll(boolean backup)
Evicts all keys except locked ones.
|
void |
evictExpiredEntries(int percentage,
boolean backup)
Do expiration operations.
|
boolean |
extendLock(Data key,
String caller,
long threadId,
long ttl) |
void |
flush() |
boolean |
forceUnlock(Data dataKey) |
Object |
get(Data dataKey,
boolean backup)
Gets record from
RecordStore |
MapEntrySet |
getAll(Set<Data> keySet) |
long |
getHeapCost() |
String |
getLockOwnerInfo(Data key) |
MapContainer |
getMapContainer() |
com.hazelcast.map.mapstore.MapDataStore<Data,Object> |
getMapDataStore() |
Map.Entry<Data,Object> |
getMapEntry(Data dataKey) |
Map.Entry<Data,Object> |
getMapEntryForBackup(Data dataKey) |
String |
getName() |
int |
getPartitionId() |
com.hazelcast.map.record.Record |
getRecord(Data key) |
Map<Data,com.hazelcast.map.record.Record> |
getRecordMap()
Returns records map.
|
boolean |
isEmpty() |
boolean |
isExpirable() |
boolean |
isLoaded() |
boolean |
isLocked(Data key) |
Iterator<com.hazelcast.map.record.Record> |
iterator()
Iterates over record store values.
|
Set<Data> |
keySet() |
void |
loadAllFromStore(List<Data> keys,
boolean replaceExistingValues)
Loads all keys from defined map store.
|
Iterator<com.hazelcast.map.record.Record> |
loadAwareIterator()
Iterates over record store values but first waits map store to load.
|
boolean |
merge(Data dataKey,
EntryView mergingEntryView,
MapMergePolicy mergePolicy) |
Object |
put(Data dataKey,
Object dataValue,
long ttl) |
void |
put(Map.Entry<Data,Object> entry) |
com.hazelcast.map.record.Record |
putBackup(Data key,
Object value) |
com.hazelcast.map.record.Record |
putBackup(Data key,
Object value,
long ttl) |
Object |
putFromLoad(Data key,
Object value)
Puts key-value pair to map which is the result of a load from map store operation.
|
Object |
putFromLoad(Data key,
Object value,
long ttl)
Puts key-value pair to map which is the result of a load from map store operation.
|
Object |
putIfAbsent(Data dataKey,
Object value,
long ttl) |
void |
putRecord(Data key,
com.hazelcast.map.record.Record record)
Puts a data key and a record value to record-store.
|
void |
putTransient(Data dataKey,
Object value,
long ttl) |
Object |
remove(Data dataKey) |
boolean |
remove(Data dataKey,
Object testValue) |
void |
removeBackup(Data dataKey)
Similar to
remove(com.hazelcast.nio.serialization.Data)
except removeBackup doesn't touch mapstore since it does not return previous value. |
Object |
replace(Data dataKey,
Object update) |
boolean |
replace(Data dataKey,
Object expect,
Object update)
Sets the value to the given updated value
if
RecordFactory.isEquals(java.lang.Object, java.lang.Object) comparison
of current value and expected value is true . |
void |
reset() |
boolean |
set(Data dataKey,
Object value,
long ttl) |
void |
setLoaded(boolean loaded) |
int |
size() |
boolean |
tryPut(Data dataKey,
Object value,
long ttl) |
boolean |
txnLock(Data key,
String caller,
long threadId,
long ttl) |
boolean |
unlock(Data key,
String caller,
long threadId) |
Collection<Data> |
valuesData() |
String getName()
boolean delete(Data dataKey)
void removeBackup(Data dataKey)
remove(com.hazelcast.nio.serialization.Data)
except removeBackup doesn't touch mapstore since it does not return previous value.Object get(Data dataKey, boolean backup)
RecordStore
dataKey
- key.backup
- true
if a backup partition, otherwise false
.RecordStore
MapEntrySet getAll(Set<Data> keySet)
boolean containsKey(Data dataKey)
boolean replace(Data dataKey, Object expect, Object update)
RecordFactory.isEquals(java.lang.Object, java.lang.Object)
comparison
of current value and expected value is true
.dataKey
- key which's value is requested to be replaced.expect
- the expected valueupdate
- the new valuetrue
if successful. False return indicates that
the actual value was not equal to the expected value.Object putFromLoad(Data key, Object value)
key
- key to put.value
- to put.com.hazelcast.map.operation.PutFromLoadAllOperation}
Object putFromLoad(Data key, Object value, long ttl)
key
- key to put.value
- to put.ttl
- time to live seconds.com.hazelcast.map.operation.PutAllOperation}
boolean merge(Data dataKey, EntryView mergingEntryView, MapMergePolicy mergePolicy)
com.hazelcast.map.record.Record getRecord(Data key)
void putRecord(Data key, com.hazelcast.map.record.Record record)
key
- the data key to put record store.record
- the value for record store.com.hazelcast.map.operation.MapReplicationOperation}
void deleteRecord(Data key)
Iterator<com.hazelcast.map.record.Record> iterator()
Iterator<com.hazelcast.map.record.Record> loadAwareIterator()
IMap.keySet(com.hazelcast.query.Predicate)
,
this method can be used to return a read-only iterator.Map<Data,com.hazelcast.map.record.Record> getRecordMap()
RecordStoreLoader
int size()
boolean isLocked(Data key)
boolean containsValue(Object testValue)
int evictAll(boolean backup)
backup
- true
if a backup partition, otherwise false
.Collection<Data> valuesData()
MapContainer getMapContainer()
void flush()
void clearPartition()
void reset()
boolean forceUnlock(Data dataKey)
long getHeapCost()
boolean isLoaded()
void checkIfLoaded()
void setLoaded(boolean loaded)
int clear()
boolean isEmpty()
void evictExpiredEntries(int percentage, boolean backup)
percentage
- of max expirables according to the record store size.backup
- true
if a backup partition, otherwise false
.boolean isExpirable()
true
if record store has at least one candidate entry
for expiration else return false
.void loadAllFromStore(List<Data> keys, boolean replaceExistingValues)
keys
- keys to be loaded.replaceExistingValues
- true
if need to replace existing values otherwise false
int getPartitionId()
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.