public abstract class StreamsCache extends Object
| Constructor and Description |
|---|
StreamsCache() |
| Modifier and Type | Method and Description |
|---|---|
protected OutputStream |
createWriteStream(File file) |
abstract void |
deleteWhenPossible() |
void |
deleteWhenPossible(Runnable callback) |
protected boolean |
doEnter(Runnable streamCallback,
BooleanSupplier checkFilesCallback)
Increments the concurrent count, and returns if it is okay
to read from the cached file, or not.
|
protected void |
doExit(Runnable callback)
Decrements the concurrent count.
|
void |
setLogger(org.slf4j.Logger log)
Needed for tests.
|
abstract void |
stream(OutputStream out,
Cache.StreamProvider provider) |
protected static void |
streamFromFile(File file,
OutputStream out) |
abstract void |
streamTwo(OutputStream out1,
OutputStream out2,
Cache.TwoStreamProvider provider) |
protected static void streamFromFile(File file, OutputStream out)
public void deleteWhenPossible(Runnable callback)
public abstract void stream(OutputStream out, Cache.StreamProvider provider)
public abstract void streamTwo(OutputStream out1, OutputStream out2, Cache.TwoStreamProvider provider)
public abstract void deleteWhenPossible()
protected boolean doEnter(Runnable streamCallback, BooleanSupplier checkFilesCallback)
protected void doExit(Runnable callback)
protected OutputStream createWriteStream(File file) throws FileNotFoundException
FileNotFoundExceptionpublic void setLogger(org.slf4j.Logger log)
Copyright © 2024 Atlassian. All rights reserved.