| Modifier and Type | Class and Description |
|---|---|
| protected static class | AbstractReadWriteEhcacheAccessStrategy.Item
Wrapper type representing unlocked items. |
| protected static class | AbstractReadWriteEhcacheAccessStrategy.Lock
Wrapper type representing locked items. |
| protected static interface | AbstractReadWriteEhcacheAccessStrategy.Lockable
Interface type implemented by all wrapper objects in the cache. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private final AtomicLong | |
| private final UUID | |
| private final Comparator |
| Access | Constructor and Description |
|---|---|
| public | AbstractReadWriteEhcacheAccessStrategy(T region, Settings settings)
Creates a read/write cache access strategy around the given cache region. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | decrementLock(Object key, AbstractReadWriteEhcacheAccessStrategy.
Unlock and re-put the given key, lock combination. |
| public final Object | |
| protected void | handleMissingLock(Object key, AbstractReadWriteEhcacheAccessStrategy.
Handle the timeout of a previous lock mapped to this key |
| public final SoftLock | |
| private long | |
| public final boolean | putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)
Implements abstract net. false and fails to put the value if there is an existing un-writeable item mapped to this
key.
|
| private void | |
| private void | readLockIfNeeded(Object key)
Read lock the entry for the given key if internal cache locks will not provide correct exclusion. |
| private void | readUnlockIfNeeded(Object key)
Read unlock the entry for the given key if internal cache locks will not provide correct exclusion. |
| public final void |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| nextLockId | back to summary |
|---|---|
| private final AtomicLong nextLockId | |
| uuid | back to summary |
|---|---|
| private final UUID uuid | |
| versionComparator | back to summary |
|---|---|
| private final Comparator<T> versionComparator | |
| AbstractReadWriteEhcacheAccessStrategy | back to summary |
|---|---|
| public AbstractReadWriteEhcacheAccessStrategy(T region, Settings settings) Creates a read/write cache access strategy around the given cache region. | |
| decrementLock | back to summary |
|---|---|
| protected void decrementLock(Object key, AbstractReadWriteEhcacheAccessStrategy. Unlock and re-put the given key, lock combination. | |
| get | back to summary |
|---|---|
| public final Object get(Object key, long txTimestamp) throws CacheException Returns | |
| handleMissingLock | back to summary |
|---|---|
| protected void handleMissingLock(Object key, AbstractReadWriteEhcacheAccessStrategy. Handle the timeout of a previous lock mapped to this key | |
| lockItem | back to summary |
|---|---|
| public final SoftLock lockItem(Object key, Object version) throws CacheException Soft-lock a cache item. | |
| nextLockId | back to summary |
|---|---|
| private long nextLockId() | |
| putFromLoad | back to summary |
|---|---|
| public final boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws CacheException Implements abstract net. Returns | |
| putLock | back to summary |
|---|---|
| private void putLock(final Object key, final AbstractReadWriteEhcacheAccessStrategy. | |
| readLockIfNeeded | back to summary |
|---|---|
| private void readLockIfNeeded(Object key) Read lock the entry for the given key if internal cache locks will not provide correct exclusion. | |
| readUnlockIfNeeded | back to summary |
|---|---|
| private void readUnlockIfNeeded(Object key) Read unlock the entry for the given key if internal cache locks will not provide correct exclusion. | |
| unlockItem | back to summary |
|---|---|
| public final void unlockItem(Object key, SoftLock lock) throws CacheException Soft-unlock a cache item. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final long | |
| private final Object | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Object | getValue()
Implements net. |
| public boolean | isReadable(long txTimestamp)
Implements net. true if the enclosed value can be read by a transaction started at the given time.
|
| public boolean | isUnlockable(SoftLock lock)
Implements net. true if the given lock can be unlocked using the given SoftLock instance as a handle.
|
| public boolean | isWriteable(long txTimestamp, Object newVersion, Comparator<T> versionComparator)
Implements net. true if the enclosed value can be replaced with one of the given version by a
transaction started at the given time.
|
| public AbstractReadWriteEhcacheAccessStrategy. | lock(long timeout, UUID uuid, long lockId)
Implements net. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| timestamp | back to summary |
|---|---|
| private final long timestamp | |
| value | back to summary |
|---|---|
| private final Object value | |
| version | back to summary |
|---|---|
| private final Object version | |
| Item | back to summary |
|---|---|
| pack-priv Item(Object value, Object version, long timestamp) Creates an unlocked item wrapping the given value with a version and creation timestamp. | |
| getValue | back to summary |
|---|---|
| public Object getValue() Implements net. Doc from net. Returns the enclosed value. | |
| isReadable | back to summary |
|---|---|
| public boolean isReadable(long txTimestamp) Implements net. Doc from net. Returns | |
| isUnlockable | back to summary |
|---|---|
| public boolean isUnlockable(SoftLock lock) Implements net. Doc from net. Returns | |
| isWriteable | back to summary |
|---|---|
| public boolean isWriteable(long txTimestamp, Object newVersion, Comparator<T> versionComparator) Implements net. Doc from net. Returns | |
| lock | back to summary |
|---|---|
| public AbstractReadWriteEhcacheAccessStrategy. Implements net. Doc from net. Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occuring at the specified time. The returned Lock object can be used to unlock the entry in the future. | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final long | |
| private int | |
| private static final long | |
| private final UUID | |
| private long | |
| private long | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public Object | getValue()
Implements net. |
| public int | |
| public boolean | |
| public boolean | isReadable(long txTimestamp)
Implements net. true if the enclosed value can be read by a transaction started at the given time.
|
| public boolean | isUnlockable(SoftLock lock)
Implements net. true if the given lock can be unlocked using the given SoftLock instance as a handle.
|
| public boolean | isWriteable(long txTimestamp, Object newVersion, Comparator<T> versionComparator)
Implements net. true if the enclosed value can be replaced with one of the given version by a
transaction started at the given time.
|
| public AbstractReadWriteEhcacheAccessStrategy. | lock(long timeout, UUID uuid, long lockId)
Implements net. |
| public String | |
| public void | |
| public boolean | wasLockedConcurrently()
Returns true if this Lock has been concurrently locked by more than one transaction. |
| concurrent | back to summary |
|---|---|
| private boolean concurrent | |
| lockId | back to summary |
|---|---|
| private final long lockId | |
| multiplicity | back to summary |
|---|---|
| private int multiplicity | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| sourceUuid | back to summary |
|---|---|
| private final UUID sourceUuid | |
| timeout | back to summary |
|---|---|
| private long timeout | |
| unlockTimestamp | back to summary |
|---|---|
| private long unlockTimestamp | |
| version | back to summary |
|---|---|
| private final Object version | |
| Lock | back to summary |
|---|---|
| pack-priv Lock(long timeout, UUID sourceUuid, long lockId, Object version) Creates a locked item with the given identifiers and object version. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getValue | back to summary |
|---|---|
| public Object getValue() Implements net. Doc from net. Returns the enclosed value. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isLocked | back to summary |
|---|---|
| public boolean isLocked() Tells whether the Lock is currently held
| |
| isReadable | back to summary |
|---|---|
| public boolean isReadable(long txTimestamp) Implements net. Doc from net. Returns | |
| isUnlockable | back to summary |
|---|---|
| public boolean isUnlockable(SoftLock lock) Implements net. Doc from net. Returns | |
| isWriteable | back to summary |
|---|---|
| public boolean isWriteable(long txTimestamp, Object newVersion, Comparator<T> versionComparator) Implements net. Doc from net. Returns | |
| lock | back to summary |
|---|---|
| public AbstractReadWriteEhcacheAccessStrategy. Implements net. Doc from net. Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occuring at the specified time. The returned Lock object can be used to unlock the entry in the future. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| unlock | back to summary |
|---|---|
| public void unlock(long timestamp) Unlocks this Lock, and timestamps the unlock event. | |
| wasLockedConcurrently | back to summary |
|---|---|
| public boolean wasLockedConcurrently() Returns true if this Lock has been concurrently locked by more than one transaction. | |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public boolean | isReadable(long txTimestamp)
Returns |
| public boolean | isUnlockable(SoftLock lock)
Returns |
| public boolean | isWriteable(long txTimestamp, Object version, Comparator<T> versionComparator)
Returns |
| public AbstractReadWriteEhcacheAccessStrategy. |
| getValue | back to summary |
|---|---|
| public Object getValue() Returns the enclosed value. | |
| isReadable | back to summary |
|---|---|
| public boolean isReadable(long txTimestamp) Returns | |
| isUnlockable | back to summary |
|---|---|
| public boolean isUnlockable(SoftLock lock) Returns | |
| isWriteable | back to summary |
|---|---|
| public boolean isWriteable(long txTimestamp, Object version, Comparator<T> versionComparator) Returns | |
| lock | back to summary |
|---|---|
| public AbstractReadWriteEhcacheAccessStrategy. Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occuring at the specified time. The returned Lock object can be used to unlock the entry in the future. | |