Top Description Methods
net.sf.ehcache.transaction

public Interface SoftLockManager

Known Direct Implementers
net.sf.ehcache.transaction.AbstractSoftLockManager
Imports
net.sf.ehcache.Element, net.sf.ehcache.store.Store, net.sf.ehcache.transaction.local.LocalTransactionContext, java.util.Set

A factory for SoftLocks
Author
Ludovic Orban

Method Summary

Modifier and TypeMethod and Description
public void
clearSoftLock(SoftLock
the lock to clear
softLock
)

Clear a soft lock

public Set<SoftLock>

Returns:

a Set of SoftLocks
collectAllSoftLocksForTransactionID
(TransactionID
the transaction ID
transactionID
)

Get a the soft locks of the specified transaction ID

public SoftLockID

Returns:

the soft lock ID
createSoftLockID
(TransactionID
the transaction ID under which the soft lock will operate
transactionID
,
Object
the key of the Element this soft lock is protecting
key
,
Element
the new Element
newElement
,
Element
the actual Element
oldElement
)

Create a new soft lock ID and associated soft lock if necessary.

public SoftLock

Returns:

the soft lock, or null if no soft lock with the corresponding ID could be found
findSoftLockById
(SoftLockID
the soft lock's ID
softLockId
)

Find a previously created and still existing soft lock

public Set<Object>

Returns:

a Set of keys invisible to the context
getKeysInvisibleInContext
(LocalTransactionContext
the transaction context
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

clearSoftLockback to summary
public void clearSoftLock(SoftLock softLock)

Clear a soft lock

Parameters
softLock:SoftLock

the lock to clear

collectAllSoftLocksForTransactionIDback to summary
public Set<SoftLock> collectAllSoftLocksForTransactionID(TransactionID transactionID)

Get a the soft locks of the specified transaction ID

Parameters
transactionID:TransactionID

the transaction ID

Returns:Set<SoftLock>

a Set of SoftLocks

createSoftLockIDback to summary
public SoftLockID createSoftLockID(TransactionID transactionID, Object key, Element newElement, Element oldElement)

Create a new soft lock ID and associated soft lock if necessary.

Parameters
transactionID:TransactionID

the transaction ID under which the soft lock will operate

key:Object

the key of the Element this soft lock is protecting

newElement:Element

the new Element

oldElement:Element

the actual Element

Returns:SoftLockID

the soft lock ID

findSoftLockByIdback to summary
public SoftLock findSoftLockById(SoftLockID softLockId)

Find a previously created and still existing soft lock

Parameters
softLockId:SoftLockID

the soft lock's ID

Returns:SoftLock

the soft lock, or null if no soft lock with the corresponding ID could be found

getKeysInvisibleInContextback to summary
public 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:LocalTransactionContext

the transaction context

Returns:Set<Object>

a Set of keys invisible to the context