Package com.gpudb
Class BulkInserter.FlushOptions
- java.lang.Object
-
- com.gpudb.BulkInserter.FlushOptions
-
- Enclosing class:
- BulkInserter<T>
public static final class BulkInserter.FlushOptions extends Object
This class facilitates customizing the behavior of automatic flush inBulkInserterThe 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 theBulkInserter.FlushOptionsinstance to the constructors it is mandatory to call the methodBulkInserter.flush()orBulkInserter.close()so that the records are actually saved to the table.- See Also:
BulkInserter.flush()
-
-
Field Summary
Fields Modifier and Type Field Description static booleanFLUSH_WHEN_FULLstatic intNO_PERIODIC_FLUSH
-
Constructor Summary
Constructors Constructor Description FlushOptions()Default constructorFlushOptions(boolean flushWhenFull, int flushInterval)Constructor with all members
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BulkInserter.FlushOptionsdefaultOptions()This method returns an instance ofBulkInserter.FlushOptionswith default values.booleanequals(Object o)intgetFlushInterval()inthashCode()booleanisFlushWhenFull()voidsetFlushInterval(int flushInterval)Sets the flush intervalvoidsetFlushWhenFull(boolean flushWhenFull)Sets the flag to set whether to flush when queues are full or not
-
-
-
Field Detail
-
NO_PERIODIC_FLUSH
public static final int NO_PERIODIC_FLUSH
- See Also:
- Constant Field Values
-
FLUSH_WHEN_FULL
public static final boolean FLUSH_WHEN_FULL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 queuesflushInterval- - the time interval in seconds to execute flush
-
-
Method Detail
-
defaultOptions
public static BulkInserter.FlushOptions defaultOptions()
This method returns an instance ofBulkInserter.FlushOptionswith default values.- Returns:
- - a new instance of
BulkInserter.FlushOptionsclass
-
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
-
-