Class BuildMetadataCacheResetHandler
- java.lang.Object
-
- jetbrains.buildServer.serverSide.metadata.impl.indexer.BuildMetadataCacheResetHandler
-
- All Implemented Interfaces:
ResetCacheHandler
,PositionAware
,PositionConstraintAware
public class BuildMetadataCacheResetHandler extends Object implements ResetCacheHandler, PositionAware
- Author:
- Evgeniy.Koshkin
-
-
Constructor Summary
Constructors Constructor Description BuildMetadataCacheResetHandler(ResetCacheRegister register, MetadataIndexerService indexerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PositionConstraint
getConstraint()
Constraint to be respected during objects sorting.String
getOrderId()
Returns object id that can be referenced by {PositionConstraint
}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).
-
-
-
Constructor Detail
-
BuildMetadataCacheResetHandler
public BuildMetadataCacheResetHandler(@NotNull ResetCacheRegister register, @NotNull MetadataIndexerService indexerService)
-
-
Method Detail
-
getOrderId
@NotNull public String getOrderId()
Description copied from interface:PositionAware
Returns object id that can be referenced by {PositionConstraint
}- Specified by:
getOrderId
in interfacePositionAware
- Returns:
- object id
-
getConstraint
@NotNull public PositionConstraint getConstraint()
Description copied from interface:PositionConstraintAware
Constraint to be respected during objects sorting.- Specified by:
getConstraint
in interfacePositionConstraintAware
- Returns:
- position constraint
-
listCaches
@NotNull public List<String> listCaches()
Description copied from interface:ResetCacheHandler
Returns the list of cache names. Try to make this method fast.- Specified by:
listCaches
in interfaceResetCacheHandler
- Returns:
- list of cache names
-
isEmpty
public boolean isEmpty(@NotNull String name)
Description copied from interface:ResetCacheHandler
Returns whether the cache denoted byname
is empty. The specifiedname
is guaranteed to be from the list returned bylistCaches
.- Specified by:
isEmpty
in interfaceResetCacheHandler
- Parameters:
name
- cache name- Returns:
- true if the cache is empty
-
resetCache
public void resetCache(@NotNull String name)
Description copied from interface:ResetCacheHandler
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
.- Specified by:
resetCache
in interfaceResetCacheHandler
- Parameters:
name
- cache name
-
-