org.infinispan.configuration.cache
Class LockingConfigurationBuilder

java.lang.Object
  extended by org.infinispan.configuration.cache.LockingConfigurationBuilder
All Implemented Interfaces:
ConfigurationChildBuilder

public class LockingConfigurationBuilder
extends Object

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

Author:
pmuir

Constructor Summary
protected LockingConfigurationBuilder(ConfigurationBuilder builder)
           
 
Method Summary
 Configuration build()
           
 ClusteringConfigurationBuilder clustering()
           
 LockingConfigurationBuilder concurrencyLevel(int i)
          Concurrency level for lock containers.
 CustomInterceptorsConfigurationBuilder customInterceptors()
           
 DataContainerConfigurationBuilder dataContainer()
           
 DeadlockDetectionConfigurationBuilder deadlockDetection()
           
 EvictionConfigurationBuilder eviction()
           
 ExpirationConfigurationBuilder expiration()
           
protected  ConfigurationBuilder getBuilder()
           
 IndexingConfigurationBuilder indexing()
           
 InvocationBatchingConfigurationBuilder invocationBatching()
           
 LockingConfigurationBuilder isolationLevel(IsolationLevel isolationLevel)
          Cache isolation level.
 JMXStatisticsConfigurationBuilder jmxStatistics()
           
 LoadersConfigurationBuilder loaders()
           
 LockingConfigurationBuilder lockAcquisitionTimeout(long l)
          Maximum time to attempt a particular lock acquisition
 LockingConfigurationBuilder locking()
           
 LockingConfigurationBuilder read(LockingConfiguration template)
           
 StoreAsBinaryConfigurationBuilder storeAsBinary()
           
 String toString()
           
 TransactionConfigurationBuilder transaction()
           
 UnsafeConfigurationBuilder unsafe()
           
 LockingConfigurationBuilder useLockStriping(boolean b)
          If true, a pool of shared locks is maintained for all entries that need to be locked.
 VersioningConfigurationBuilder versioning()
           
 LockingConfigurationBuilder writeSkewCheck(boolean b)
          This setting is only applicable in the case of REPEATABLE_READ.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockingConfigurationBuilder

protected LockingConfigurationBuilder(ConfigurationBuilder builder)
Method Detail

concurrencyLevel

public LockingConfigurationBuilder concurrencyLevel(int i)
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 LockingConfigurationBuilder 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.


lockAcquisitionTimeout

public LockingConfigurationBuilder lockAcquisitionTimeout(long l)
Maximum time to attempt a particular lock acquisition


useLockStriping

public LockingConfigurationBuilder useLockStriping(boolean b)
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

public LockingConfigurationBuilder writeSkewCheck(boolean b)
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.


read

public LockingConfigurationBuilder read(LockingConfiguration template)

toString

public String toString()
Overrides:
toString in class Object

clustering

public ClusteringConfigurationBuilder clustering()
Specified by:
clustering in interface ConfigurationChildBuilder

customInterceptors

public CustomInterceptorsConfigurationBuilder customInterceptors()
Specified by:
customInterceptors in interface ConfigurationChildBuilder

dataContainer

public DataContainerConfigurationBuilder dataContainer()
Specified by:
dataContainer in interface ConfigurationChildBuilder

deadlockDetection

public DeadlockDetectionConfigurationBuilder deadlockDetection()
Specified by:
deadlockDetection in interface ConfigurationChildBuilder

eviction

public EvictionConfigurationBuilder eviction()
Specified by:
eviction in interface ConfigurationChildBuilder

expiration

public ExpirationConfigurationBuilder expiration()
Specified by:
expiration in interface ConfigurationChildBuilder

indexing

public IndexingConfigurationBuilder indexing()
Specified by:
indexing in interface ConfigurationChildBuilder

invocationBatching

public InvocationBatchingConfigurationBuilder invocationBatching()
Specified by:
invocationBatching in interface ConfigurationChildBuilder

jmxStatistics

public JMXStatisticsConfigurationBuilder jmxStatistics()
Specified by:
jmxStatistics in interface ConfigurationChildBuilder

loaders

public LoadersConfigurationBuilder loaders()
Specified by:
loaders in interface ConfigurationChildBuilder

locking

public LockingConfigurationBuilder locking()
Specified by:
locking in interface ConfigurationChildBuilder

storeAsBinary

public StoreAsBinaryConfigurationBuilder storeAsBinary()
Specified by:
storeAsBinary in interface ConfigurationChildBuilder

transaction

public TransactionConfigurationBuilder transaction()
Specified by:
transaction in interface ConfigurationChildBuilder

versioning

public VersioningConfigurationBuilder versioning()
Specified by:
versioning in interface ConfigurationChildBuilder

unsafe

public UnsafeConfigurationBuilder unsafe()
Specified by:
unsafe in interface ConfigurationChildBuilder

getBuilder

protected ConfigurationBuilder getBuilder()

build

public Configuration build()
Specified by:
build in interface ConfigurationChildBuilder

-->

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