Skip to main content
Package com.gpudb

Class BulkInserter.FlushOptions

java.lang.Object
com.gpudb.BulkInserter.FlushOptions
Enclosing class:

public static final class BulkInserter.FlushOptions extends Object
This class facilitates customizing the behavior of automatic flush in BulkInserter The default value of the ‘flushInterval’ is set to a negative value to indicate that the automatic flush feature is not needed. If the default values are passed in for the BulkInserter.FlushOptions instance to the constructors it is mandatory to call the method BulkInserter.flush() or BulkInserter.close() so that the records are actually saved to the table.
  • Field Details

  • Constructor Details

    • FlushOptions

      public FlushOptions()
      Default constructor
    • FlushOptions

      public FlushOptions(boolean flushWhenFull, int flushInterval)
      Constructor with all members
      Parameters:
      flushWhenFull - - boolean value indicating whether to flush only full queues
      flushInterval - - the time interval in seconds to execute flush
  • Method Details

    • defaultOptions

      public static BulkInserter.FlushOptions defaultOptions()
      This method returns an instance of BulkInserter.FlushOptions with default values.
      Returns:
      - a new instance of BulkInserter.FlushOptions class
    • isFlushWhenFull

      public boolean isFlushWhenFull()
    • setFlushWhenFull

      public void setFlushWhenFull(boolean flushWhenFull)
      Sets the flag to set whether to flush when queues are full or not
      Parameters:
      flushWhenFull - - boolean value to indicate whether to flush only full queues
    • getFlushInterval

      public int getFlushInterval()
    • setFlushInterval

      public void setFlushInterval(int flushInterval)
      Sets the flush interval
      Parameters:
      flushInterval - - time in seconds
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object