Package jetbrains.buildServer.util.cache
Interface ResetCacheHandler
-
- All Known Implementing Classes:
BuildMetadataCacheResetHandler
public interface ResetCacheHandler
The handler of reset cache action.You should register your cache handler, if your component uses persistent cache, and you would like to be able reset this cache from UI (see ResetCacheController class).
To register the handler use
ResetCacheRegister
class.- Since:
- 5.1
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isEmpty(String name)
Returns whether the cache denoted byname
is empty.List<String>
listCaches()
Returns the list of cache names.void
resetCache(String name)
Resets the cache (erases all stored entries).
-
-
-
Method Detail
-
listCaches
@NotNull List<String> listCaches()
Returns the list of cache names. Try to make this method fast.- Returns:
- list of cache names
-
isEmpty
boolean isEmpty(@NotNull String name)
Returns whether the cache denoted byname
is empty. The specifiedname
is guaranteed to be from the list returned bylistCaches
.- Parameters:
name
- cache name- Returns:
- true if the cache is empty
-
resetCache
void resetCache(@NotNull String name)
Resets the cache (erases all stored entries). After reset the cache should be empty. The specifiedname
is guaranteed to be from the list returned bylistCaches
.- Parameters:
name
- cache name
-
-