public class DatabaseFetchStatsSetCacheImpl extends Object implements DatabaseFetchStatsCache
| Constructor and Description |
|---|
DatabaseFetchStatsSetCacheImpl()
This constructor creates cache based on default Ehcache configuration with searchable.
|
DatabaseFetchStatsSetCacheImpl(net.sf.ehcache.Ehcache cache)
This constructor allows to provide custom cache with dedicated configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long bundleId,
int revision,
Set<String> entityTypes)
Adds given
entityTypes to cache for bundleId and revision. |
void |
clear() |
boolean |
containsEntityType(long bundleId,
int revision,
String entityType)
checks whether cache contains given
entityId |
int |
entityTypesCount(long bundleId)
Returns number of entities types associated with given
bundleId |
void |
removeBundle(long bundleId)
Removes all entries from cache connected to given
bundleId |
int |
size() |
public DatabaseFetchStatsSetCacheImpl()
public DatabaseFetchStatsSetCacheImpl(net.sf.ehcache.Ehcache cache)
removeBundle(long) and
add(long, int, Set), Searchable attribute with "bundleId" and "revision" are required to make it work. Make sure to add this cache
to CacheManager instance.cache - custom cachepublic void add(long bundleId,
int revision,
Set<String> entityTypes)
DatabaseFetchStatsCacheentityTypes to cache for bundleId and revision.
Entity types are case-sensitive. If set of entityTypes is empty, then nothing will be stored in cache.add in interface DatabaseFetchStatsCachebundleId - bundle idrevision - revision of bundleentityTypes - unique tuple names with case-sensitivepublic boolean containsEntityType(long bundleId,
int revision,
String entityType)
DatabaseFetchStatsCacheentityIdcontainsEntityType in interface DatabaseFetchStatsCachebundleId - bundle Idrevision - revision of bundle, starts with 0entityType - name of entity typepublic void removeBundle(long bundleId)
DatabaseFetchStatsCachebundleIdremoveBundle in interface DatabaseFetchStatsCachebundleId - bundle id that should be deleted from cache with its entitiespublic void clear()
clear in interface Invalidablepublic int size()
size in interface DatabaseFetchStatsCachepublic int entityTypesCount(long bundleId)
DatabaseFetchStatsCachebundleIdentityTypesCount in interface DatabaseFetchStatsCachebundleId - bundle idbundleId or 0 if bundle has no entity typesCopyright © 2021. All rights reserved.