Class LockingConfiguration
- java.lang.Object
-
- org.infinispan.configuration.cache.LockingConfiguration
-
- All Implemented Interfaces:
Matchable<LockingConfiguration>
,BaseConfigurationInfo
,ConfigurationInfo
public class LockingConfiguration extends java.lang.Object implements Matchable<LockingConfiguration>, ConfigurationInfo
Defines the local, in-VM locking and concurrency characteristics of the cache.- Author:
- pmuir
-
-
Field Summary
Fields Modifier and Type Field Description static AttributeDefinition<java.lang.Integer>
CONCURRENCY_LEVEL
static AttributeDefinition<IsolationLevel>
ISOLATION_LEVEL
static AttributeDefinition<java.lang.Long>
LOCK_ACQUISITION_TIMEOUT
static AttributeDefinition<java.lang.Boolean>
USE_LOCK_STRIPING
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSet
attributes()
int
concurrencyLevel()
Concurrency level for lock containers.boolean
equals(java.lang.Object obj)
ElementDefinition
getElementDefinition()
int
hashCode()
IsolationLevel
isolationLevel()
Cache isolation level.long
lockAcquisitionTimeout()
Maximum time to attempt a particular lock acquisitionLockingConfiguration
lockAcquisitionTimeout(long timeout)
java.lang.String
toString()
boolean
useLockStriping()
If true, a pool of shared locks is maintained for all entries that need to be locked.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationInfo
subElements
-
-
-
-
Field Detail
-
CONCURRENCY_LEVEL
public static final AttributeDefinition<java.lang.Integer> CONCURRENCY_LEVEL
-
ISOLATION_LEVEL
public static final AttributeDefinition<IsolationLevel> ISOLATION_LEVEL
-
LOCK_ACQUISITION_TIMEOUT
public static final AttributeDefinition<java.lang.Long> LOCK_ACQUISITION_TIMEOUT
-
USE_LOCK_STRIPING
public static final AttributeDefinition<java.lang.Boolean> USE_LOCK_STRIPING
-
-
Method Detail
-
getElementDefinition
public ElementDefinition getElementDefinition()
- Specified by:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of the configuration.
-
concurrencyLevel
public int concurrencyLevel()
Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan. Similar to the concurrencyLevel tuning parameter seen in the JDK's ConcurrentHashMap.
-
isolationLevel
public IsolationLevel isolationLevel()
Cache isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation levels. See http://en.wikipedia.org/wiki/Isolation_level for a discussion on isolation levels.
-
lockAcquisitionTimeout
public long lockAcquisitionTimeout()
Maximum time to attempt a particular lock acquisition
-
lockAcquisitionTimeout
public LockingConfiguration lockAcquisitionTimeout(long timeout)
-
useLockStriping
public boolean useLockStriping()
If true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
-
attributes
public AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Returns:
- the
AttributeSet
declared by the configuration.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-