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
Cache s. |
protected Class<V> |
m_clzValue
The type of values for
Cache s. |
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
CacheEntryListenerConfiguration s. |
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, wait
createCache, destroyCache
protected List<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> m_listListenerConfigurations
CacheEntryListenerConfiguration
s.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 CompleteConfiguration
public 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)
CoherenceBasedCompleteConfiguration
CoherenceBasedCache
.
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)
CoherenceBasedCompleteConfiguration
CacheEntryListener
.addCacheEntryListenerConfiguration
in interface CoherenceBasedCompleteConfiguration<K,V>
cfgListener
- the CacheEntryListenerConfiguration
public void setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> factory)
CoherenceBasedCompleteConfiguration
CacheLoader
factory.setCacheLoaderFactory
in interface CoherenceBasedCompleteConfiguration<K,V>
factory
- the CacheLoader
Factory
public void setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> factory)
CoherenceBasedCompleteConfiguration
CacheWriter
factory.setCacheWriterFactory
in interface CoherenceBasedCompleteConfiguration<K,V>
factory
- the CacheWriter
Factory
public void setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
CoherenceBasedCompleteConfiguration
Factory
for the ExpiryPolicy
.
If null
is specified the default ExpiryPolicy
is used.
setExpiryPolicyFactory
in interface CoherenceBasedCompleteConfiguration<K,V>
factory
- the ExpiryPolicy
Factory
public void setReadThrough(boolean fReadThrough)
CoherenceBasedCompleteConfiguration
It 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)
CoherenceBasedCompleteConfiguration
It 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)
CoherenceBasedCompleteConfiguration
setStoreByValue
in interface CoherenceBasedCompleteConfiguration<K,V>
fStoreByValue
- true
for store-by-value semantics,
false
for store-by-reference semanticspublic void setStatisticsEnabled(boolean fStatisticsEnabled)
CoherenceBasedCompleteConfiguration
Statistics 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)
CoherenceBasedCompleteConfiguration
Management 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
ExternalizableLite
readExternal
in interface ExternalizableLite
in
- 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
ExternalizableLite
writeExternal
in interface ExternalizableLite
out
- the DataOutput stream to write the state of this object toIOException
- if an I/O exception occurspublic void readExternal(PofReader in) throws IOException
PortableObject
readExternal
in interface PortableObject
in
- the PofReader from which to read the object's stateIOException
- if an I/O error occurspublic void writeExternal(PofWriter out) throws IOException
PortableObject
writeExternal
in interface PortableObject
out
- the PofWriter to which to write the object's stateIOException
- if an I/O error occurs