Package jetbrains.buildServer.util.cache
Interface ResetCacheHandler
-
- All Known Implementing Classes:
BuildMetadataCacheResetHandler
public interface ResetCacheHandlerThe 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
ResetCacheRegisterclass.- Since:
- 5.1
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisEmpty(String name)Returns whether the cache denoted bynameis empty.List<String>listCaches()Returns the list of cache names.voidresetCache(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 bynameis empty. The specifiednameis 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 specifiednameis guaranteed to be from the list returned bylistCaches.- Parameters:
name- cache name
-
-