| Modifier and Type | Field and Description |
|---|---|
| private final CacheKeysFactory |
| Access | Constructor and Description |
|---|---|
| public | AbstractNaturalIdDataAccess(DomainDataRegion region, CacheKeysFactory keysFactory, DomainDataStorageAccess storageAccess, NaturalIdDataCachingConfig config)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | afterInsert(SharedSessionContractImplementor
Current session session, Object The item key key, Object The item value)Implements org. |
| public boolean | afterUpdate(SharedSessionContractImplementor
Current session session, Object The item key key, Object The item value, SoftLock The lock previously obtained from lock)lockItemImplements org. |
| public Object | generateCacheKey(Object[]
the sequence of values which unequivocally identifies a cached element on this region naturalIdValues, EntityPersister the persister of the element being cached persister, SharedSessionContractImplementor session)Implements org. |
| public Object[] | getNaturalIdValues(Object
key returned from cacheKey)generateCacheKeyImplements org. generateCacheKey, returning
the original naturalIdValues.
|
| public boolean | insert(SharedSessionContractImplementor
Current session session, Object The item key key, Object The item value)Implements org. |
| 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. |
| public SoftLock | lockRegion()
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. |
| public void | unlockRegion(SoftLock
The lock previously obtained from lock)lockRegionOverrides org. Implements org. |
| public boolean | update(SharedSessionContractImplementor
Current session session, Object The item key key, Object The item value)Implements org. |
| keysFactory | back to summary |
|---|---|
| private final CacheKeysFactory keysFactory | |
| AbstractNaturalIdDataAccess | back to summary |
|---|---|
| public AbstractNaturalIdDataAccess(DomainDataRegion region, CacheKeysFactory keysFactory, DomainDataStorageAccess storageAccess, NaturalIdDataCachingConfig config) | |
| afterInsert | back to summary |
|---|---|
| public boolean afterInsert(SharedSessionContractImplementor session, Object key, Object value) Implements org. Doc from org. Called afterQuery an item has been inserted (afterQuery the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.
| |
| afterUpdate | back to summary |
|---|---|
| public boolean afterUpdate(SharedSessionContractImplementor session, Object key, Object value, SoftLock lock) Implements org. Doc from org. Called afterQuery an item has been updated (afterQuery the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies. | |
| generateCacheKey | back to summary |
|---|---|
| public Object generateCacheKey(Object[] naturalIdValues, EntityPersister persister, SharedSessionContractImplementor session) Implements org. Doc from org. To create instances of NaturalIdCacheKey for this region, Hibernate will invoke this method exclusively so that generated implementations can generate optimised keys.
| |
| getNaturalIdValues | back to summary |
|---|---|
| public Object[] getNaturalIdValues(Object cacheKey) Implements org. Doc from org. Performs reverse operation to
| |
| insert | back to summary |
|---|---|
| public boolean insert(SharedSessionContractImplementor session, Object key, Object value) Implements org. Doc from org. Called afterQuery an item has been inserted (beforeQuery the transaction completes), instead of calling evict(). This method is used by "synchronous" concurrency strategies.
| |
| 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
| |
| lockRegion | back to summary |
|---|---|
| public SoftLock lockRegion() Overrides org. Implements org. Doc from org. Lock the entire region | |
| 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.
| |
| unlockRegion | back to summary |
|---|---|
| public void unlockRegion(SoftLock lock) Overrides org. Implements org. Doc from org. Called after we have finished the attempted invalidation of the entire region
| |
| update | back to summary |
|---|---|
| public boolean update(SharedSessionContractImplementor session, Object key, Object value) Implements org. Doc from org. Called afterQuery an item has been updated (beforeQuery the transaction completes), instead of calling evict(). This method is used by "synchronous" concurrency strategies.
| |