@ThreadSafe public final class MetadataCache extends Object
Constructor and Description |
---|
MetadataCache(int maxSize,
long expirationTimeMs) |
Modifier and Type | Method and Description |
---|---|
URIStatus |
get(AlluxioURI path) |
void |
invalidate(AlluxioURI path)
Invalidates the cache of path.
|
List<URIStatus> |
listStatus(AlluxioURI dir) |
void |
put(AlluxioURI dir,
List<URIStatus> statuses)
Caches list status results of a directory.
|
void |
put(AlluxioURI path,
URIStatus status) |
void |
put(String path,
URIStatus status) |
long |
size() |
public MetadataCache(int maxSize, long expirationTimeMs)
maxSize
- the max size of the cacheexpirationTimeMs
- the expiration time (in milliseconds) of the cached item@Nullable public URIStatus get(AlluxioURI path)
path
- the Alluxio pathpublic void put(AlluxioURI path, URIStatus status)
path
- the Alluxio pathstatus
- the status to be cachedpublic void put(String path, URIStatus status)
path
- the Alluxio pathstatus
- the status to be cachedpublic void put(AlluxioURI dir, List<URIStatus> statuses)
dir
- the directorystatuses
- the list status results@Nullable public List<URIStatus> listStatus(AlluxioURI dir)
dir
- the directorypublic void invalidate(AlluxioURI path)
path
- the pathpublic long size()
Copyright © 2023. All Rights Reserved.