Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.io
Class AbstractBinaryStore

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.io.AbstractBinaryStore

All Implemented Interfaces:
BinaryStore
Direct Known Subclasses:
BerkeleyDBBinaryStore

public abstract class AbstractBinaryStore
extends Base
implements BinaryStore

Abstract implementation of the BinaryStore interface.

Author:
cp 2003.05.30

Nested Class Summary

 

Nested classes/interfaces inherited from interface com.tangosol.io.BinaryStore
BinaryStore.SizeAware

 

Constructor Summary
AbstractBinaryStore()
           

 

Method Summary
 void erase(Binary binKey)
          Remove the specified key from the underlying store if present.
 void eraseAll()
          Remove all data from the underlying store.
static java.io.File getDefaultDirectory()
          Obtain a File object for the default directory to use for file storage.
 java.util.Iterator keys()
          Iterate all keys in the underlying store.
abstract  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

AbstractBinaryStore

public AbstractBinaryStore()

Method Detail

load

public abstract 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:
java.lang.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:
java.lang.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:
java.lang.UnsupportedOperationException - if this implementation or the underlying store is read-only

keys

public java.util.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:
java.lang.UnsupportedOperationException - if the underlying store is not iterable

getDefaultDirectory

public static java.io.File getDefaultDirectory()
Obtain a File object for the default directory to use for file storage. The default directory is defined by the "java.io.tmpdir" system property.
Returns:
a File object representing the location of the default directory

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.