aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-12-01 16:53:28 +0000
committerGravatar Irina Iancu <elenairina@google.com>2016-12-02 07:41:39 +0000
commitc804c66856eefc72cc1c5ba661c6d410e1bda9f4 (patch)
treee2957e8e472212c310fe53a20608176e0acc105c /src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
parent65d66a3afa09abdf5d66e14d3c4a82a08c7a05e0 (diff)
Replace UnixGlob's package glob prefetching functionality with an
optional method in FileSystem. Custom FileSystem implementations can use this to provide their own implementation of glob prefetching. -- MOS_MIGRATED_REVID=140736304
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
index 4d938049e0..de1fe986b7 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java
@@ -827,4 +827,12 @@ public abstract class FileSystem {
*/
protected abstract void createFSDependentHardLink(Path linkPath, Path originalPath)
throws IOException;
+
+ /**
+ * Prefetch all directories and symlinks within the package
+ * rooted at "path". Enter at most "maxDirs" total directories.
+ * Specializations for high-latency remote filesystems may wish to
+ * implement this in order to warm the filesystem's internal caches.
+ */
+ protected void prefetchPackageAsync(Path path, int maxDirs) { }
}