@ThreadSafe public final class AsyncUfsAbsentPathCache extends java.lang.Object implements UfsAbsentPathCache
UfsAbsentPathCache which implements asynchronous addition and removal to the
cache, since the processing of the path may be slow.UfsAbsentPathCache.FactoryALWAYS, NEVER| Constructor and Description |
|---|
AsyncUfsAbsentPathCache(MountTable mountTable,
int numThreads)
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.
|
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,
java.util.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)
AsyncUfsAbsentPathCache.mountTable - the mount tablenumThreads - the maximum number of threads for the async thread poolpublic void processAsync(AlluxioURI path, java.util.List<Inode> prefixInodes)
UfsAbsentPathCacheprocessAsync in interface UfsAbsentPathCachepath - the path to process for the cacheprefixInodes - the existing inodes for the path prefixpublic void addSinglePath(AlluxioURI path)
UfsAbsentPathCacheaddSinglePath in interface UfsAbsentPathCachepath - the path to process for the cachepublic void processExisting(AlluxioURI path)
UfsAbsentPathCacheprocessExisting in interface UfsAbsentPathCachepath - the path to process for the cachepublic boolean isAbsentSince(AlluxioURI path, long absentSince)
UfsAbsentPathCacheisAbsentSince in interface UfsAbsentPathCachepath - the path to checkabsentSince - the time when the cache entry would be considered validCopyright © 2021. All Rights Reserved.