public class BinaryMapStore extends Object implements BinaryStore, BinaryStore.SizeAware, com.oracle.coherence.common.base.Disposable
BinaryStore.KeySetAware, BinaryStore.SizeAware
Constructor and Description |
---|
BinaryMapStore(BinaryMap map)
Construct a BinaryMapStore object, which is an implementation of
the BinaryStore interface backed by a BinaryMap.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
use the Disposable interface instead
|
void |
dispose()
Invoked when all resources owned by the implementer can safely be
released.
|
void |
erase(Binary binKey)
Remove the specified key from the underlying store if present.
|
void |
eraseAll()
Remove all data from the underlying store.
|
BinaryMap |
getBinaryMap()
Obtain the underlying BinaryMap.
|
Iterator |
keys()
Iterate all keys in the underlying store.
|
Binary |
load(Binary binKey)
Return the value associated with the specified key, or null if the
key does not have an associated value in the underlying store.
|
int |
size()
Determine the number of keys in the BinaryStore.
|
void |
store(Binary binKey,
Binary binValue)
Store the specified value under the specific key in the underlying
store.
|
public BinaryMapStore(BinaryMap map)
map
- the BinaryMap to use for storage for this BinaryStore
implementationpublic BinaryMap getBinaryMap()
public Binary load(Binary binKey)
load
in interface BinaryStore
binKey
- key whose associated value is to be returnedpublic void store(Binary binKey, Binary binValue)
store
in interface BinaryStore
binKey
- key to store the value underbinValue
- value to be storedpublic void erase(Binary binKey)
erase
in interface BinaryStore
binKey
- key whose mapping is to be removed from the mappublic void eraseAll()
eraseAll
in interface BinaryStore
public Iterator keys()
keys
in interface BinaryStore
public int size()
size
in interface BinaryStore.SizeAware
public void dispose()
Once disposed of the object should no longer be considered to be usable.
Note the Disposable interface is compatible with try-with-resources which will automatically invoke this method.
dispose
in interface com.oracle.coherence.common.base.Disposable
public void close()
close
in interface com.oracle.coherence.common.base.Disposable
close
in interface AutoCloseable