Class PartitionedCacheBinaryEntryStore<K,V>
- java.lang.Object
-
- com.tangosol.coherence.jcache.partitionedcache.PartitionedCacheBinaryEntryStore<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Implemented Interfaces:
BinaryEntryStore
public class PartitionedCacheBinaryEntryStore<K,V> extends Object implements BinaryEntryStore
Generic Coherence BinaryEntryStore for Coherence JCache Adapter.- Version:
- Coherence 12.1.3
- Author:
- jf 2013.07.08
-
-
Constructor Summary
Constructors Constructor Description PartitionedCacheBinaryEntryStore(String sName, BackingMapManagerContext mgrCtx, ClassLoader classLoader)
Construct a native Coherence CacheStore which implements JCache read-through and write-through semantics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
erase(BinaryEntry binaryEntry)
Remove the specified entry from the underlying store.void
eraseAll(Set setBinEntries)
Remove the specified entries from the underlying store.void
load(BinaryEntry binaryEntry)
Load the value from the underlying store and update the specified entry.void
loadAll(Set set)
Load the values from the underlying store and update the specified entries.void
store(BinaryEntry binaryEntry)
Store the specified entry in the underlying store.void
storeAll(Set set)
Store the entries in the specified set in the underlying store.
-
-
-
Constructor Detail
-
PartitionedCacheBinaryEntryStore
public PartitionedCacheBinaryEntryStore(String sName, BackingMapManagerContext mgrCtx, ClassLoader classLoader)
Construct a native Coherence CacheStore which implements JCache read-through and write-through semantics.- Parameters:
sName
- internal Coherence NamedCache cache name. encodes the JCache CacheManager context.mgrCtx
- Coherence context for NamedCacheclassLoader
- classLoader used by the Coherence NamedCache Only gets called if coherence configuration file defines <cache-scheme> element referring to this class. Here is the configuration that is now injected into coherence configuration files using the JCache namespace.<cachestore-scheme> <class-scheme> <class-name>com.tangosol.coherence.jcache.partitionedcache.PartitionedCacheBinaryEntryStore</class-name> <init-params> <init-param> <param-type>java.lang.String</param-type> <param-value>{cache-name}</param-value> </init-param> <init-param> <param-type>com.tangosol.net.BackingMapManagerContext</param-type> <param-value>{manager-context}</param-value> </init-param> <init-param> <param-type>java.lang.ClassLoader</param-type> <param-value>{class-loader}</param-value> </init-param> </init-params> </class-scheme> </cachestore-scheme>
-
-
Method Detail
-
load
public void load(BinaryEntry binaryEntry)
Description copied from interface:BinaryEntryStore
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.- Specified by:
load
in interfaceBinaryEntryStore<K,V>
- Parameters:
binaryEntry
- an entry that needs to be updated with the loaded value
-
loadAll
public void loadAll(Set set)
Description copied from interface:BinaryEntryStore
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.- Specified by:
loadAll
in interfaceBinaryEntryStore<K,V>
- Parameters:
set
- a set of entries that needs to be updated with the loaded values
-
store
public void store(BinaryEntry binaryEntry)
Description copied from interface:BinaryEntryStore
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).
- Specified by:
store
in interfaceBinaryEntryStore<K,V>
- Parameters:
binaryEntry
- the entry to be stored
-
storeAll
public void storeAll(Set set)
Description copied from interface:BinaryEntryStore
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).
- Specified by:
storeAll
in interfaceBinaryEntryStore<K,V>
- Parameters:
set
- the set of entries to be stored
-
erase
public void erase(BinaryEntry binaryEntry)
Description copied from interface:BinaryEntryStore
Remove the specified entry from the underlying store.- Specified by:
erase
in interfaceBinaryEntryStore<K,V>
- Parameters:
binaryEntry
- the entry to be removed from the store
-
eraseAll
public void eraseAll(Set setBinEntries)
Description copied from interface:BinaryEntryStore
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.
- Specified by:
eraseAll
in interfaceBinaryEntryStore<K,V>
- Parameters:
setBinEntries
- the set entries to be removed from the store
-
-