public interface FileMetadataCache
| Modifier and Type | Method and Description |
|---|---|
void |
decRefBuffer(MemoryBufferOrBuffers buffer)
Releases the buffer returned from getFileMetadata or putFileMetadata method.
|
MemoryBufferOrBuffers |
getFileMetadata(Object fileKey) |
long |
markBuffersForProactiveEviction(Predicate<CacheTag> predicate,
boolean isInstantDeallocation)
Iterates through the file entries of this cache and for those that match the given predicate (aka have a matching
CacheTag) will have their buffers marked for (a later) proactive eviction.
|
MemoryBufferOrBuffers |
putFileMetadata(Object fileKey,
ByteBuffer tailBuffer)
Deprecated.
|
MemoryBufferOrBuffers |
putFileMetadata(Object fileKey,
ByteBuffer tailBuffer,
CacheTag tag)
Deprecated.
|
MemoryBufferOrBuffers |
putFileMetadata(Object fileKey,
ByteBuffer tailBuffer,
CacheTag tag,
AtomicBoolean isStopped)
Puts the metadata for a given file (e.g.
|
MemoryBufferOrBuffers |
putFileMetadata(Object fileKey,
int length,
InputStream is)
Deprecated.
|
MemoryBufferOrBuffers |
putFileMetadata(Object fileKey,
int length,
InputStream is,
CacheTag tag)
Deprecated.
|
MemoryBufferOrBuffers |
putFileMetadata(Object fileKey,
int length,
InputStream is,
CacheTag tag,
AtomicBoolean isStopped) |
MemoryBufferOrBuffers getFileMetadata(Object fileKey)
@Deprecated MemoryBufferOrBuffers putFileMetadata(Object fileKey, int length, InputStream is) throws IOException
IOException@Deprecated MemoryBufferOrBuffers putFileMetadata(Object fileKey, ByteBuffer tailBuffer)
@Deprecated MemoryBufferOrBuffers putFileMetadata(Object fileKey, int length, InputStream is, CacheTag tag) throws IOException
IOException@Deprecated MemoryBufferOrBuffers putFileMetadata(Object fileKey, ByteBuffer tailBuffer, CacheTag tag)
void decRefBuffer(MemoryBufferOrBuffers buffer)
buffer - The buffer to release.MemoryBufferOrBuffers putFileMetadata(Object fileKey, ByteBuffer tailBuffer, CacheTag tag, AtomicBoolean isStopped)
fileKey - The file key.MemoryBufferOrBuffers putFileMetadata(Object fileKey, int length, InputStream is, CacheTag tag, AtomicBoolean isStopped) throws IOException
IOExceptionlong markBuffersForProactiveEviction(Predicate<CacheTag> predicate, boolean isInstantDeallocation)
predicate - - matching the predicate indicates eligibility for proactive evictionisInstantDeallocation - - whether to ask allocator to deallocate eligible buffers immediately after markingCopyright © 2021 The Apache Software Foundation. All rights reserved.