Top Description Fields Constructors Methods
net.sf.ehcache.config

public Class NonstopConfiguration

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
net.sf.ehcache.CacheException

Configuration class of nonstop caches
Authors
Abhishek Sanoujam, Eugene Kononov

Field Summary

Modifier and TypeField and Description
public static final String
BULK_OPS_TIMEOUT_MULTIPLY_FACTOR

System Property name for bulk operations multiply factor

private volatile int
private volatile boolean
public static final int
DEFAULT_BULK_OP_TIMEOUT_FACTOR

Default value of timeout multiplication factor for bulk operations like removeAll or size

public static final boolean
DEFAULT_ENABLED

Default value of nonstop attribute

public static final boolean
DEFAULT_IMMEDIATE_TIMEOUT

Default value of immediateTimeout attribute

public static final int
DEFAULT_SEARCH_TIMEOUT_MILLIS

Default value of searchTimeoutMillis attribute

public static final TimeoutBehaviorConfiguration
DEFAULT_TIMEOUT_BEHAVIOR

Default value of timeoutBehavior attribute

public static final int
DEFAULT_TIMEOUT_MILLIS

Default value of timeoutMillis attribute

private volatile boolean
private volatile boolean
private volatile long
private TimeoutBehaviorConfiguration
private volatile long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addTimeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)

Set the value of timeoutBehavior

public NonstopConfiguration
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public NonstopConfiguration

Returns:

this configuration instance
enabled
(boolean nonstop)

Set the value of nonstop

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public void
freezeConfig()

Freeze the config.

public int

Returns:

the value of factor
getBulkOpsTimeoutMultiplyFactor
()

returns the time out multiplication factor for bulk cache operations

public long

Returns:

the value of the search timeout in milliseconds
getSearchTimeoutMillis
()

Returns the value of the search timeout in milliseconds

public TimeoutBehaviorConfiguration

Returns:

value of timeoutBehavior configured
getTimeoutBehavior
()

Returns value of timeoutBehavior configured

public long

Returns:

the value of timeout in milliseconds
getTimeoutMillis
()

Returns the value of timeout in milliseconds

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public NonstopConfiguration

Returns:

this configuration instance
immediateTimeout
(boolean immediateTimeout)

Set the value of immediateTimeout

public boolean

Returns:

true if nonstop is enabled in config
isEnabled
()

Returns true if nonstop is enabled in config

public boolean

Returns:

true if immediateTimeout is set to true
isImmediateTimeout
()

Returns true if immediateTimeout is set to true

public NonstopConfiguration

Returns:

this configuration instance
searchTimeoutMillis
(long
the new value of the search timeout in milliseconds
searchTimeoutMillis
)

Set the value of the search timeout

public void
setBulkOpsTimeoutMultiplyFactor(int
the new value
bulkOpsTimeoutMultiplyFactor
)

Sets the value of the multiplication factor for bulk cache operations

public void
setEnabled(boolean
the new value
enabled
)

Set the value of nonstop is enabled or not

public void
setImmediateTimeout(boolean
the new value
immediateTimeout
)

Set the value of immediateTimeout

public void
setSearchTimeoutMillis(long
the new value
searchTimeoutMillis
)

Set the value of the search timeout

public void
setTimeoutMillis(long
the new value
timeoutMillis
)

Set the value of timeoutMillis

public NonstopConfiguration

Returns:

this configuration instance
timeoutBehavior
(TimeoutBehaviorConfiguration timeoutBehavior)

Set the value of timeoutBehavior

public NonstopConfiguration

Returns:

this configuration instance
timeoutMillis
(long
the new value
timeoutMillis
)

Set the value of timeoutMillis

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

BULK_OPS_TIMEOUT_MULTIPLY_FACTORback to summary
public static final String BULK_OPS_TIMEOUT_MULTIPLY_FACTOR

System Property name for bulk operations multiply factor

bulkOpsTimeoutMultiplyFactorback to summary
private volatile int bulkOpsTimeoutMultiplyFactor
configFrozenback to summary
private volatile boolean configFrozen
DEFAULT_BULK_OP_TIMEOUT_FACTORback to summary
public static final int DEFAULT_BULK_OP_TIMEOUT_FACTOR

Default value of timeout multiplication factor for bulk operations like removeAll or size

DEFAULT_ENABLEDback to summary
public static final boolean DEFAULT_ENABLED

Default value of nonstop attribute

DEFAULT_IMMEDIATE_TIMEOUTback to summary
public static final boolean DEFAULT_IMMEDIATE_TIMEOUT

Default value of immediateTimeout attribute

