Interface DirectoryMapStructure
-
- All Known Implementing Classes:
DirectoryMapStructureImpl
public interface DirectoryMapStructure
- Author:
- Eugene Petrenko (eugene.petrenko@gmail.com) Date: 16.03.11 19:40
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Long
calculateExpireTimeout(long now, long defaultExpireTime, Set<File> toRemove, Filter<DirectoryMapItem> filter)
Calculates when one or more folders from agent's working dir will expire and adds all expired folders totoRemove
set.List<DirectoryMapItem>
getAllItems()
List<String>
getCorrespondingBuildTypes(File location)
Collection<DirectoryMapItem>
getRemovableItems(Filter<DirectoryMapItem> itemsFilter)
Collection<File>
removeItems(Filter<DirectoryMapItem> itemsFilter)
Removes items from directory map satisfying the specified filtervoid
update(DirectoryMapItem item)
-
-
-
Method Detail
-
getAllItems
@NotNull List<DirectoryMapItem> getAllItems()
-
update
void update(@NotNull DirectoryMapItem item)
-
getCorrespondingBuildTypes
@NotNull List<String> getCorrespondingBuildTypes(@NotNull File location)
-
calculateExpireTimeout
@Nullable Long calculateExpireTimeout(long now, long defaultExpireTime, Set<File> toRemove, @Nullable Filter<DirectoryMapItem> filter)
Calculates when one or more folders from agent's working dir will expire and adds all expired folders totoRemove
set.- Parameters:
now
- current timestampdefaultExpireTime
- default expire timetoRemove
- set to fill with folders that are already expired- Returns:
- number of milliseconds to wait for next cleanup or null if no cleanup will be required.
Null
means "do not queue next cleanup until directory.map changes".
-
removeItems
@NotNull Collection<File> removeItems(@NotNull Filter<DirectoryMapItem> itemsFilter)
Removes items from directory map satisfying the specified filter- Parameters:
itemsFilter
- if filter returns true, item must be removed- Returns:
- set of root directories to remove from disk
-
getRemovableItems
@NotNull Collection<DirectoryMapItem> getRemovableItems(@NotNull Filter<DirectoryMapItem> itemsFilter)
- Parameters:
itemsFilter
- filter- Returns:
- removable items
- Since:
- 7.1
-
-