Bug 2890: Chunk AppendEntries when single payload size exceeds threshold
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / io / FileBackedOutputStreamFactory.java
index 0cd4be67a50f1e3c2fc01f3b26e3a7f2bf0d97e2..75948830be824b081b35922c6cdeb89aaccd9e3a 100644 (file)
@@ -39,4 +39,13 @@ public class FileBackedOutputStreamFactory {
     public FileBackedOutputStream newInstance() {
         return new FileBackedOutputStream(fileThreshold, fileDirectory);
     }
+
+    /**
+     * Creates a new {@link SharedFileBackedOutputStream} with the settings configured for this factory.
+     *
+     * @return a {@link SharedFileBackedOutputStream} instance
+     */
+    public SharedFileBackedOutputStream newSharedInstance() {
+        return new SharedFileBackedOutputStream(fileThreshold, fileDirectory);
+    }
 }