Class Batch

java.lang.Object
net.quasardb.qdb.batch.Batch
All Implemented Interfaces:
AutoCloseable

public final class Batch extends Object implements AutoCloseable
Batches multiple operations into a single atomic operation. Improves efficiency by avoiding many round-trips from client to server by using a single large operation. Enables better consistency by atomically applying all operations in a single batch: either all operations succeed, or none do.
  • Constructor Details

  • Method Details

    • builder

      public static Batch.Builder builder(Session session)
      Create a builder instance.
      Parameters:
      session - Active connection with the QuasarDB cluster.
    • size

      public int size()
      Returns the amount of operations in this batch.
    • isEmpty

      public boolean isEmpty()
      Returns true if there are no operations in the batch.
    • session

      public Session session()
      Get access to the underlying session object.
    • close

      public void close()
      Explicitly close batch.
      Specified by:
      close in interface AutoCloseable
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • blob

      public BlobEntry blob(String alias)
    • string

      public StringEntry string(String alias)
    • integer

      public IntegerEntry integer(String alias)
    • double_

      public DoubleEntry double_(String alias)
    • timestamp

      public TimestampEntry timestamp(String alias)
    • commit

      public void commit()