blob: a4c8229d0d71e14040adcdbda2047bf1b7a8b499 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.maintenance.disk;
import com.yahoo.vespa.hosted.node.admin.task.util.file.FileFinder;
import java.util.Collection;
/**
* @author freva
*/
public interface DiskCleanupRule {
Collection<PrioritizedFileAttributes> prioritize();
enum Priority {
LOWEST, LOW, MEDIUM, HIGH, HIGHEST
}
class PrioritizedFileAttributes {
private final FileFinder.FileAttributes fileAttributes;
private final Priority priority;
public PrioritizedFileAttributes(FileFinder.FileAttributes fileAttributes, Priority priority) {
this.fileAttributes = fileAttributes;
this.priority = priority;
}
public Priority priority() { return priority; }
public FileFinder.FileAttributes fileAttributes() { return fileAttributes; }
}
}
|