Class AutoCloseables.RollbackCloseable

java.lang.Object
org.apache.arrow.util.AutoCloseables.RollbackCloseable
All Implemented Interfaces:
AutoCloseable
Enclosing class:
AutoCloseables

public static class AutoCloseables.RollbackCloseable extends Object implements AutoCloseable
A closeable wrapper that will close the underlying closeables if a commit does not occur.
  • Constructor Details

    • RollbackCloseable

      public RollbackCloseable(@Nullable AutoCloseable... closeables)
  • Method Details

    • add

      public <T extends AutoCloseable> T add(T t)
    • addAll

      public void addAll(@Nullable AutoCloseable... list)
      Add all of list to the rollback list.
    • addAll

      public void addAll(@Nullable Iterable<? extends @Nullable AutoCloseable> list)
      Add all of list to the rollback list.
    • commit

      public void commit()
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception