Class FileBackedOutputStreamFactory
- java.lang.Object
-
- org.opendaylight.controller.cluster.io.FileBackedOutputStreamFactory
-
public class FileBackedOutputStreamFactory extends Object
A factory for creatingFileBackedOutputStream
instances.- Author:
- Thomas Pantelis
- See Also:
FileBackedOutputStream
-
-
Constructor Summary
Constructors Constructor Description FileBackedOutputStreamFactory(int fileThreshold, @Nullable String fileDirectory)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileBackedOutputStream
newInstance()
Creates a newFileBackedOutputStream
with the settings configured for this factory.SharedFileBackedOutputStream
newSharedInstance()
Creates a newSharedFileBackedOutputStream
with the settings configured for this factory.
-
-
-
Constructor Detail
-
FileBackedOutputStreamFactory
public FileBackedOutputStreamFactory(int fileThreshold, @Nullable String fileDirectory)
Constructor.- Parameters:
fileThreshold
- the number of bytes before streams should switch to buffering to a filefileDirectory
- the directory in which to create files if needed. If null, the default temp file location is used.
-
-
Method Detail
-
newInstance
public FileBackedOutputStream newInstance()
Creates a newFileBackedOutputStream
with the settings configured for this factory.- Returns:
- a
FileBackedOutputStream
instance
-
newSharedInstance
public SharedFileBackedOutputStream newSharedInstance()
Creates a newSharedFileBackedOutputStream
with the settings configured for this factory.- Returns:
- a
SharedFileBackedOutputStream
instance
-
-