org.terracotta.collections
Class HashcodeLockStrategy

java.lang.Object
  extended by org.terracotta.collections.BasicLockStrategy<Object>
      extended by org.terracotta.collections.HashcodeLockStrategy
All Implemented Interfaces:
LockStrategy<Object>

public class HashcodeLockStrategy
extends BasicLockStrategy<Object>


Constructor Summary
HashcodeLockStrategy()
           
 
Method Summary
 String generateLockIdForKey(String instanceQualifier, Object key)
          Generate the terracotta lock identifier used when performing operations for the given key.
 
Methods inherited from class org.terracotta.collections.BasicLockStrategy
beginLock, commitLock, pinLock, tryBeginLock, unpinLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashcodeLockStrategy

public HashcodeLockStrategy()
Method Detail

generateLockIdForKey

public String generateLockIdForKey(String instanceQualifier,
                                   Object key)
Description copied from interface: LockStrategy
Generate the terracotta lock identifier used when performing operations for the given key.

Parameters:
instanceQualifier - A unique identifier for the map being operated on. To avoid lock collisions with other maps, this identifier should be part of the return lockId
Returns:
lock identifier


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.