@ThreadSafe public class AsyncUfsAbsentPathCache extends Object implements UfsAbsentPathCache
UfsAbsentPathCache
which implements asynchronous addition and removal to the
cache, since the processing of the path may be slow.UfsAbsentPathCache.Factory
ALWAYS, NEVER
Constructor and Description |
---|
AsyncUfsAbsentPathCache(MountTable mountTable,
int numThreads,
java.time.Clock clock)
Creates a new instance of
AsyncUfsAbsentPathCache . |
Modifier and Type | Method and Description |
---|---|
void |
addSinglePath(AlluxioURI path)
Add a single path to the absent cache synchronously.
|
protected long |
getCachedGaugeTimeoutMillis() |
boolean |
isAbsentSince(AlluxioURI path,
long absentSince)
Returns true if the given path was found to be absent since absentSince, according to this
cache.
|
void |
processAsync(AlluxioURI path,
List<Inode> prefixInodes)
Processes the given path for the cache.
|
void |
processExisting(AlluxioURI path)
Processes the given path that already exists.
|
public AsyncUfsAbsentPathCache(MountTable mountTable, int numThreads, java.time.Clock clock)
AsyncUfsAbsentPathCache
.mountTable
- the mount tablenumThreads
- the maximum number of threads for the async thread poolclock
- the clock to use to compute the sync timesprotected long getCachedGaugeTimeoutMillis()
public void processAsync(AlluxioURI path, List<Inode> prefixInodes)
UfsAbsentPathCache
processAsync
in interface UfsAbsentPathCache
path
- the path to process for the cacheprefixInodes
- the existing inodes for the path prefixpublic void addSinglePath(AlluxioURI path)
UfsAbsentPathCache
addSinglePath
in interface UfsAbsentPathCache
path
- the path to process for the cachepublic void processExisting(AlluxioURI path)
UfsAbsentPathCache
processExisting
in interface UfsAbsentPathCache
path
- the path to process for the cachepublic boolean isAbsentSince(AlluxioURI path, long absentSince)
UfsAbsentPathCache
isAbsentSince
in interface UfsAbsentPathCache
path
- the path to checkabsentSince
- the time when the cache entry would be considered validCopyright © 2023. All Rights Reserved.