| Modifier and Type | Class and Description |
|---|---|
| public static class | AbstractReadWriteAccess.Item
Wrapper type representing unlocked items. |
| public static interface | AbstractReadWriteAccess.Lockable
Interface type implemented by all wrapper objects in the cache. |
| public static class | AbstractReadWriteAccess.SoftLockImpl
Wrapper type representing locked items. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private final AtomicLong | |
| private final Lock | |
| private final ReentrantReadWriteLock | |
| private final UUID | |
| private final Lock |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | decrementLock(SharedSessionContractImplementor session, Object key, AbstractReadWriteAccess.
|
| public Object | get(SharedSessionContractImplementor
Current session. session, Object The key of the item to be retrieved. key)Overrides org. Implements org. null if the item is not readable.
|
| protected abstract AccessedDataClassification | |
| protected abstract Comparator | |
| protected void | handleLockExpiry(SharedSessionContractImplementor session, Object key, AbstractReadWriteAccess.
|
| public SoftLock | lockItem(SharedSessionContractImplementor
Current session. session, Object The key of the item to lock key, Object The item's current version value version)Implements org. |
| protected long | |
| public boolean | putFromLoad(SharedSessionContractImplementor
Current session. session, Object The item key key, Object The item value, Object the item version number version)Overrides org. Implements org. |
| public final boolean | putFromLoad(SharedSessionContractImplementor
Current session. session, Object The item key key, Object The item value, Object the item version number version, boolean Explicit minimalPut flag minimalPutOverride)Overrides org. Implements org. |
| protected Lock | |
| public void | remove(SharedSessionContractImplementor
Current session. session, Object The key of the item to remove key)Overrides org. Implements org. |
| public void | removeAll(SharedSessionContractImplementor session)
Overrides org. Implements org. |
| public void | unlockItem(SharedSessionContractImplementor
Current session. session, Object The item key key, SoftLock The lock previously obtained from lock)lockItemImplements org. |
| protected UUID | |
| protected Lock |
| log | back to summary |
|---|---|
| private static final Logger log Hides org. | |
| nextLockId | back to summary |
|---|---|
| private final AtomicLong nextLockId | |
| readLock | back to summary |
|---|---|
| private final Lock readLock | |
| reentrantReadWriteLock | back to summary |
|---|---|
| private final ReentrantReadWriteLock reentrantReadWriteLock | |
| uuid | back to summary |
|---|---|
| private final UUID uuid | |
| writeLock | back to summary |
|---|---|
| private final Lock writeLock | |
| AbstractReadWriteAccess | back to summary |
|---|---|
| protected AbstractReadWriteAccess(DomainDataRegion domainDataRegion, DomainDataStorageAccess storageAccess) | |
| decrementLock | back to summary |
|---|---|
| protected void decrementLock(SharedSessionContractImplementor session, Object key, AbstractReadWriteAccess. | |
| get | back to summary |
|---|---|
| public Object get(SharedSessionContractImplementor session, Object key) Overrides org. Implements org. Returns
| |
| getAccessedDataClassification | back to summary |
|---|---|
| protected abstract AccessedDataClassification getAccessedDataClassification() | |
| getVersionComparator | back to summary |
|---|---|
| protected abstract Comparator | |
| handleLockExpiry | back to summary |
|---|---|
| protected void handleLockExpiry(SharedSessionContractImplementor session, Object key, AbstractReadWriteAccess. | |
| lockItem | back to summary |
|---|---|
| public SoftLock lockItem(SharedSessionContractImplementor session, Object key, Object version) Implements org. Doc from org. We are going to attempt to update/delete the keyed object. This method is used by "asynchronous" concurrency strategies.
The returned object must be passed back to
| |
| nextLockId | back to summary |
|---|---|
| protected long nextLockId() | |
| putFromLoad | back to summary |
|---|---|
| public boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, Object version) Overrides org. Implements org. Doc from org. Attempt to cache an object, afterQuery loading from the database.
| |
| putFromLoad | back to summary |
|---|---|
| public final boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, Object version, boolean minimalPutOverride) Overrides org. Implements org. Doc from org. Attempt to cache an object, afterQuery loading from the database, explicitly specifying the minimalPut behavior.
| |
| readLock | back to summary |
|---|---|
| protected Lock readLock() | |
| remove | back to summary |
|---|---|
| public void remove(SharedSessionContractImplementor session, Object key) Overrides org. Implements org. Doc from org. Called afterQuery an item has become stale (beforeQuery the transaction completes). This method is used by "synchronous" concurrency strategies.
| |
| removeAll | back to summary |
|---|---|
| public void removeAll(SharedSessionContractImplementor session) Overrides org. Implements org. Doc from org. Remove all data for this accessed type
| |
| unlockItem | back to summary |
|---|---|
| public void unlockItem(SharedSessionContractImplementor session, Object key, SoftLock lock) Implements org. Doc from org. Called when we have finished the attempted update/delete (which may or may not have been successful), after transaction completion. This method is used by "asynchronous" concurrency strategies.
| |
| uuid | back to summary |
|---|---|
| protected UUID uuid() | |
| writeLock | back to summary |
|---|---|
| protected Lock writeLock() | |
| 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 org. |
| public boolean | isReadable(long txTimestamp)
Implements org. true if the enclosed value can be read by a transaction started at the given time.
|
| public boolean | isUnlockable(SoftLock lock)
Implements org. 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 org. true if the enclosed value can be replaced with one of the given version by a
transaction started at the given time.
|
| public AbstractReadWriteAccess. | lock(long timeout, UUID uuid, long lockId)
Implements org. |
| public String |
| 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 org. Doc from org. Returns the enclosed value.
| |
| isReadable | back to summary |
|---|---|
| public boolean isReadable(long txTimestamp) Implements org. Doc from org. Returns
| |
| isUnlockable | back to summary |
|---|---|
| public boolean isUnlockable(SoftLock lock) Implements org. Doc from org. Returns
| |
| isWriteable | back to summary |
|---|---|
| public boolean isWriteable(long txTimestamp, Object newVersion, Comparator<T> versionComparator) Implements org. Doc from org. Returns
| |
| lock | back to summary |
|---|---|
| public AbstractReadWriteAccess. Implements org. Doc from org. Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring 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. | |
| 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 AbstractReadWriteAccess. |
| 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 AbstractReadWriteAccess. Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring 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 | SoftLockImpl(long timeout, UUID sourceUuid, long lockId, Object version)
Creates a locked item with the given identifiers and object version. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public Object | getValue()
Implements org. |
| public int | |
| public boolean | isReadable(long txTimestamp)
Implements org. true if the enclosed value can be read by a transaction started at the given time.
|
| public boolean | isUnlockable(SoftLock lock)
Implements org. 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 org. true if the enclosed value can be replaced with one of the given version by a
transaction started at the given time.
|
| public AbstractReadWriteAccess. | lock(long timeout, UUID uuid, long lockId)
Implements org. |
| 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 | |
| SoftLockImpl | back to summary |
|---|---|
| pack-priv SoftLockImpl(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 org. Doc from org. 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
| |
| isReadable | back to summary |
|---|---|
| public boolean isReadable(long txTimestamp) Implements org. Doc from org. Returns
| |
| isUnlockable | back to summary |
|---|---|
| public boolean isUnlockable(SoftLock lock) Implements org. Doc from org. Returns
| |
| isWriteable | back to summary |
|---|---|
| public boolean isWriteable(long txTimestamp, Object newVersion, Comparator<T> versionComparator) Implements org. Doc from org. Returns
| |
| lock | back to summary |
|---|---|
| public AbstractReadWriteAccess. Implements org. Doc from org. Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring 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. | |