|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ToolkitStore<K,V>
A Key-Value store used for storing key-value mappings. No eviction can happen on a Store. A key-value store can be
configured using various configs available in ToolkitConfigFields
. Consult
Toolkit.getStore(String, Configuration, Class)
for more info on various configs.
Consult the Toolkit class level docs for more info on behavior regarding destroy.
Trying to add values that are not serializable will throw NotSerializableRuntimeException
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Method Summary | |
---|---|
boolean |
containsValue(Object value)
Check if the value is contained in the store. |
ToolkitReadWriteLock |
createLockForKey(K key)
Creates a ToolkitReadWriteLock for the given key. |
Map<K,V> |
getAll(Collection<? extends K> keys)
Perform get for the given set of keys. |
Configuration |
getConfiguration()
Returns the configuration of this key-value store. |
void |
putNoReturn(K key,
V value)
Behaves the same as the standard Map.put(Object, Object) method except that the previous value is not
returned. |
void |
removeNoReturn(Object key)
Behaves the same as the standard Map.remove(Object) method except that the previous value is not returned. |
void |
setConfigField(String name,
Serializable value)
Updates the configuration of the Store using passed in value. |
Methods inherited from interface java.util.concurrent.ConcurrentMap |
---|
putIfAbsent, remove, replace, replace |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from interface org.terracotta.toolkit.object.Destroyable |
---|
destroy, isDestroyed |
Methods inherited from interface org.terracotta.toolkit.search.SearchableMap |
---|
createQueryBuilder, setAttributeExtractor |
Methods inherited from interface org.terracotta.toolkit.bulkload.ToolkitBulkLoadObject |
---|
isBulkLoadEnabled, isNodeBulkLoadEnabled, setNodeBulkLoadEnabled, waitUntilBulkLoadComplete |
Methods inherited from interface org.terracotta.toolkit.object.ToolkitObject |
---|
getName |
Method Detail |
---|
boolean containsValue(Object value)
UnsupportedOperationException
containsValue
in interface Map<K,V>
void removeNoReturn(Object key)
Map.remove(Object)
method except that the previous value is not returned.
This may provide significant performance improvements when the old value is not required.
key
- the key of the entry to removevoid putNoReturn(K key, V value)
Map.put(Object, Object)
method except that the previous value is not
returned. This may provide significant performance improvements when old value is not required.
key
- the key of the entryvalue
- the value of the entryMap<K,V> getAll(Collection<? extends K> keys)
keys
- the collection of keys to lookup
Configuration getConfiguration()
void setConfigField(String name, Serializable value)
IllegalArgumentException
if the config
field name
is not dynamic and cannot be changed at runtime
ToolkitReadWriteLock createLockForKey(K key)
ToolkitReadWriteLock
for the given key.
NOTE: ToolkitObject.getName()
on the ToolkitReadWriteLock
,
ToolkitReadWriteLock.readLock()
and ToolkitReadWriteLock.writeLock()
will return null
key
- the key for which a lock will be returned
ToolkitReadWriteLock
that can be used to perform primitive locking operations on the
key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |