blob: 9e3886934b9c10d60229cf1249c795bdbad61997 (
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 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.filedistribution.fileacquirer;
import com.yahoo.config.FileReference;
import java.io.File;
import java.util.concurrent.TimeUnit;
/**
* Retrieves the path to a file or directory on the local file system
* that has been transferred with the vespa file distribution
* mechanism.
*
* @author Tony Vaagenes
*/
public interface FileAcquirer {
/**
* Returns the path to a file or directory corresponding to the
* given file reference. File references are produced by the
* config system.
*
* @throws TimeoutException if the file or directory could not be retrieved in time.
* @throws FileReferenceDoesNotExistException if the file is no
* longer available(due to reloading of config).
*/
File waitFor(FileReference fileReference, long timeout, TimeUnit timeUnit) throws InterruptedException;
void shutdown();
}
|