Class TransactionalWriter

java.lang.Object
java.io.Writer
java.io.FilterWriter
org.moeaframework.analysis.store.TransactionalWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public abstract class TransactionalWriter extends FilterWriter
Writer with a transaction mechanism requiring one to call commit() before the content is stored. The typical use is:

   try (TransactionalWriter writer = blob.openWriter()) {
       writer.write(...);
       writer.commit();
   }
 
  • Constructor Details

    • TransactionalWriter

      public TransactionalWriter(Writer out)
      Constructs a transactional writer.
      Parameters:
      out - the temporary writer, where content is written before it is committed
  • Method Details