Class DisabledCaching

    • Method Detail

      • containsEntity

        public boolean containsEntity​(Class<?> entityClass,
                                      Object identifier)
        Description copied from interface: Cache
        Determine whether the cache contains an item for the entity of the given type, and with the given identifier.
        Specified by:
        containsEntity in interface Cache
        Parameters:
        entityClass - The entity type
        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 an item for the entity of the type with the given name, and with the given identifier.
        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 cached item for the entity of the given type, and with the given identifier, if there is any such item in the cache.
        Specified by:
        evictEntityData in interface Cache
        Parameters:
        entityClass - The entity type
        identifier - The entity identifier
      • evictEntityData

        public void evictEntityData​(String entityName,
                                    Object identifier)
        Description copied from interface: Cache
        Evict the cached item for the entity of the type with the given name, and with the given identifier, if there is any such item in the cache.
        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
        Evict all cached data from the cache region to which the given entity type is assigned. Thus, every cached item for the given entity type will be evicted, along with any cached items for any other entity type assigned to the same cache region.
        Specified by:
        evictEntityData in interface Cache
        Parameters:
        entityClass - The entity type
      • evictEntityData

        public void evictEntityData​(String entityName)
        Description copied from interface: Cache
        Evict all cached data from the cache region to which the given named entity type is assigned. Thus, every cached item for the given entity type will be evicted, along with any cached items for any other entity type assigned to the same cache region.
        Specified by:
        evictEntityData in interface Cache
        Parameters:
        entityName - The entity name
      • evictEntityData

        public void evictEntityData()
        Description copied from interface: Cache
        Evict all cached data from every cache region to which any entity type is assigned.
        Specified by:
        evictEntityData in interface Cache
      • evictNaturalIdData

        public void evictNaturalIdData​(Class<?> entityClass)
        Description copied from interface: Cache
        Evict all cached natural id mappings for the given entity type.
        Specified by:
        evictNaturalIdData in interface Cache
        Parameters:
        entityClass - The entity type
      • evictNaturalIdData

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

        public void evictNaturalIdData()
        Description copied from interface: Cache
        Evict all cached natural id mappings for every entity type.
        Specified by:
        evictNaturalIdData in interface Cache
      • containsCollection

        public boolean containsCollection​(String role,
                                          Object ownerIdentifier)
        Description copied from interface: Cache
        Determine whether the cache contains an item for the collection with the given role and given identifier.
        Specified by:
        containsCollection in interface Cache
        Parameters:
        role - The name of the collection role in the form package.OwnerEntityName.collectionPropertyName
        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
        Evict the cached item for the collection with the given role and given identifier, if there is any such item in the cache.
        Specified by:
        evictCollectionData in interface Cache
        Parameters:
        role - The name of the collection role in the form package.OwnerEntityName.collectionPropertyName
        ownerIdentifier - The identifier of the owning entity
      • evictCollectionData

        public void evictCollectionData​(String role)
        Description copied from interface: Cache
        Evict all cached data from the cache region to which the given collection role is assigned.
        Specified by:
        evictCollectionData in interface Cache
        Parameters:
        role - The name of the collection role in the form package.OwnerEntityName.collectionPropertyName
      • evictCollectionData

        public void evictCollectionData()
        Description copied from interface: Cache
        Evict all cache data from every cache region to which some collection role is assigned.
        Specified by:
        evictCollectionData in interface Cache
      • containsQuery

        public boolean containsQuery​(String regionName)
        Description copied from interface: Cache
        Determine whether the given region name contains cached query results.
        Specified by:
        containsQuery in interface Cache
        Parameters:
        regionName - The name of a cache region to which some query is assigned
        Returns:
        True if the underlying cache contains corresponding data; false otherwise.
      • evictDefaultQueryRegion

        public void evictDefaultQueryRegion()
        Description copied from interface: Cache
        Evict 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
        Evict all cached query results from the region with 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 all cached query results from every region.
        Specified by:
        evictQueryRegions in interface Cache
      • evictRegion

        public void evictRegion​(String regionName)
        Description copied from interface: Cache
        Evict all cached 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
      • getNaturalIdCacheRegionAccessStrategy

        @Deprecated
        public NaturalIdDataAccess getNaturalIdCacheRegionAccessStrategy​(NavigableRole rootEntityName)
        Deprecated.
        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
      • evict

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

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