Class LockingConfiguration
- java.lang.Object
-
- org.infinispan.configuration.cache.LockingConfiguration
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.attributes.Matchable<LockingConfiguration>
public class LockingConfiguration extends Object implements org.infinispan.commons.configuration.attributes.Matchable<LockingConfiguration>
Defines the local, in-VM locking and concurrency characteristics of the cache.- Author:
- pmuir
-
-
Field Summary
Fields Modifier and Type Field Description static org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer>
CONCURRENCY_LEVEL
static org.infinispan.commons.configuration.attributes.AttributeDefinition<IsolationLevel>
ISOLATION_LEVEL
static org.infinispan.commons.configuration.attributes.AttributeDefinition<Long>
LOCK_ACQUISITION_TIMEOUT
static org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean>
USE_LOCK_STRIPING
static org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean>
WRITE_SKEW_CHECK
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.infinispan.commons.configuration.attributes.AttributeSet
attributes()
int
concurrencyLevel()
Concurrency level for lock containers.boolean
equals(Object obj)
int
hashCode()
IsolationLevel
isolationLevel()
Cache isolation level.long
lockAcquisitionTimeout()
Maximum time to attempt a particular lock acquisitionLockingConfiguration
lockAcquisitionTimeout(long timeout)
boolean
supportsConcurrentUpdates()
Deprecated.this option is alwaystrue
and cannot be modified since version 5.3String
toString()
boolean
useLockStriping()
If true, a pool of shared locks is maintained for all entries that need to be locked.boolean
writeSkewCheck()
Deprecated.since 9.0.
-
-
-
Field Detail
-
CONCURRENCY_LEVEL
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer> CONCURRENCY_LEVEL
-
ISOLATION_LEVEL
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<IsolationLevel> ISOLATION_LEVEL
-
LOCK_ACQUISITION_TIMEOUT
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long> LOCK_ACQUISITION_TIMEOUT
-
USE_LOCK_STRIPING
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean> USE_LOCK_STRIPING
-
WRITE_SKEW_CHECK
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean> WRITE_SKEW_CHECK
-
-
Method Detail
-
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.
-
supportsConcurrentUpdates
@Deprecated public boolean supportsConcurrentUpdates()
Deprecated.this option is alwaystrue
and cannot be modified since version 5.3This option applies to non-transactional caches only (both clustered and local): if set to true(default value) the cache keeps data consistent in the case of concurrent updates. For clustered caches this comes at the cost of an additional RPC, so if you don't expect your application to write data concurrently, disabling this flag increases performance.
-
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.
-
writeSkewCheck
@Deprecated public boolean writeSkewCheck()
Deprecated.since 9.0.This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception.
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
-
-