|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.config.TerracottaConfiguration
public class TerracottaConfiguration
Class to hold the Terracotta configuration - either a pointer to the real config or a container for embedded config.
Nested Class Summary | |
---|---|
static class |
TerracottaConfiguration.Consistency
Enum for various consistency settings |
Field Summary | |
---|---|
static boolean |
DEFAULT_CACHE_COHERENT
Deprecated. since 2.4 Use DEFAULT_CONSISTENCY_TYPE instead. |
static boolean |
DEFAULT_CACHE_XA
Default xa enabled |
static boolean |
DEFAULT_CLUSTERED
Default clustered mode |
static boolean |
DEFAULT_COHERENT_READS
Default coherent read behavior |
static boolean |
DEFAULT_COMPRESSION_ENABLED
Default compression setting |
static int |
DEFAULT_CONCURRENCY
Default value for concurrency of the internal Store. |
static TerracottaConfiguration.Consistency |
DEFAULT_CONSISTENCY_TYPE
Default cache consistency setting |
static boolean |
DEFAULT_COPY_ON_READ
Default copy on read setting |
static boolean |
DEFAULT_LOCAL_CACHE_ENABLED
Default value for whether local cache is enabled or not |
static boolean |
DEFAULT_LOCAL_KEY_CACHE
Default local key cache status |
static int |
DEFAULT_LOCAL_KEY_CACHE_SIZE
Default local key cache size |
static NonstopConfiguration |
DEFAULT_NON_STOP_CONFIGURATION
Default value for NonstopConfiguration |
static boolean |
DEFAULT_ORPHAN_EVICTION
Default orphan eviction status |
static int |
DEFAULT_ORPHAN_EVICTION_PERIOD
Default orphan eviction period |
static boolean |
DEFAULT_SYNCHRONOUS_WRITES
Default setting for synchronous-write |
Constructor Summary | |
---|---|
TerracottaConfiguration()
|
Method Summary | |
---|---|
void |
addNonstop(NonstopConfiguration nonstopConfiguration)
Add the NonstopConfiguration |
TerracottaConfiguration |
cacheXA(boolean cacheXA)
|
TerracottaConfiguration |
clone()
Clones this object, following the usual contract. |
TerracottaConfiguration |
clustered(boolean clustered)
|
TerracottaConfiguration |
coherent(boolean coherent)
Deprecated. since 2.4 Use consistency(Consistency) instead |
TerracottaConfiguration |
coherentReads(boolean coherentReads)
Deprecated. |
TerracottaConfiguration |
compressionEnabled(boolean enabled)
|
TerracottaConfiguration |
concurrency(int concurrency)
|
TerracottaConfiguration |
consistency(TerracottaConfiguration.Consistency consistency)
Setter for consistency, returns this instance |
TerracottaConfiguration |
copyOnRead(boolean isCopyOnRead)
Deprecated. |
boolean |
getCoherentReads()
Deprecated. |
int |
getConcurrency()
Get the value of concurrency. |
TerracottaConfiguration.Consistency |
getConsistency()
Getter for consistency |
boolean |
getLocalKeyCache()
Check whether the local key cache is enabled |
int |
getLocalKeyCacheSize()
Get the size limit of the local key cache (if enabled) |
NonstopConfiguration |
getNonstopConfiguration()
Get the NonstopConfiguration , may be null |
boolean |
getOrphanEviction()
Check whether orphan eviction is enabled |
int |
getOrphanEvictionPeriod()
Get the number of regular eviction cycles between orphan evictions |
boolean |
isCacheXA()
Check whether the [serialized value] cache is an XA enabled cache |
boolean |
isClustered()
Check whether clustering is enabled |
boolean |
isCoherent()
Deprecated. since 2.4 Use getConsistency() instead to query the TerracottaConfiguration.Consistency or Ehcache#isNodeCoherent()
to query if the node is coherent |
boolean |
isCompressionEnabled()
Check whether compression is enabled |
boolean |
isCopyOnRead()
Deprecated. |
boolean |
isLocalCacheEnabled()
Returns true if local cache is enabled, otherwise false |
boolean |
isNonstopEnabled()
Returns true if nonstop is enabled |
boolean |
isSynchronousWrites()
Is the cache configured for synchronous-write? |
TerracottaConfiguration |
localCacheEnabled(boolean localCacheEnabled)
Enable or disable the local cache |
TerracottaConfiguration |
localKeyCache(boolean localKeyCache)
|
TerracottaConfiguration |
localKeyCacheSize(int localKeyCacheSize)
|
TerracottaConfiguration |
nonstop(NonstopConfiguration nonstopConfiguration)
Set the NonstopConfiguration |
TerracottaConfiguration |
orphanEviction(boolean orphanEviction)
|
TerracottaConfiguration |
orphanEvictionPeriod(int orphanEvictionPeriod)
|
void |
setCacheXA(boolean cacheXA)
Used by BeanHandler to set the cacheXA flag during parsing |
void |
setClustered(boolean clustered)
Indicates whether to cluster this cache with Terracotta. |
void |
setCoherent(boolean coherent)
Deprecated. since 2.4 Use setConsistency(Consistency) instead |
void |
setCoherentReads(boolean coherentReads)
Deprecated. |
void |
setCompressionEnabled(boolean enabled)
Used by BeanHandler to set the compressionEnabled flag during parsing |
void |
setConcurrency(int concurrency)
Sets the value of concurrency. |
void |
setConsistency(String consistency)
Setter for consistency |
void |
setConsistency(TerracottaConfiguration.Consistency consistency)
Setter for consistency |
void |
setCopyOnRead(boolean isCopyOnRead)
Deprecated. |
void |
setLocalCacheEnabled(boolean localCacheEnabled)
Enable or disable the local cache |
void |
setLocalKeyCache(boolean localKeyCache)
Sets whether this cache should use an unclustered local key cache (usually should be false unless optimizing for a small read-only cache) Defaults to false. |
void |
setLocalKeyCacheSize(int localKeyCacheSize)
Sets maximum size of the local key cache (usually the size of the key set of the cache or cache partition). |
void |
setOrphanEviction(boolean orphanEviction)
Sets whether this cache should perform orphan eviction (usually should be true). |
void |
setOrphanEvictionPeriod(int orphanEvictionPeriod)
Set how often this cache should perform orphan eviction (measured in regular eviction periods). |
void |
setSynchronousWrites(boolean synchronousWrites)
Set the value for synchronous-write |
TerracottaConfiguration |
synchronousWrites(boolean synchronousWrites)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_CLUSTERED
public static final boolean DEFAULT_COHERENT_READS
public static final boolean DEFAULT_CACHE_XA
public static final boolean DEFAULT_ORPHAN_EVICTION
public static final int DEFAULT_ORPHAN_EVICTION_PERIOD
public static final boolean DEFAULT_LOCAL_KEY_CACHE
public static final int DEFAULT_LOCAL_KEY_CACHE_SIZE
public static final boolean DEFAULT_COPY_ON_READ
public static final boolean DEFAULT_COMPRESSION_ENABLED
public static final NonstopConfiguration DEFAULT_NON_STOP_CONFIGURATION
NonstopConfiguration
@Deprecated public static final boolean DEFAULT_CACHE_COHERENT
DEFAULT_CONSISTENCY_TYPE
instead.
public static final TerracottaConfiguration.Consistency DEFAULT_CONSISTENCY_TYPE
public static final boolean DEFAULT_SYNCHRONOUS_WRITES
public static final int DEFAULT_CONCURRENCY
public static final boolean DEFAULT_LOCAL_CACHE_ENABLED
Constructor Detail |
---|
public TerracottaConfiguration()
Method Detail |
---|
public TerracottaConfiguration clone()
clone
in class Object
public void setClustered(boolean clustered)
clustered
- true
if the cache should be clustered with Terracotta; false
otherwisepublic TerracottaConfiguration clustered(boolean clustered)
setClustered(boolean)
public boolean isClustered()
@Deprecated public void setCopyOnRead(boolean isCopyOnRead)
public void setCompressionEnabled(boolean enabled)
@Deprecated public TerracottaConfiguration copyOnRead(boolean isCopyOnRead)
setCopyOnRead(boolean)
public TerracottaConfiguration compressionEnabled(boolean enabled)
public boolean isCacheXA()
public void setCacheXA(boolean cacheXA)
public TerracottaConfiguration cacheXA(boolean cacheXA)
setCacheXA(boolean)
@Deprecated public boolean isCopyOnRead()
public boolean isCompressionEnabled()
@Deprecated public void setCoherentReads(boolean coherentReads)
coherentReads
- true
if coherent reads should be used; false
otherwise@Deprecated public TerracottaConfiguration coherentReads(boolean coherentReads)
setCoherentReads(boolean)
@Deprecated public boolean getCoherentReads()
public void setOrphanEviction(boolean orphanEviction)
orphanEviction
- true
if orphan eviction should be used; false
otherwisepublic TerracottaConfiguration orphanEviction(boolean orphanEviction)
setOrphanEviction(boolean)
public boolean getOrphanEviction()
public void setOrphanEvictionPeriod(int orphanEvictionPeriod)
orphanEvictionPeriod
- every how many regular evictions an orphan eviction should occurpublic TerracottaConfiguration orphanEvictionPeriod(int orphanEvictionPeriod)
setOrphanEvictionPeriod(int)
public int getOrphanEvictionPeriod()
public void setLocalKeyCache(boolean localKeyCache)
localKeyCache
- true
if a local key cache should be used; false
otherwisepublic TerracottaConfiguration localKeyCache(boolean localKeyCache)
setLocalKeyCache(boolean)
public boolean getLocalKeyCache()
public void setLocalKeyCacheSize(int localKeyCacheSize)
localKeyCacheSize
- the size of the local key cache in number of keyspublic TerracottaConfiguration localKeyCacheSize(int localKeyCacheSize)
setLocalKeyCacheSize(int)
public int getLocalKeyCacheSize()
@Deprecated public void setCoherent(boolean coherent)
setConsistency(Consistency)
instead
@Deprecated public TerracottaConfiguration coherent(boolean coherent)
consistency(Consistency)
instead
@Deprecated public boolean isCoherent()
getConsistency()
instead to query the TerracottaConfiguration.Consistency
or Ehcache#isNodeCoherent()
to query if the node is coherent
public boolean isSynchronousWrites()
public void setSynchronousWrites(boolean synchronousWrites)
synchronousWrites
- true for using synchronous-writepublic TerracottaConfiguration synchronousWrites(boolean synchronousWrites)
setSynchronousWrites(boolean)
public TerracottaConfiguration concurrency(int concurrency)
setConcurrency(int)
public void setConcurrency(int concurrency)
IllegalArgumentException
if the value is less than 0.
This value cannot be changed once cache is initialized.
public int getConcurrency()
public void addNonstop(NonstopConfiguration nonstopConfiguration)
NonstopConfiguration
nonstopConfiguration
- public TerracottaConfiguration nonstop(NonstopConfiguration nonstopConfiguration)
NonstopConfiguration
nonstopConfiguration
-
public NonstopConfiguration getNonstopConfiguration()
NonstopConfiguration
, may be null
NonstopConfiguration
, may be nullpublic boolean isNonstopEnabled()
public TerracottaConfiguration consistency(TerracottaConfiguration.Consistency consistency)
consistency
-
public void setConsistency(TerracottaConfiguration.Consistency consistency)
consistency
- public void setConsistency(String consistency)
consistency
- public TerracottaConfiguration.Consistency getConsistency()
public boolean isLocalCacheEnabled()
public void setLocalCacheEnabled(boolean localCacheEnabled)
localCacheEnabled
- public TerracottaConfiguration localCacheEnabled(boolean localCacheEnabled)
localCacheEnabled
-
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |