blob: 9b457f49bd21ead1d54ef34ffd59eafa2f12627f (
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
32
33
34
35
36
37
38
39
40
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api;
import com.yahoo.config.FileReference;
import com.yahoo.vespa.defaults.Defaults;
import java.io.File;
import java.util.Set;
/**
* Interface for models towards filedistribution.
*
* @author Ulf Lilleengen
*/
public interface FileDistribution {
/**
* Notifies client which file references to download. Used to start downloading early (while
* preparing application package).
*
* @param hostName host which should be notified about file references to download
* @param port port which should be used when notifying
* @param fileReferences set of file references to start downloading
*/
void startDownload(String hostName, int port, Set<FileReference> fileReferences);
// TODO: Remove when 6.244 is oldest version in use
@Deprecated
static String getDefaultFileDBRoot() {
return Defaults.getDefaults().underVespaHome("var/db/vespa/filedistribution");
}
// TODO: Remove when 6.244 is oldest version in use
@Deprecated
static File getDefaultFileDBPath() {
return new File(getDefaultFileDBRoot());
}
File getFileReferencesDir();
}
|