K - the type of the keysV - the type of the valuespublic abstract class AbstractCoherenceBasedCompleteConfiguration<K,V> extends Object implements CoherenceBasedCompleteConfiguration<K,V>, ExternalizableLite, PortableObject
CoherenceBasedCompleteConfiguration.| Modifier and Type | Field and Description |
|---|---|
protected Class<K> |
m_clzKey
The type of keys for
Caches. |
protected Class<V> |
m_clzValue
The type of values for
Caches. |
protected javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> |
m_factoryCacheLoader
The
Factory for the CacheLoader. |
protected javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> |
m_factoryCacheWriter
The
Factory for the CacheWriter. |
protected javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> |
m_factoryExpiryPolicy
The
Factory for the ExpiryPolicy. |
protected boolean |
m_fManagementEnabled
Is JMX management enabled?
|
protected boolean |
m_fReadThrough
Is "read-through" enabled?
|
protected boolean |
m_fStatisticsEnabled
Are statistics enabled?
|
protected boolean |
m_fStoreByValue
Is store-by-reference enabled?
|
protected boolean |
m_fWriteThrough
Is "write-through" enabled?
|
protected List<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
m_listListenerConfigurations
The
CacheEntryListenerConfigurations. |
| Constructor and Description |
|---|
AbstractCoherenceBasedCompleteConfiguration()
Constructs an
AbstractCoherenceBasedCompleteConfiguration. |
AbstractCoherenceBasedCompleteConfiguration(javax.cache.configuration.CompleteConfiguration<K,V> cfgComplete)
Constructs an
AbstractCoherenceBasedCompleteConfiguration based on another CompleteConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cfgListener)
Add a configuration for a
CacheEntryListener. |
boolean |
equals(Object object) |
List<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
getCacheEntryListenerConfigurations() |
javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> |
getCacheLoaderFactory() |
javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> |
getCacheWriterFactory() |
javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> |
getExpiryPolicyFactory() |
Class<K> |
getKeyType() |
Class<V> |
getValueType() |
int |
hashCode() |
boolean |
isManagementEnabled() |
boolean |
isReadThrough() |
boolean |
isStatisticsEnabled() |
boolean |
isStoreByValue() |
boolean |
isWriteThrough() |
void |
readExternal(DataInput in)
Restore the contents of this object by loading the object's state from the passed DataInput object.
|
void |
readExternal(PofReader in)
Restore the contents of a user type instance by reading its state using the specified PofReader object.
|
void |
setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> factory)
Set the
CacheLoader factory. |
void |
setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> factory)
Set the
CacheWriter factory. |
void |
setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
Set the
Factory for the ExpiryPolicy. |
void |
setManagementEnabled(boolean fManagementEnabled)
Set if JMX management is enabled for a configuration.
|
void |
setReadThrough(boolean fReadThrough)
Set if read-through caching should be used.
|
void |
setStatisticsEnabled(boolean fStatisticsEnabled)
Set if statistics gathering is enabled for a configuration.
|
void |
setStoreByValue(boolean fStoreByValue)
Set if a configured cache should use store-by-value or store-by-reference semantics.
|
void |
setTypes(Class<K> clzKey, Class<V> clzValue)
Sets the expected type of keys and values for a
CoherenceBasedCache. |
void |
setWriteThrough(boolean fWriteThrough)
Set if write-through caching should be used.
|
String |
toString() |
void |
writeExternal(DataOutput out)
Save the contents of this object by storing the object's state into the passed DataOutput object.
|
void |
writeExternal(PofWriter out)
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateCache, destroyCacheprotected List<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> m_listListenerConfigurations
CacheEntryListenerConfigurations.protected javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> m_factoryCacheLoader
Factory for the CacheLoader.protected javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> m_factoryCacheWriter
Factory for the CacheWriter.protected javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> m_factoryExpiryPolicy
Factory for the ExpiryPolicy.protected boolean m_fReadThrough
protected boolean m_fWriteThrough
protected boolean m_fStatisticsEnabled
protected boolean m_fStoreByValue
protected boolean m_fManagementEnabled
public AbstractCoherenceBasedCompleteConfiguration()
AbstractCoherenceBasedCompleteConfiguration.public AbstractCoherenceBasedCompleteConfiguration(javax.cache.configuration.CompleteConfiguration<K,V> cfgComplete)
AbstractCoherenceBasedCompleteConfiguration based on another CompleteConfiguration.cfgComplete - the CompleteConfigurationpublic boolean isStoreByValue()
public List<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> getCacheEntryListenerConfigurations()
public javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> getCacheLoaderFactory()
public javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> getCacheWriterFactory()
public javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> getExpiryPolicyFactory()
public boolean isReadThrough()
public boolean isWriteThrough()
public boolean isStatisticsEnabled()
public boolean isManagementEnabled()
public void setTypes(Class<K> clzKey, Class<V> clzValue)
CoherenceBasedCompleteConfigurationCoherenceBasedCache.
Setting both to Object.class means type-safety checks are not required.
setTypes in interface CoherenceBasedCompleteConfiguration<K,V>clzKey - the expected key typeclzValue - the expected value typepublic void addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cfgListener)
CoherenceBasedCompleteConfigurationCacheEntryListener.addCacheEntryListenerConfiguration in interface CoherenceBasedCompleteConfiguration<K,V>cfgListener - the CacheEntryListenerConfigurationpublic void setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> factory)
CoherenceBasedCompleteConfigurationCacheLoader factory.setCacheLoaderFactory in interface CoherenceBasedCompleteConfiguration<K,V>factory - the CacheLoader Factorypublic void setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> factory)
CoherenceBasedCompleteConfigurationCacheWriter factory.setCacheWriterFactory in interface CoherenceBasedCompleteConfiguration<K,V>factory - the CacheWriter Factorypublic void setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
CoherenceBasedCompleteConfigurationFactory for the ExpiryPolicy.
If null is specified the default ExpiryPolicy is used.
setExpiryPolicyFactory in interface CoherenceBasedCompleteConfiguration<K,V>factory - the ExpiryPolicy Factorypublic void setReadThrough(boolean fReadThrough)
CoherenceBasedCompleteConfigurationIt is an invalid configuration to set this to true without specifying a CacheLoader Factory.
setReadThrough in interface CoherenceBasedCompleteConfiguration<K,V>fReadThrough - true if read-through is requiredpublic void setWriteThrough(boolean fWriteThrough)
CoherenceBasedCompleteConfigurationIt is an invalid configuration to set this to true without specifying a CacheWriter Factory.
setWriteThrough in interface CoherenceBasedCompleteConfiguration<K,V>fWriteThrough - true if write-through is requiredpublic void setStoreByValue(boolean fStoreByValue)
CoherenceBasedCompleteConfigurationsetStoreByValue in interface CoherenceBasedCompleteConfiguration<K,V>fStoreByValue - true for store-by-value semantics, false for store-by-reference semanticspublic void setStatisticsEnabled(boolean fStatisticsEnabled)
CoherenceBasedCompleteConfigurationStatistics may be enabled or disabled at runtime via CacheManager.enableStatistics(String, boolean).
setStatisticsEnabled in interface CoherenceBasedCompleteConfiguration<K,V>fStatisticsEnabled - true to enable statistics gathering, false to disablepublic void setManagementEnabled(boolean fManagementEnabled)
CoherenceBasedCompleteConfigurationManagement may be enabled or disabled at runtime via CacheManager.enableManagement(String, boolean).
setManagementEnabled in interface CoherenceBasedCompleteConfiguration<K,V>fManagementEnabled - true to enable statistics, false to disablepublic void readExternal(DataInput in) throws IOException
ExternalizableLitereadExternal in interface ExternalizableLitein - the DataInput stream to read data from in order to restore the state of this objectIOException - if an I/O exception occursNotActiveException - if the object is not in its initial state, and therefore cannot be deserialized intopublic void writeExternal(DataOutput out) throws IOException
ExternalizableLitewriteExternal in interface ExternalizableLiteout - the DataOutput stream to write the state of this object toIOException - if an I/O exception occurspublic void readExternal(PofReader in) throws IOException
PortableObjectreadExternal in interface PortableObjectin - the PofReader from which to read the object's stateIOException - if an I/O error occurspublic void writeExternal(PofWriter out) throws IOException
PortableObjectwriteExternal in interface PortableObjectout - the PofWriter to which to write the object's stateIOException - if an I/O error occurs