public class ThriftArtifactCache extends AbstractNetworkCache
AbstractAsynchronousCache.CacheEventListener, AbstractAsynchronousCache.FetchRequest, AbstractAsynchronousCache.StoreEvents
Modifier and Type | Field and Description |
---|---|
static okhttp3.MediaType |
HYBRID_THRIFT_STREAM_CONTENT_TYPE |
static ThriftProtocol |
PROTOCOL |
static String |
PROTOCOL_HEADER |
fetchClient, scheduleType, storeClient
Constructor and Description |
---|
ThriftArtifactCache(com.facebook.buck.artifact_cache.NetworkCacheArgs args,
String hybridThriftEndpoint,
BuildId buildId,
int multiFetchLimit,
int concurrencyLevel,
boolean multiCheckEnabled,
String producerId,
String producerHostname) |
Modifier and Type | Method and Description |
---|---|
protected CacheDeleteResult |
deleteImpl(List<RuleKey> ruleKeys) |
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.FetchResult |
fetchImpl(BuildTarget target,
RuleKey ruleKey,
LazyPath output) |
protected int |
getMultiFetchBatchSize(int pendingRequestsSize)
Used to compute the number of keys to include in every multiFetchRequest.
|
protected boolean |
isMultiCheckEnabled() |
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.MultiContainsResult |
multiContainsImpl(com.google.common.collect.ImmutableSet<RuleKey> uniqueRuleKeys) |
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.MultiFetchResult |
multiFetchImpl(Iterable<AbstractAsynchronousCache.FetchRequest> requests)
The MultiFetchResult should contain results in the same order as the requests.
|
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.StoreResult |
storeImpl(ArtifactInfo info,
Path file) |
close, getRepository
deleteAsync, fetchAsync, getCacheReadMode, getMode, getName, getProjectFilesystem, multiContainsAsync, skipPendingAndFutureAsyncFetches, store, store
public static final okhttp3.MediaType HYBRID_THRIFT_STREAM_CONTENT_TYPE
public static final String PROTOCOL_HEADER
public static final ThriftProtocol PROTOCOL
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.FetchResult fetchImpl(@Nullable BuildTarget target, RuleKey ruleKey, LazyPath output) throws IOException
fetchImpl
in class AbstractAsynchronousCache
IOException
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.MultiContainsResult multiContainsImpl(com.google.common.collect.ImmutableSet<RuleKey> uniqueRuleKeys) throws IOException
multiContainsImpl
in class AbstractAsynchronousCache
IOException
protected int getMultiFetchBatchSize(int pendingRequestsSize)
AbstractAsynchronousCache
getMultiFetchBatchSize
in class AbstractAsynchronousCache
protected boolean isMultiCheckEnabled()
isMultiCheckEnabled
in class AbstractAsynchronousCache
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.MultiFetchResult multiFetchImpl(Iterable<AbstractAsynchronousCache.FetchRequest> requests) throws IOException
AbstractAsynchronousCache
multiFetchImpl
in class AbstractAsynchronousCache
IOException
protected com.facebook.buck.artifact_cache.AbstractAsynchronousCache.StoreResult storeImpl(ArtifactInfo info, Path file) throws IOException
storeImpl
in class AbstractAsynchronousCache
IOException
protected CacheDeleteResult deleteImpl(List<RuleKey> ruleKeys) throws IOException
deleteImpl
in class AbstractAsynchronousCache
IOException