ehcache

net.sf.ehcache.config
Class NonstopConfiguration

java.lang.Object
  extended by net.sf.ehcache.config.NonstopConfiguration
All Implemented Interfaces:
Cloneable

public class NonstopConfiguration
extends Object
implements Cloneable

Configuration class of nonstop caches

Author:
Abhishek Sanoujam, Eugene Kononov

Field Summary
static String BULK_OPS_TIMEOUT_MULTIPLY_FACTOR
          System Property name for bulk operations multiply factor
static int DEFAULT_BULK_OP_TIMEOUT_FACTOR
          Default value of timeout multiplication factor for bulk operations like removeAll or size
static boolean DEFAULT_ENABLED
          Default value of nonstop attribute
static boolean DEFAULT_IMMEDIATE_TIMEOUT
          Default value of immediateTimeout attribute
static int DEFAULT_SEARCH_TIMEOUT_MILLIS
          Default value of searchTimeoutMillis attribute
static TimeoutBehaviorConfiguration DEFAULT_TIMEOUT_BEHAVIOR
          Default value of timeoutBehavior attribute
static int DEFAULT_TIMEOUT_MILLIS
          Default value of timeoutMillis attribute
 
Constructor Summary
NonstopConfiguration()
           
 
Method Summary
 void addTimeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)
          Set the value of timeoutBehavior
 NonstopConfiguration clone()
          
 NonstopConfiguration enabled(boolean nonstop)
          Set the value of nonstop
 boolean equals(Object obj)
           
 void freezeConfig()
          Freeze the config.
 int getBulkOpsTimeoutMultiplyFactor()
          returns the time out multiplication factor for bulk cache operations
 long getSearchTimeoutMillis()
          Returns the value of the search timeout in milliseconds
 TimeoutBehaviorConfiguration getTimeoutBehavior()
          Returns value of timeoutBehavior configured
 long getTimeoutMillis()
          Returns the value of timeout in milliseconds
 int hashCode()
           
 NonstopConfiguration immediateTimeout(boolean immediateTimeout)
          Set the value of immediateTimeout
 boolean isEnabled()
          Returns true if nonstop is enabled in config
 boolean isImmediateTimeout()
          Returns true if immediateTimeout is set to true
 NonstopConfiguration searchTimeoutMillis(long searchTimeoutMillis)
          Set the value of the search timeout
 void setBulkOpsTimeoutMultiplyFactor(int bulkOpsTimeoutMultiplyFactor)
          Sets the value of the multiplication factor for bulk cache operations
 void setEnabled(boolean enabled)
          Set the value of nonstop is enabled or not
 void setImmediateTimeout(boolean immediateTimeout)
          Set the value of immediateTimeout
 void setSearchTimeoutMillis(long searchTimeoutMillis)
          Set the value of the search timeout
 void setTimeoutMillis(long timeoutMillis)
          Set the value of timeoutMillis
 NonstopConfiguration timeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)
          Set the value of timeoutBehavior
 NonstopConfiguration timeoutMillis(long timeoutMillis)
          Set the value of timeoutMillis
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BULK_OPS_TIMEOUT_MULTIPLY_FACTOR

public static final 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

Constructor Detail

NonstopConfiguration

public NonstopConfiguration()
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:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

clone

public NonstopConfiguration clone()
                           throws CloneNotSupportedException

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

ehcache

Copyright 2001-2016, Terracotta, Inc.