DEFAULT_SEARCH_TIMEOUT_MILLISback to summary
public static final int DEFAULT_SEARCH_TIMEOUT_MILLIS

Default value of searchTimeoutMillis attribute

DEFAULT_TIMEOUT_BEHAVIORback to summary
public static final TimeoutBehaviorConfiguration DEFAULT_TIMEOUT_BEHAVIOR

Default value of timeoutBehavior attribute

DEFAULT_TIMEOUT_MILLISback to summary
public static final int DEFAULT_TIMEOUT_MILLIS

Default value of timeoutMillis attribute

enabledback to summary
private volatile boolean enabled
immediateTimeoutback to summary
private volatile boolean immediateTimeout
searchTimeoutMillisback to summary
private volatile long searchTimeoutMillis
timeoutBehaviorback to summary
private TimeoutBehaviorConfiguration timeoutBehavior
timeoutMillisback to summary
private volatile long timeoutMillis

Constructor Detail

NonstopConfigurationback to summary
public NonstopConfiguration()

Method Detail

addTimeoutBehaviorback to summary
public void addTimeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)

Set the value of timeoutBehavior

cloneback to summary
public NonstopConfiguration clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:NonstopConfiguration

a clone of this instance.

Annotations
@Override
Exceptions
CloneNotSupportedException:
if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
enabledback to summary
public NonstopConfiguration enabled(boolean nonstop)

Set the value of nonstop

Returns:NonstopConfiguration

this configuration instance

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
freezeConfigback to summary
public void freezeConfig()

Freeze the config. Once frozen, 'enabled' can't be changed

getBulkOpsTimeoutMultiplyFactorback to summary
public int getBulkOpsTimeoutMultiplyFactor()

returns the time out multiplication factor for bulk cache operations

Returns:int

the value of factor

getSearchTimeoutMillisback to summary
public long getSearchTimeoutMillis()

Returns the value of the search timeout in milliseconds

Returns:long

the value of the search timeout in milliseconds

getTimeoutBehaviorback to summary
public TimeoutBehaviorConfiguration getTimeoutBehavior()

Returns value of timeoutBehavior configured

Returns:TimeoutBehaviorConfiguration

value of timeoutBehavior configured

getTimeoutMillisback to summary
public long getTimeoutMillis()

Returns the value of timeout in milliseconds

Returns:long

the value of timeout in milliseconds

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
immediateTimeoutback to summary
public NonstopConfiguration immediateTimeout(boolean immediateTimeout)

Set the value of immediateTimeout

Returns:NonstopConfiguration

this configuration instance

isEnabledback to summary
public boolean isEnabled()

Returns true if nonstop is enabled in config

Returns:boolean

true if nonstop is enabled in config

isImmediateTimeoutback to summary
public boolean isImmediateTimeout()

Returns true if immediateTimeout is set to true

Returns:boolean

true if immediateTimeout is set to true

searchTimeoutMillisback to summary
public NonstopConfiguration searchTimeoutMillis(long searchTimeoutMillis)

Set the value of the search timeout

Parameters
searchTimeoutMillis:long

the new value of the search timeout in milliseconds

Returns:NonstopConfiguration

this configuration instance

setBulkOpsTimeoutMultiplyFactorback to summary
public void setBulkOpsTimeoutMultiplyFactor(int bulkOpsTimeoutMultiplyFactor)

Sets the value of the multiplication factor for bulk cache operations

Parameters
bulkOpsTimeoutMultiplyFactor:int

the new value

setEnabledback to summary
public void setEnabled(boolean enabled)

Set the value of nonstop is enabled or not

Parameters
enabled:boolean

the new value

setImmediateTimeoutback to summary
public void setImmediateTimeout(boolean immediateTimeout)

Set the value of immediateTimeout

Parameters
immediateTimeout:boolean

the new value

setSearchTimeoutMillisback to summary
public void setSearchTimeoutMillis(long searchTimeoutMillis)

Set the value of the search timeout

Parameters
searchTimeoutMillis:long

the new value

setTimeoutMillisback to summary
public void setTimeoutMillis(long timeoutMillis)

Set the value of timeoutMillis

Parameters
timeoutMillis:long

the new value

timeoutBehaviorback to summary
public NonstopConfiguration timeoutBehavior(TimeoutBehaviorConfiguration timeoutBehavior)

Set the value of timeoutBehavior

Returns:NonstopConfiguration

this configuration instance

timeoutMillisback to summary
public NonstopConfiguration timeoutMillis(long timeoutMillis)

Set the value of timeoutMillis

Parameters
timeoutMillis:long

the new value

Returns:NonstopConfiguration

this configuration instance