com.atlassian.core.spool
Class DeferredSpool
java.lang.Object
com.atlassian.core.spool.DeferredSpool
- All Implemented Interfaces:
- FileSpool, Spool, ThresholdingSpool
public class DeferredSpool
- extends Object
- implements FileSpool, ThresholdingSpool
Thresholding spool that uses a DeferredSpoolFileOutputStream for spooling, allowing for a balance between memory
usage and speed.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeferredSpool
public DeferredSpool()
getFileFactory
public FileFactory getFileFactory()
- Specified by:
getFileFactory in interface FileSpool
setFileFactory
public void setFileFactory(FileFactory fileFactory)
- Specified by:
setFileFactory in interface FileSpool
setThresholdBytes
public void setThresholdBytes(int bytes)
- Specified by:
setThresholdBytes in interface ThresholdingSpool
getThresholdBytes
public int getThresholdBytes()
- Specified by:
getThresholdBytes in interface ThresholdingSpool
spool
public InputStream spool(InputStream is)
throws IOException
- Description copied from interface:
Spool
- Return a new InputStream to the data provided. Implementations should guarantee that the
returned input stream is independent of the stream passed in. For example, the returned InputStream should still
be useable once the original InputStream is closed and its associated resources are released.
- Specified by:
spool in interface Spool
- Parameters:
is - - Source stream to be spooled
- Returns:
- Spooled stream
- Throws:
IOException
getNewDeferredSpoolFileOutputStream
protected DeferredSpoolFileOutputStream getNewDeferredSpoolFileOutputStream()
- Returns:
- a new DeferredSpoolFileOutputStream
Copyright © 2015 Atlassian. All rights reserved.