public class UploadStagingCache
extends java.lang.Object
implements java.io.Closeable
The appropriate backend for this cache are wrapped in StagingUploader
implementations.
Modifier and Type | Method and Description |
---|---|
static UploadStagingCache |
build(java.io.File dir,
java.io.File home,
int uploadThreads,
long size,
org.apache.jackrabbit.oak.plugins.blob.StagingUploader uploader,
@Nullable FileCache cache,
StatisticsProvider statisticsProvider,
@Nullable com.google.common.util.concurrent.ListeningExecutorService executor,
@Nullable java.util.concurrent.ScheduledExecutorService scheduledExecutor,
int purgeInterval,
int retryInterval) |
void |
close() |
@Nullable java.io.File |
getIfPresent(java.lang.String key)
Returns the File if present or null otherwise.
|
DataStoreCacheStatsMBean |
getStats()
Cache related stats
|
com.google.common.base.Optional<com.google.common.util.concurrent.SettableFuture<java.lang.Integer>> |
put(java.lang.String id,
java.io.File input)
Puts the file into the staging cache if possible.
|
public static UploadStagingCache build(java.io.File dir, java.io.File home, int uploadThreads, long size, org.apache.jackrabbit.oak.plugins.blob.StagingUploader uploader, @Nullable @Nullable FileCache cache, StatisticsProvider statisticsProvider, @Nullable @Nullable com.google.common.util.concurrent.ListeningExecutorService executor, @Nullable @Nullable java.util.concurrent.ScheduledExecutorService scheduledExecutor, int purgeInterval, int retryInterval)
public com.google.common.base.Optional<com.google.common.util.concurrent.SettableFuture<java.lang.Integer>> put(java.lang.String id, java.io.File input)
id
- the id of the file to be stagedinput
- the file to be staged@Nullable public @Nullable java.io.File getIfPresent(java.lang.String key)
key
- of the file to checkpublic DataStoreCacheStatsMBean getStats()
DataStoreCacheStatsMBean
.public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
Copyright © 2010 - 2020 Adobe. All Rights Reserved