Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net.cache
Interface BinaryEntryStore


public interface BinaryEntryStore

BinaryEntryStore is analogous to the CacheStore, but operates on BinaryEntry objects. Note that the BinaryEntry interface extends Map.Entry and provides dual access to the underlying data: in external (Object) format via the getKey/getValue/setValue methods or internal (Binary) format via getBinaryKey/getBinaryValue/updateBinaryValue methods. Additionaly, for the purpose of the optimistic concurrency control, implementations could rely on the entry's "previous" values: in the external format using BinaryEntry.getOriginalValue() and in the internal format using the BinaryEntry.getOriginalBinaryValue() methods (for store operations, a value of null here would indicate an insert operation).

Since:
Coherence 3.6
Author:
gg 2009.09.25

Method Summary
 void erase(BinaryEntry binEntry)
          Remove the specified entry from the underlying store.
 void eraseAll(java.util.Set setBinEntries)
          Remove the specified entries from the underlying store.
 void load(BinaryEntry binEntry)
          Load the value from the underlying store and update the specified entry.
 void loadAll(java.util.Set setBinEntries)
          Load the values from the underlying store and update the specified entries.
 void store(BinaryEntry binEntry)
          Store the specified entry in the underlying store.
 void storeAll(java.util.Set setBinEntries)
          Store the entries in the specified set in the underlying store.

 

Method Detail

load

void load(BinaryEntry binEntry)
Load the value from the underlying store and update the specified entry. If the BinaryEntryStore is capable of loading Binary values, it should update the entry using the {#link BinaryEntry.updateBinaryValue} API.
Parameters:
binEntry - an entry that needs to be updated with the loaded value

loadAll

void loadAll(java.util.Set setBinEntries)
Load the values from the underlying store and update the specified entries. If the BinaryEntryStore is capable of loading Binary values, it should update the entry using the {#link BinaryEntry.updateBinaryValue} API.
Parameters:
setBinEntries - a set of entries that needs to be updated with the loaded values

store

void store(BinaryEntry binEntry)
Store the specified entry in the underlying store. This method is intended to support both the entry creation and value update.

If the store operation changes the entry's value, a best effort will be made to place the changed value back into the corresponding backing map (for asynchronous store operations a concurrent backing map modification can make it impossible).

Parameters:
binEntry - the entry to be stored
Throws:
java.lang.UnsupportedOperationException - if this implementation or the underlying store is read-only

storeAll

void storeAll(java.util.Set setBinEntries)
Store the entries in the specified set in the underlying store. This method is intended to support both the entry creation and value update.

If this operation fails (by throwing an exception) after a partial success, the convention is that entries which have been stored successfully are to be removed from the specified set, indicating that the store operation for the entries left in the map has failed or has not been attempted.

If the storeAll operation changes some entries' values, a best effort will be made to place the changed values back into the corresponding backing map (for asynchronous store operations concurrent backing map modifications can make it impossible).

Parameters:
setBinEntries - the set of entries to be stored
Throws:
java.lang.UnsupportedOperationException - if this implementation or the underlying store is read-only

erase

void erase(BinaryEntry binEntry)
Remove the specified entry from the underlying store.
Parameters:
binEntry - the entry to be removed from the store
Throws:
java.lang.UnsupportedOperationException - if this implementation or the underlying store is read-only

eraseAll

void eraseAll(java.util.Set setBinEntries)
Remove the specified entries from the underlying store.

If this operation fails (by throwing an exception) after a partial success, the convention is that entries which have been erased successfully are to be removed from the specified set, indicating that the erase operation for the entries left in the collection has failed or has not been attempted.

Parameters:
setBinEntries - the set entries to be removed from the store
Throws:
java.lang.UnsupportedOperationException - if this implementation or the underlying store is read-only

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.