@ThreadSafe
public final class StreamCache
extends java.lang.Object
| Constructor and Description |
|---|
StreamCache(long timeoutMs)
Creates a new instance of
StreamCache. |
| Modifier and Type | Method and Description |
|---|---|
FileInStream |
getInStream(java.lang.Integer key) |
FileOutStream |
getOutStream(java.lang.Integer key) |
java.io.Closeable |
invalidate(java.lang.Integer key) |
java.lang.Integer |
put(FileInStream is) |
java.lang.Integer |
put(FileOutStream os) |
long |
size() |
public StreamCache(long timeoutMs)
StreamCache.timeoutMs - the timeout (in milliseconds) for the stream cache evictionpublic FileInStream getInStream(java.lang.Integer key)
key - the key to get the stream forpublic FileOutStream getOutStream(java.lang.Integer key)
key - the key to get the stream forpublic java.lang.Integer put(FileInStream is)
is - the stream to cachepublic java.lang.Integer put(FileOutStream os)
os - the stream to cache@Nullable public java.io.Closeable invalidate(java.lang.Integer key)
key - the key for the stream to invalidatepublic long size()
Copyright © 2022. All Rights Reserved.