CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.io.nio
Class BinaryMapStore

java.lang.Object
  extended by com.tangosol.io.nio.BinaryMapStore
All Implemented Interfaces:
BinaryStore

public class BinaryMapStore
extends Object
implements BinaryStore

An implementation of BinaryStore backed by a BinaryMap.

Since:
Coherence 2.4
Author:
cp 2004.03.31

Constructor Summary
BinaryMapStore(BinaryMap map)
          Construct a BinaryMapStore object, which is an implementation of the BinaryStore interface backed by a BinaryMap.
 
Method Summary
 void close()
          Release underlying resources.
 void erase(Binary binKey)
          Remove the specified key from the underlying store if present.
 void eraseAll()
          Remove all data from the underlying store.
 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.
 void store(Binary binKey, Binary binValue)
          Store the specified value under the specific key in the underlying store.
 

Constructor Detail

BinaryMapStore

public BinaryMapStore(BinaryMap map)
Construct a BinaryMapStore object, which is an implementation of the BinaryStore interface backed by a BinaryMap.

Parameters:
map - the BinaryMap to use for storage for this BinaryStore implementation
Method Detail

load

public 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.

Specified by:
load in interface BinaryStore
Parameters:
binKey - key whose associated value is to be returned
Returns:
the value associated with the specified key, or null if no value is available for that key

store

public void store(Binary binKey,
                  Binary binValue)
Store the specified value under the specific key in the underlying store. This method is intended to support both key/value creation and value update for a specific key.

Specified by:
store in interface BinaryStore
Parameters:
binKey - key to store the value under
binValue - value to be stored
Throws:
UnsupportedOperationException - if this implementation or the underlying store is read-only

erase

public void erase(Binary binKey)
Remove the specified key from the underlying store if present.

Specified by:
erase in interface BinaryStore
Parameters:
binKey - key whose mapping is to be removed from the map
Throws:
UnsupportedOperationException - if this implementation or the underlying store is read-only

eraseAll

public void eraseAll()
Remove all data from the underlying store.

Specified by:
eraseAll in interface BinaryStore
Throws:
UnsupportedOperationException - if this implementation or the underlying store is read-only

keys

public Iterator keys()
Iterate all keys in the underlying store.

Specified by:
keys in interface BinaryStore
Returns:
a read-only iterator of the keys in the underlying store
Throws:
UnsupportedOperationException - if the underlying store is not iterable

close

public void close()
Release underlying resources.


CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation