Oracle® Coherence Java API Reference
v3.5

E14977-01

com.tangosol.net.cache
Class SerializationPagedCache.WrapperBinaryStore

java.lang.Object
  extended by com.tangosol.net.cache.SerializationPagedCache.WrapperBinaryStore
All Implemented Interfaces:
BinaryStore
Enclosing class:
SerializationPagedCache

public class SerializationPagedCache.WrapperBinaryStore
extends java.lang.Object
implements BinaryStore

A wrapper BinaryStore implementation that keeps track of its size.


Constructor Summary
SerializationPagedCache.WrapperBinaryStore(BinaryStore store)
          Construct a WrapperBinaryStore.
 
Method Summary
protected  void checkDestroy()
          Test if the underlying store can be destroyed, and if so, destroy it.
protected  void close()
          Used to specify that the page is no longer current.
protected  void destroy()
          Destroy the underlying BinaryStore.
 void erase(Binary binKey)
          Remove the specified key from the underlying store if present.
 void eraseAll()
          Remove all data from the underlying store.
 BinaryStore getBinaryStore()
           
protected  java.util.Map getBinaryStoreKeyMap()
           
 int getSize()
           
 boolean isCurrent()
           
 java.util.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.
protected  void setBinaryStore(BinaryStore store)
          Specify the store to wrap.
 void store(Binary binKey, Binary binValue)
          Store the specified value under the specific key in the underlying store.
 java.lang.String toString()
          Returns a string representation of the object.
 

Constructor Detail

SerializationPagedCache.WrapperBinaryStore

public SerializationPagedCache.WrapperBinaryStore(BinaryStore store)
Construct a WrapperBinaryStore.

Parameters:
store - the BinaryStore to delegate to
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

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

eraseAll

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

Specified by:
eraseAll in interface BinaryStore

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

toString

public java.lang.String toString()
Returns a string representation of the object.

Returns:
a string representation of the object

getBinaryStore

public BinaryStore getBinaryStore()
Returns:
the wrapped BinaryStore; null after it is destroyed

setBinaryStore

protected void setBinaryStore(BinaryStore store)
Specify the store to wrap. The store is set to null if/when this wrapper destroys it.

Parameters:
store - the wrapped BinaryStore

getSize

public int getSize()
Returns:
the number of keys in the wrapped BinaryStore

getBinaryStoreKeyMap

protected java.util.Map getBinaryStoreKeyMap()
Returns:
the map of keys stored by the wrapped BinaryStore

isCurrent

public boolean isCurrent()
Returns:
true if the page is still current

close

protected void close()
Used to specify that the page is no longer current.


checkDestroy

protected void checkDestroy()
Test if the underlying store can be destroyed, and if so, destroy it.


destroy

protected void destroy()
Destroy the underlying BinaryStore.


Oracle® Coherence Java API Reference
v3.5

E14977-01

Copyright © 2000, 2009, Oracle. All rights reserved.