Package net.sf.ehcache.config
Class NonstopConfiguration
- java.lang.Object
-
- net.sf.ehcache.config.NonstopConfiguration
-
- All Implemented Interfaces:
java.lang.Cloneable
public class NonstopConfiguration extends java.lang.Object implements java.lang.CloneableConfiguration class of nonstop caches- Author:
- Abhishek Sanoujam, Eugene Kononov
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBULK_OPS_TIMEOUT_MULTIPLY_FACTORSystem Property name for bulk operations multiply factorstatic intDEFAULT_BULK_OP_TIMEOUT_FACTORDefault value of timeout multiplication factor for bulk operations like removeAll or sizestatic booleanDEFAULT_ENABLEDDefault value of nonstop attributestatic booleanDEFAULT_IMMEDIATE_TIMEOUTDefault value of immediateTimeout attributestatic intDEFAULT_SEARCH_TIMEOUT_MILLISDefault value of searchTimeoutMillis attributestatic TimeoutBehaviorConfigurationDEFAULT_TIMEOUT_BEHAVIORDefault value of timeoutBehavior attributestatic intDEFAULT_TIMEOUT_MILLISDefault value of timeoutMillis attribute
-
Constructor Summary
Constructors Constructor Description NonstopConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTimeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)Set the value of timeoutBehaviorNonstopConfigurationclone()NonstopConfigurationenabled(boolean nonstop)Set the value of nonstopbooleanequals(java.lang.Object obj)voidfreezeConfig()Freeze the config.intgetBulkOpsTimeoutMultiplyFactor()returns the time out multiplication factor for bulk cache operationslonggetSearchTimeoutMillis()Returns the value of the search timeout in millisecondsTimeoutBehaviorConfigurationgetTimeoutBehavior()Returns value of timeoutBehavior configuredlonggetTimeoutMillis()Returns the value of timeout in millisecondsinthashCode()NonstopConfigurationimmediateTimeout(boolean immediateTimeout)Set the value of immediateTimeoutbooleanisEnabled()Returns true if nonstop is enabled in configbooleanisImmediateTimeout()Returns true if immediateTimeout is set to trueNonstopConfigurationsearchTimeoutMillis(long searchTimeoutMillis)Set the value of the search timeoutvoidsetBulkOpsTimeoutMultiplyFactor(int bulkOpsTimeoutMultiplyFactor)Sets the value of the multiplication factor for bulk cache operationsvoidsetEnabled(boolean enabled)Set the value of nonstop is enabled or notvoidsetImmediateTimeout(boolean immediateTimeout)Set the value of immediateTimeoutvoidsetSearchTimeoutMillis(long searchTimeoutMillis)Set the value of the search timeoutvoidsetTimeoutMillis(long timeoutMillis)Set the value of timeoutMillisNonstopConfigurationtimeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)Set the value of timeoutBehaviorNonstopConfigurationtimeoutMillis(long timeoutMillis)Set the value of timeoutMillis
-
-
-
Field Detail
-
BULK_OPS_TIMEOUT_MULTIPLY_FACTOR
public static final java.lang.String BULK_OPS_TIMEOUT_MULTIPLY_FACTOR
System Property name for bulk operations multiply factor- See Also:
- Constant Field Values
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
Default value of nonstop attribute- See Also:
- Constant Field Values
-
DEFAULT_IMMEDIATE_TIMEOUT
public static final boolean DEFAULT_IMMEDIATE_TIMEOUT
Default value of immediateTimeout attribute- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT_MILLIS
public static final int DEFAULT_TIMEOUT_MILLIS
Default value of timeoutMillis attribute- See Also:
- Constant Field Values
-
DEFAULT_SEARCH_TIMEOUT_MILLIS
public static final int DEFAULT_SEARCH_TIMEOUT_MILLIS
Default value of searchTimeoutMillis attribute- See Also:
- Constant Field Values
-
DEFAULT_BULK_OP_TIMEOUT_FACTOR
public static final int DEFAULT_BULK_OP_TIMEOUT_FACTOR
Default value of timeout multiplication factor for bulk operations like removeAll or size
-
DEFAULT_TIMEOUT_BEHAVIOR
public static final TimeoutBehaviorConfiguration DEFAULT_TIMEOUT_BEHAVIOR
Default value of timeoutBehavior attribute
-
-
Method Detail
-
freezeConfig
public void freezeConfig()
Freeze the config. Once frozen, 'enabled' can't be changed
-
isEnabled
public boolean isEnabled()
Returns true if nonstop is enabled in config- Returns:
- true if nonstop is enabled in config
-
setEnabled
public void setEnabled(boolean enabled)
Set the value of nonstop is enabled or not- Parameters:
enabled- the new value
-
enabled
public NonstopConfiguration enabled(boolean nonstop)
Set the value of nonstop- Parameters:
nonstop-- Returns:
- this configuration instance
-
isImmediateTimeout
public boolean isImmediateTimeout()
Returns true if immediateTimeout is set to true- Returns:
- true if immediateTimeout is set to true
-
setImmediateTimeout
public void setImmediateTimeout(boolean immediateTimeout)
Set the value of immediateTimeout- Parameters:
immediateTimeout- the new value
-
immediateTimeout
public NonstopConfiguration immediateTimeout(boolean immediateTimeout)
Set the value of immediateTimeout- Parameters:
immediateTimeout-- Returns:
- this configuration instance
-
getTimeoutMillis
public long getTimeoutMillis()
Returns the value of timeout in milliseconds- Returns:
- the value of timeout in milliseconds
-
setTimeoutMillis
public void setTimeoutMillis(long timeoutMillis)
Set the value of timeoutMillis- Parameters:
timeoutMillis- the new value
-
getSearchTimeoutMillis
public long getSearchTimeoutMillis()
Returns the value of the search timeout in milliseconds- Returns:
- the value of the search timeout in milliseconds
-
setSearchTimeoutMillis
public void setSearchTimeoutMillis(long searchTimeoutMillis)
Set the value of the search timeout- Parameters:
searchTimeoutMillis- the new value
-
getBulkOpsTimeoutMultiplyFactor
public int getBulkOpsTimeoutMultiplyFactor()
returns the time out multiplication factor for bulk cache operations- Returns:
- the value of factor
-
setBulkOpsTimeoutMultiplyFactor
public void setBulkOpsTimeoutMultiplyFactor(int bulkOpsTimeoutMultiplyFactor)
Sets the value of the multiplication factor for bulk cache operations- Parameters:
bulkOpsTimeoutMultiplyFactor- the new value
-
timeoutMillis
public NonstopConfiguration timeoutMillis(long timeoutMillis)
Set the value of timeoutMillis- Parameters:
timeoutMillis- the new value- Returns:
- this configuration instance
-
searchTimeoutMillis
public NonstopConfiguration searchTimeoutMillis(long searchTimeoutMillis)
Set the value of the search timeout- Parameters:
searchTimeoutMillis- the new value of the search timeout in milliseconds- Returns:
- this configuration instance
-
getTimeoutBehavior
public TimeoutBehaviorConfiguration getTimeoutBehavior()
Returns value of timeoutBehavior configured- Returns:
- value of timeoutBehavior configured
-
addTimeoutBehavior
public void addTimeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)
Set the value of timeoutBehavior- Parameters:
timeoutBehavior-
-
timeoutBehavior
public NonstopConfiguration timeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)
Set the value of timeoutBehavior- Parameters:
timeoutBehavior-- Returns:
- this configuration instance
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
clone
public NonstopConfiguration clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-