Class DisabledCaching

    • Method Detail

      • containsEntity

        public boolean containsEntity​(Class entityClass,
                                      Object identifier)
        Description copied from interface: Cache
        Determine whether the cache contains data for the given entity "instance".

        The semantic here is whether the cache contains data visible for the current call context.

        Specified by:
        containsEntity in interface Cache
        Parameters:
        entityClass - The entity class.
        identifier - The entity identifier
        Returns:
        True if the underlying cache contains corresponding data; false otherwise.
      • containsEntity

        public boolean containsEntity​(String entityName,
                                      Object identifier)
        Description copied from interface: Cache
        Determine whether the cache contains data for the given entity "instance".

        The semantic here is whether the cache contains data visible for the current call context.

        Specified by:
        containsEntity in interface Cache
        Parameters:
        entityName - The entity name.
        identifier - The entity identifier
        Returns:
        True if the underlying cache contains corresponding data; false otherwise.
      • evictEntityData

        public void evictEntityData​(Class entityClass,
                                    Object identifier)
        Description copied from interface: Cache
        Evicts the entity data for a particular entity "instance".
        Specified by:
        evictEntityData in interface Cache
        Parameters:
        entityClass - The entity class.
        identifier - The entity identifier
      • evictEntityData

        public void evictEntityData​(String entityName,
                                    Object identifier)
        Description copied from interface: Cache
        Evicts the entity data for a particular entity "instance".
        Specified by:
        evictEntityData in interface Cache
        Parameters:
        entityName - The entity name.
        identifier - The entity identifier
      • evictEntityData

        public void evictEntityData​(Class entityClass)
        Description copied from interface: Cache
        Evicts all entity data from the given region (i.e. for all entities of type).
        Specified by:
        evictEntityData in interface Cache
        Parameters:
        entityClass - The entity class.
      • evictEntityData

        public void evictEntityData​(String entityName)
        Description copied from interface: Cache
        Evicts all entity data from the given region (i.e. for all entities of type).
        Specified by:
        evictEntityData in interface Cache
        Parameters:
        entityName - The entity name.
      • evictEntityData

        public void evictEntityData()
        Description copied from interface: Cache
        Evict data from all entity regions.
        Specified by:
        evictEntityData in interface Cache
      • evictNaturalIdData

        public void evictNaturalIdData​(Class entityClass)
        Description copied from interface: Cache
        Evict cached data for the given entity's natural-id
        Specified by:
        evictNaturalIdData in interface Cache
        Parameters:
        entityClass - The entity class.
      • evictNaturalIdData

        public void evictNaturalIdData​(String entityName)
        Description copied from interface: Cache
        Evict cached data for the given entity's natural-id
        Specified by:
        evictNaturalIdData in interface Cache
        Parameters:
        entityName - The entity name.
      • evictNaturalIdData

        public void evictNaturalIdData()
        Description copied from interface: Cache
        Evict cached data for all natural-ids (for all entities)
        Specified by:
        evictNaturalIdData in interface Cache
      • containsCollection

        public boolean containsCollection​(String role,
                                          Object ownerIdentifier)
        Description copied from interface: Cache
        Determine whether the cache contains data for the given collection.

        The semantic here is whether the cache contains data visible for the current call context.

        Specified by:
        containsCollection in interface Cache
        Parameters:
        role - The name of the collection role (in form [owner-entity-name].[collection-property-name]) whose regions should be evicted.
        ownerIdentifier - The identifier of the owning entity
        Returns:
        True if the underlying cache contains corresponding data; false otherwise.
      • evictCollectionData

        public void evictCollectionData​(String role,
                                        Object ownerIdentifier)
        Description copied from interface: Cache
        Evicts the cache data for the given identified collection "instance"
        Specified by:
        evictCollectionData in interface Cache
        Parameters:
        role - The "collection role" (in form [owner-entity-name].[collection-property-name]).
        ownerIdentifier - The identifier of the owning entity
      • evictCollectionData

        public void evictCollectionData​(String role)
        Description copied from interface: Cache
        Evicts cached data for the given collection role
        Specified by:
        evictCollectionData in interface Cache
        Parameters:
        role - The "collection role" (in form [owner-entity-name].[collection-property-name]).
      • evictCollectionData

        public void evictCollectionData()
        Description copied from interface: Cache
        Evict cache data for all collections
        Specified by:
        evictCollectionData in interface Cache
      • containsQuery

        public boolean containsQuery​(String regionName)
        Description copied from interface: Cache
        Determine whether the cache contains data for the given query.

        The semantic here is whether the cache contains any data for the given region name since query result caches are not transactionally isolated.

        Specified by:
        containsQuery in interface Cache
        Parameters:
        regionName - The cache name given to the query.
        Returns:
        True if the underlying cache contains corresponding data; false otherwise.
      • evictDefaultQueryRegion

        public void evictDefaultQueryRegion()
        Description copied from interface: Cache
        Evicts all cached query results from the default region.
        Specified by:
        evictDefaultQueryRegion in interface Cache
      • evictQueryRegion

        public void evictQueryRegion​(String regionName)
        Description copied from interface: Cache
        Evicts all cached query results under the given name.
        Specified by:
        evictQueryRegion in interface Cache
        Parameters:
        regionName - The cache name associated to the queries being cached.
      • evictQueryRegions

        public void evictQueryRegions()
        Description copied from interface: Cache
        Evict data from all query regions.
        Specified by:
        evictQueryRegions in interface Cache
      • evictRegion

        public void evictRegion​(String regionName)
        Description copied from interface: Cache
        Evict all data from the named cache region
        Specified by:
        evictRegion in interface Cache
      • getTimestampsCache

        public TimestampsCache getTimestampsCache()
        Description copied from interface: CacheImplementor
        Find the cache data access strategy for Hibernate's timestamps cache. Will return null if Hibernate is not configured for query result caching
        Specified by:
        getTimestampsCache in interface CacheImplementor
      • getDefaultQueryResultsCache

        public QueryResultsCache getDefaultQueryResultsCache()
        Description copied from interface: CacheImplementor
        Access to the "default" region used to store query results when caching was requested but no region was explicitly named. Will return null if Hibernate is not configured for query result caching
        Specified by:
        getDefaultQueryResultsCache in interface CacheImplementor
      • getQueryResultsCache

        public QueryResultsCache getQueryResultsCache​(String regionName)
        Description copied from interface: CacheImplementor
        Get query cache by region name or create a new one if none exist. If the region name is null, then default query cache region will be returned. Will return null if Hibernate is not configured for query result caching
        Specified by:
        getQueryResultsCache in interface CacheImplementor
      • getQueryResultsCacheStrictly

        public QueryResultsCache getQueryResultsCacheStrictly​(String regionName)
        Description copied from interface: CacheImplementor
        Get the named QueryResultRegionAccess but not creating one if it does not already exist. This is intended for use by statistics. Will return null if Hibernate is not configured for query result caching or if no such region (yet) exists
        Specified by:
        getQueryResultsCacheStrictly in interface CacheImplementor
      • close

        public void close()
        Description copied from interface: CacheImplementor
        Close this "cache", releasing all underlying resources.
        Specified by:
        close in interface CacheImplementor
      • getEntityRegionAccess

        public EntityDataAccess getEntityRegionAccess​(NavigableRole rootEntityName)
        Description copied from interface: CacheImplementor
        Find the cache data access strategy for an entity. Will return null when the entity is not configured for caching.
        Specified by:
        getEntityRegionAccess in interface CacheImplementor
        Parameters:
        rootEntityName - The NavigableRole representation of the root entity
      • getNaturalIdCacheRegionAccessStrategy

        public NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy​(NavigableRole rootEntityName)
        Description copied from interface: CacheImplementor
        Find the cache data access strategy for the given entity's natural-id cache. Will return null when the entity does not define a natural-id, or its natural-id is not configured for caching.
        Specified by:
        getNaturalIdCacheRegionAccessStrategy in interface CacheImplementor
        Parameters:
        rootEntityName - The NavigableRole representation of the root entity
      • contains

        public boolean contains​(Class cls,
                                Object primaryKey)
        Specified by:
        contains in interface jakarta.persistence.Cache
      • evict

        public void evict​(Class cls,
                          Object primaryKey)
        Specified by:
        evict in interface jakarta.persistence.Cache
      • evict

        public void evict​(Class cls)
        Specified by:
        evict in interface jakarta.persistence.Cache
      • unwrap

        public <T> T unwrap​(Class<T> cls)
        Specified by:
        unwrap in interface jakarta.persistence.Cache