diff options
author | Philipp Wollermann <philwo@google.com> | 2016-08-25 12:59:52 +0000 |
---|---|---|
committer | John Cater <jcater@google.com> | 2016-08-25 20:18:32 +0000 |
commit | 49c20aaccb76769d50f3abb57372b3e9030513a4 (patch) | |
tree | a52677edea168a6b3ab48e8f7e7b58c3a3fab639 /src/main/java/com/google/devtools/build/lib/exec | |
parent | ed175d6849c46931f4934f8577457ff404b1730f (diff) |
Add a framework for prefetching input files (in case they come from remote file systems).
--
MOS_MIGRATED_REVID=131280794
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/ActionInputPrefetcher.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/ActionInputPrefetcher.java b/src/main/java/com/google/devtools/build/lib/exec/ActionInputPrefetcher.java new file mode 100644 index 0000000000..84eb09a45f --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/exec/ActionInputPrefetcher.java @@ -0,0 +1,27 @@ +// Copyright 2016 The Bazel Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package com.google.devtools.build.lib.exec; + +import com.google.devtools.build.lib.actions.ActionInput; + +/** Prefetches files to local disk. */ +public interface ActionInputPrefetcher { + + /** + * Initiates best-effort prefetching of the given input. This should not block. + * + * <p>If the path is not under this prefetcher's control, the call should be a no-op. + */ + void prefetchFile(ActionInput input); +} |