Search in sources :

Example 1 with ContentAddressableStorageConfig

use of build.buildfarm.v1test.ContentAddressableStorageConfig in project bazel-buildfarm by bazelbuild.

the class Worker method createStorages.

private ContentAddressableStorage createStorages(InputStreamFactory remoteInputStreamFactory, ExecutorService removeDirectoryService, Executor accessRecorder, List<ContentAddressableStorageConfig> configs) throws ConfigurationException {
    ImmutableList.Builder<ContentAddressableStorage> storages = ImmutableList.builder();
    // must construct delegates first
    ContentAddressableStorage storage = null;
    ContentAddressableStorage delegate = null;
    for (ContentAddressableStorageConfig config : Lists.reverse(configs)) {
        storage = createStorage(remoteInputStreamFactory, removeDirectoryService, accessRecorder, config, delegate);
        storages.add(storage);
        delegate = storage;
    }
    return storage;
}
Also used : ContentAddressableStorage(build.buildfarm.cas.ContentAddressableStorage) ImmutableList(com.google.common.collect.ImmutableList) ContentAddressableStorageConfig(build.buildfarm.v1test.ContentAddressableStorageConfig)

Aggregations

ContentAddressableStorage (build.buildfarm.cas.ContentAddressableStorage)1 ContentAddressableStorageConfig (build.buildfarm.v1test.ContentAddressableStorageConfig)1 ImmutableList (com.google.common.collect.ImmutableList)1