CollectionDataAccess
using the AccessType#READ_WRITE access type.
| Modifier and Type | Field and Description |
|---|---|
| private final NavigableRole | |
| private final CacheKeysFactory | |
| private final Comparator |
| Access | Constructor and Description |
|---|---|
| public | CollectionReadWriteAccess(DomainDataRegion region, CacheKeysFactory keysFactory, DomainDataStorageAccess storageAccess, CollectionDataCachingConfig config)
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | generateCacheKey(Object
the primary identifier of the Collection id, CollectionPersister the descriptor of the collection for which a key is being generated collectionDescriptor, SessionFactoryImplementor a reference to the current SessionFactory factory, String the tenant id, or null if multi-tenancy is not being used. tenantIdentifier)Implements org.
Deprecated
as a consequence of
To create instances of CollectionCacheKey for this region, Hibernate will invoke this method
exclusively so that generated implementations can generate optimised keys.
SessionFactoryImplementor being deprecated.
|
| public Object | get(SharedSessionContractImplementor
Current session. session, Object The key of the item to be retrieved. key)Overrides org. Implements org. |
| protected AccessedDataClassification | |
| public AccessType | getAccessType()
Implements org. |
| public Object | getCacheKeyId(Object
key previously returned from cacheKey)generateCacheKeyImplements org. generateCacheKey
|
| protected Comparator | |
| public SoftLock | lockItem(SharedSessionContractImplementor
Current session. session, Object The key of the item to lock key, Object The item's current version value version)Overrides org. Implements org. |
| 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 void | unlockItem(SharedSessionContractImplementor
Current session. session, Object The item key key, SoftLock The lock previously obtained from lock)lockItemOverrides org. Implements org. |
| collectionRole | back to summary |
|---|---|
| private final NavigableRole collectionRole | |
| keysFactory | back to summary |
|---|---|
| private final CacheKeysFactory keysFactory | |
| versionComparator | back to summary |
|---|---|
| private final Comparator<T> versionComparator | |
| CollectionReadWriteAccess | back to summary |
|---|---|
| public CollectionReadWriteAccess(DomainDataRegion region, CacheKeysFactory keysFactory, DomainDataStorageAccess storageAccess, CollectionDataCachingConfig config) | |
| generateCacheKey | back to summary |
|---|---|
| public Object generateCacheKey(Object id, CollectionPersister collectionDescriptor, SessionFactoryImplementor factory, String tenantIdentifier) Implements org. Doc from org. Deprecated as a consequence of To create instances of CollectionCacheKey for this region, Hibernate will invoke this method exclusively so that generated implementations can generate optimised keys.
| |
| get | back to summary |
|---|---|
| public Object get(SharedSessionContractImplementor session, Object key) Overrides org. Implements org. Doc from org. Attempt to retrieve an object from the cache. Mainly used in attempting to resolve entities/collections from the second level cache.
| |
| getAccessedDataClassification | back to summary |
|---|---|
| protected AccessedDataClassification getAccessedDataClassification() Implements abstract org.
| |
| getAccessType | back to summary |
|---|---|
| public AccessType getAccessType() Implements org. Doc from org. The type of access implemented
| |
| getCacheKeyId | back to summary |
|---|---|
| public Object getCacheKeyId(Object cacheKey) Implements org. Doc from org. Performs reverse operation to
| |
| getVersionComparator | back to summary |
|---|---|
| protected Comparator Implements abstract org.
| |
| lockItem | back to summary |
|---|---|
| public SoftLock lockItem(SharedSessionContractImplementor session, Object key, Object version) Overrides org. 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
| |
| 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.
| |
| unlockItem | back to summary |
|---|---|
| public void unlockItem(SharedSessionContractImplementor session, Object key, SoftLock lock) Overrides org. 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.
| |