public class ArtifactCaches extends Object implements ArtifactCacheFactory, AutoCloseable
ArtifactCache
.Constructor and Description |
---|
ArtifactCaches(ArtifactCacheBuckConfig buckConfig,
BuckEventBus buckEventBus,
java.util.function.Function<String,UnconfiguredBuildTarget> unconfiguredBuildTargetFactory,
TargetConfigurationSerializer targetConfigurationSerializer,
ProjectFilesystem projectFilesystem,
Optional<String> wifiSsid,
com.google.common.util.concurrent.ListeningExecutorService httpWriteExecutorService,
com.google.common.util.concurrent.ListeningExecutorService httpFetchExecutorService,
com.google.common.util.concurrent.ListeningExecutorService dirWriteExecutorService,
TaskManagerCommandScope managerScope,
String producerId,
String producerHostname,
Optional<ClientCertificateHandler> clientCertificateHandler)
Creates a new instance of the cache factory for use during a build.
|
Modifier and Type | Method and Description |
---|---|
ArtifactCacheFactory |
cloneWith(BuckConfig newConfig) |
void |
close() |
ArtifactCache |
localOnlyInstance() |
ArtifactCache |
newInstance()
Creates a new instance of the cache for use during a build.
|
static Optional<ArtifactCache> |
newServedCache(ArtifactCacheBuckConfig buckConfig,
java.util.function.Function<String,UnconfiguredBuildTarget> unconfiguredBuildTargetFactory,
TargetConfigurationSerializer targetConfigurationSerializer,
ProjectFilesystem projectFilesystem)
Creates a new instance of the cache to be used to serve the dircache from the WebServer.
|
ArtifactCache |
remoteOnlyInstance() |
public ArtifactCaches(ArtifactCacheBuckConfig buckConfig, BuckEventBus buckEventBus, java.util.function.Function<String,UnconfiguredBuildTarget> unconfiguredBuildTargetFactory, TargetConfigurationSerializer targetConfigurationSerializer, ProjectFilesystem projectFilesystem, Optional<String> wifiSsid, com.google.common.util.concurrent.ListeningExecutorService httpWriteExecutorService, com.google.common.util.concurrent.ListeningExecutorService httpFetchExecutorService, com.google.common.util.concurrent.ListeningExecutorService dirWriteExecutorService, TaskManagerCommandScope managerScope, String producerId, String producerHostname, Optional<ClientCertificateHandler> clientCertificateHandler)
buckConfig
- describes what kind of cache to createbuckEventBus
- event busprojectFilesystem
- filesystem to store files onwifiSsid
- current WiFi ssid to decide if we want the http cache or notdirWriteExecutorService
- executor service used for dir cache storesproducerId
- free-form identifier of a user or machine uploading artifacts, can be used on
cache server side for monitoringclientCertificateHandler
- container for client certificate informationpublic void close()
close
in interface AutoCloseable
public ArtifactCache newInstance()
newInstance
in interface ArtifactCacheFactory
public ArtifactCache remoteOnlyInstance()
remoteOnlyInstance
in interface ArtifactCacheFactory
public ArtifactCache localOnlyInstance()
localOnlyInstance
in interface ArtifactCacheFactory
public ArtifactCacheFactory cloneWith(BuckConfig newConfig)
cloneWith
in interface ArtifactCacheFactory
public static Optional<ArtifactCache> newServedCache(ArtifactCacheBuckConfig buckConfig, java.util.function.Function<String,UnconfiguredBuildTarget> unconfiguredBuildTargetFactory, TargetConfigurationSerializer targetConfigurationSerializer, ProjectFilesystem projectFilesystem)
buckConfig
- describes how to configure te cacheprojectFilesystem
- filesystem to store files on