public static final class

CoherenceCacheStrategy.Lock

extends Object
implements CoherenceCacheStrategy.Lockable Serializable CacheConcurrencyStrategy.SoftLock
java.lang.Object
   ↳ com.atlassian.confluence.cache.tangosol.hibernate.CoherenceCacheStrategy.Lock

Class Overview

A soft lock which supports concurrent locking, timestamped with the time it was released

Summary

Public Constructors
CoherenceCacheStrategy.Lock(long timeout, int id, Object version)
Public Methods
int getId()
long getUnlockTimestamp()
boolean isGettable(long txTimestamp)
locks are not returned to the client!
boolean isLock()
Yes, this is a lock
boolean isPuttable(long txTimestamp, Object newVersion, Comparator comparator)
Can the timestamped transaction re-cache this locked item now?
CoherenceCacheStrategy.Lock lock(long timeout, int id)
Increment the lock, setting the new lock timeout
String toString()
void unlock(long currentTimestamp)
Decrement the lock, setting the unlock timestamp if now unlocked
boolean wasLockedConcurrently()
Was this lock held concurrently by multiple transactions?
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.cache.tangosol.hibernate.CoherenceCacheStrategy.Lockable

Public Constructors

public CoherenceCacheStrategy.Lock (long timeout, int id, Object version)

Public Methods

public int getId ()

public long getUnlockTimestamp ()

public boolean isGettable (long txTimestamp)

locks are not returned to the client!

public boolean isLock ()

Yes, this is a lock

public boolean isPuttable (long txTimestamp, Object newVersion, Comparator comparator)

Can the timestamped transaction re-cache this locked item now?

public CoherenceCacheStrategy.Lock lock (long timeout, int id)

Increment the lock, setting the new lock timeout

public String toString ()

public void unlock (long currentTimestamp)

Decrement the lock, setting the unlock timestamp if now unlocked

public boolean wasLockedConcurrently ()

Was this lock held concurrently by multiple transactions?