public abstract class StreamsCache extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
StreamsCache.Callback |
protected static interface |
StreamsCache.CallbackWithBooleanReturn |
| Constructor and Description |
|---|
StreamsCache() |
| Modifier and Type | Method and Description |
|---|---|
protected OutputStream |
createWriteStream(File file) |
abstract void |
deleteWhenPossible() |
void |
deleteWhenPossible(StreamsCache.Callback callback) |
protected boolean |
doEnter(StreamsCache.Callback streamCallback,
StreamsCache.CallbackWithBooleanReturn checkFilesCallback)
Increments the concurrent count, and returns if it is okay
to read from the cached file, or not.
|
protected void |
doExit(StreamsCache.Callback 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) |
public void deleteWhenPossible(StreamsCache.Callback 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(StreamsCache.Callback streamCallback, StreamsCache.CallbackWithBooleanReturn checkFilesCallback)
protected void doExit(StreamsCache.Callback callback)
protected static void streamFromFile(File file, OutputStream out)
protected OutputStream createWriteStream(File file) throws FileNotFoundException
FileNotFoundExceptionpublic void setLogger(org.slf4j.Logger log)
Copyright © 2018 Atlassian. All rights reserved.