Class LockingConfiguration
java.lang.Object
org.infinispan.commons.configuration.attributes.ConfigurationElement<LockingConfiguration>
org.infinispan.configuration.cache.LockingConfiguration
- All Implemented Interfaces:
Matchable<LockingConfiguration>
,Updatable<LockingConfiguration>
Defines the local, in-VM locking and concurrency characteristics of the cache.
- Author:
- pmuir
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AttributeDefinition<Integer>
static final AttributeDefinition<IsolationLevel>
static final AttributeDefinition<Long>
static final AttributeDefinition<Boolean>
Fields inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement
attributes, CHILDLESS, children, element, repeated
-
Method Summary
Modifier and TypeMethodDescriptionint
Concurrency level for lock containers.Cache isolation level.long
Maximum time to attempt a particular lock acquisitionlockAcquisitionTimeout
(long timeout) boolean
If true, a pool of shared locks is maintained for all entries that need to be locked.Methods inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement
attributes, child, children, children, elementName, equals, findAttribute, hashCode, isModified, list, matches, toString, update, validateUpdate, write
-
Field Details
-
CONCURRENCY_LEVEL
-
ISOLATION_LEVEL
-
LOCK_ACQUISITION_TIMEOUT
-
USE_LOCK_STRIPING
-
-
Method Details
-
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
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
-
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.
-