org.infinispan.config
Class Configuration.LockingType

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.config.Configuration.LockingType
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, Configuration.LockingConfig, JAXBUnmarshallable
Enclosing class:
Configuration

public static class Configuration.LockingType
extends AbstractNamedCacheConfigurationBean
implements Configuration.LockingConfig

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

See Also:
Configuration reference, Serialized Form

Field Summary
protected  Integer concurrencyLevel
           
protected  IsolationLevel isolationLevel
           
protected  Long lockAcquisitionTimeout
           
protected  Boolean useLockStriping
           
protected  Boolean writeSkewCheck
           
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
EMPTY_PROPERTIES, log, overriddenConfigurationElements
 
Constructor Summary
Configuration.LockingType()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 Configuration.LockingConfig concurrencyLevel(Integer concurrencyLevel)
          Concurrency level for lock containers.
 boolean equals(Object o)
           
 int hashCode()
           
 Configuration.LockingConfig isolationLevel(IsolationLevel isolationLevel)
          Cache isolation level.
 Configuration.LockingConfig lockAcquisitionTimeout(Long lockAcquisitionTimeout)
          Maximum time to attempt a particular lock acquisition
 void setConcurrencyLevel(Integer concurrencyLevel)
           
 void setIsolationLevel(IsolationLevel isolationLevel)
           
 void setLockAcquisitionTimeout(Long lockAcquisitionTimeout)
           
 void setUseLockStriping(Boolean useLockStriping)
           
 void setWriteSkewCheck(Boolean writeSkewCheck)
           
 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.
 
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
clone, hasComponentStarted, inject
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, uc, willUnmarshall
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lockAcquisitionTimeout

@Dynamic
protected Long lockAcquisitionTimeout

isolationLevel

protected IsolationLevel isolationLevel

writeSkewCheck

protected Boolean writeSkewCheck

useLockStriping

protected Boolean useLockStriping

concurrencyLevel

protected Integer concurrencyLevel
Constructor Detail

Configuration.LockingType

public Configuration.LockingType()
Method Detail

lockAcquisitionTimeout

public Configuration.LockingConfig lockAcquisitionTimeout(Long lockAcquisitionTimeout)
Description copied from interface: Configuration.LockingConfig
Maximum time to attempt a particular lock acquisition

Specified by:
lockAcquisitionTimeout in interface Configuration.LockingConfig

setLockAcquisitionTimeout

public void setLockAcquisitionTimeout(Long lockAcquisitionTimeout)

accept

public void accept(ConfigurationBeanVisitor v)

isolationLevel

public Configuration.LockingConfig isolationLevel(IsolationLevel isolationLevel)
Description copied from interface: Configuration.LockingConfig
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.

Specified by:
isolationLevel in interface Configuration.LockingConfig

setIsolationLevel

public void setIsolationLevel(IsolationLevel isolationLevel)

writeSkewCheck

public Configuration.LockingConfig writeSkewCheck(Boolean writeSkewCheck)
Description copied from interface: Configuration.LockingConfig
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.

Specified by:
writeSkewCheck in interface Configuration.LockingConfig

setWriteSkewCheck

public void setWriteSkewCheck(Boolean writeSkewCheck)

useLockStriping

public Configuration.LockingConfig useLockStriping(Boolean useLockStriping)
Description copied from interface: Configuration.LockingConfig
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.

Specified by:
useLockStriping in interface Configuration.LockingConfig

setUseLockStriping

public void setUseLockStriping(Boolean useLockStriping)

concurrencyLevel

public Configuration.LockingConfig concurrencyLevel(Integer concurrencyLevel)
Description copied from interface: Configuration.LockingConfig
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.

Specified by:
concurrencyLevel in interface Configuration.LockingConfig

setConcurrencyLevel

public void setConcurrencyLevel(Integer concurrencyLevel)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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