ehcache

net.sf.ehcache.transaction
Interface SoftLockManager

All Known Implementing Classes:
AbstractSoftLockManager, SoftLockManagerImpl

public interface SoftLockManager

A factory for SoftLocks

Author:
Ludovic Orban

Method Summary
 void clearSoftLock(SoftLock softLock)
          Clear a soft lock
 Set<SoftLock> collectAllSoftLocksForTransactionID(TransactionID transactionID)
          Get a the soft locks of the specified transaction ID
 SoftLockID createSoftLockID(TransactionID transactionID, Object key, Element newElement, Element oldElement, boolean pinned)
          Create a new soft lock ID and associated soft lock if necessary.
 SoftLock findSoftLockById(SoftLockID softLockId)
          Find a previously created and still existing soft lock
 Set<Object> getKeysInvisibleInContext(LocalTransactionContext transactionContext, Store underlyingStore)
          Get a Set of keys protected by soft locks which must not be visible to a transaction context according to the isolation level.
 

Method Detail

createSoftLockID

SoftLockID createSoftLockID(TransactionID transactionID,
                            Object key,
                            Element newElement,
                            Element oldElement,
                            boolean pinned)
Create a new soft lock ID and associated soft lock if necessary.

Parameters:
transactionID - the transaction ID under which the soft lock will operate
key - the key of the Element this soft lock is protecting
newElement - the new Element
oldElement - the actual Element
pinned - true if the actual Element is pinned
Returns:
the soft lock ID

clearSoftLock

void clearSoftLock(SoftLock softLock)
Clear a soft lock

Parameters:
softLock - the lock to clear

findSoftLockById

SoftLock findSoftLockById(SoftLockID softLockId)
Find a previously created and still existing soft lock

Parameters:
softLockId - the soft lock's ID
Returns:
the soft lock

getKeysInvisibleInContext

Set<Object> getKeysInvisibleInContext(LocalTransactionContext transactionContext,
                                      Store underlyingStore)
Get a Set of keys protected by soft locks which must not be visible to a transaction context according to the isolation level.

Parameters:
transactionContext - the transaction context
Returns:
a Set of keys invisible to the context

collectAllSoftLocksForTransactionID

Set<SoftLock> collectAllSoftLocksForTransactionID(TransactionID transactionID)
Get a the soft locks of the specified transaction ID

Parameters:
transactionID - the transaction ID
Returns:
a Set of SoftLocks

ehcache

Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.