public class DatabaseBasedAdaptiveLabelCacheDaoImpl extends Object implements AdaptiveLabelCacheDao
| Constructor and Description |
|---|
DatabaseBasedAdaptiveLabelCacheDaoImpl(org.hibernate.SessionFactory sessionFactory,
SpaceDao spaceDao) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all the records
|
long |
getSpaceIdByKey(String spaceKey)
LabelManager does not work with space ids (only with space keys)
So this method is required to retrieve spaces and get their ids
Could be removed when LabelManager start supporting finding most used labels by space id
|
String |
getSpaceKeyFromSpaceId(long spaceId)
LabelManager does not work with space ids (only with space keys)
So this method is required to retrieve spaces and get their keys
Could be removed when LabelManager start supporting finding most used labels by space id
|
LiteSearchResultCacheEntry |
read(long spaceId)
Reads cached record by space id.
|
void |
removeRecord(long spaceId)
Removes a record
|
void |
removeRecordsExpiredAfter(long timestamp)
Clears expired records
|
void |
write(long spaceId,
LiteSearchResultCacheEntry cacheEntry)
Writes cached data to the persistent cache
A previous record will be overwritten
|
public DatabaseBasedAdaptiveLabelCacheDaoImpl(org.hibernate.SessionFactory sessionFactory,
SpaceDao spaceDao)
public LiteSearchResultCacheEntry read(long spaceId)
read in interface AdaptiveLabelCacheDaospaceId - - space idpublic void clear()
clear in interface AdaptiveLabelCacheDaopublic void removeRecordsExpiredAfter(long timestamp)
removeRecordsExpiredAfter in interface AdaptiveLabelCacheDaotimestamp - - timestamppublic void removeRecord(long spaceId)
AdaptiveLabelCacheDaoremoveRecord in interface AdaptiveLabelCacheDaospaceId - - space idpublic void write(long spaceId,
LiteSearchResultCacheEntry cacheEntry)
write in interface AdaptiveLabelCacheDaospaceId - - space idcacheEntry - - cache entrypublic String getSpaceKeyFromSpaceId(long spaceId)
getSpaceKeyFromSpaceId in interface AdaptiveLabelCacheDaospaceId - - space idpublic long getSpaceIdByKey(String spaceKey)
getSpaceIdByKey in interface AdaptiveLabelCacheDaospaceKey - - space keyCopyright © 2003–2023 Atlassian. All rights reserved.