@ThreadSafe public final class MetadataCache extends Object
Constructor and Description |
---|
MetadataCache(int maxSize) |
MetadataCache(int maxSize,
long expirationTimeMs) |
Modifier and Type | Method and Description |
---|---|
URIStatus |
get(AlluxioURI path) |
void |
invalidate(AlluxioURI path)
Invalidates the cache of path.
|
void |
invalidate(String path)
Invalidates the cache of path.
|
void |
invalidateAll()
Invalidates all the cache.
|
List<URIStatus> |
listStatus(AlluxioURI dir) |
List<URIStatus> |
listStatus(String 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)
maxSize
- the max size of the cachepublic 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 directory@Nullable public List<URIStatus> listStatus(String dir)
dir
- the directorypublic void invalidate(AlluxioURI path)
path
- the pathpublic void invalidate(String path)
path
- the pathpublic void invalidateAll()
public long size()
Copyright © 2023. All Rights Reserved.