org.infinispan.config
Interface Configuration.LockingConfig

All Known Implementing Classes:
Configuration.LockingType
Enclosing class:
Configuration

public static interface Configuration.LockingConfig

Defines the local, in-VM locking and concurrency characteristics of the cache.

Since:
5.0
Author:
Vladimir Blagojevic

Method Summary
 Configuration.LockingConfig concurrencyLevel(Integer concurrencyLevel)
          Concurrency level for lock containers.
 Configuration.LockingConfig isolationLevel(IsolationLevel isolationLevel)
          Cache isolation level.
 Configuration.LockingConfig lockAcquisitionTimeout(Long lockAcquisitionTimeout)
          Maximum time to attempt a particular lock acquisition
 Configuration.LockingConfig useLockStriping(Boolean useLockStriping)
          If true, a pool of shared locks is maintained for all entries that need to be locked.
 Configuration.LockingConfig writeSkewCheck(Boolean writeSkewCheck)
          This setting is only applicable in the case of REPEATABLE_READ.
 

Method Detail

lockAcquisitionTimeout

Configuration.LockingConfig lockAcquisitionTimeout(Long lockAcquisitionTimeout)
Maximum time to attempt a particular lock acquisition

Parameters:
lockAcquisitionTimeout -

isolationLevel

Configuration.LockingConfig isolationLevel(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.

Parameters:
isolationLevel -

writeSkewCheck

Configuration.LockingConfig writeSkewCheck(Boolean writeSkewCheck)
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.

Parameters:
writeSkewCheck -

useLockStriping

Configuration.LockingConfig useLockStriping(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.

Parameters:
useLockStriping -

concurrencyLevel

Configuration.LockingConfig concurrencyLevel(Integer concurrencyLevel)
Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interating with Infinispan. Similar to the concurrencyLevel tuning parameter seen in the JDK's ConcurrentHashMap.

Parameters:
concurrencyLevel -


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.