java.lang.Object
com.gpudb.BulkInserter.FlushOptions
Enclosing class:
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.See Also:
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final intConstructor Summary
ConstructorsConstructorDescriptionDefault constructorFlushOptions(boolean flushWhenFull, int flushInterval) Constructor with all membersMethod Summary
Modifier and TypeMethodDescriptionstatic BulkInserter.FlushOptionsThis method returns an instance ofBulkInserter.FlushOptionswith default values.booleanintinthashCode()booleanvoidsetFlushInterval(int flushInterval) Sets the flush intervalvoidsetFlushWhenFull(boolean flushWhenFull) Sets the flag to set whether to flush when queues are full or not
Constructor Details
FlushOptions
public FlushOptions(boolean flushWhenFull, int flushInterval) Constructor with all membersParameters:flushWhenFull- - boolean value indicating whether to flush only full queuesflushInterval- - the time interval in seconds to execute flush
Method Details
defaultOptions
This method returns an instance ofBulkInserter.FlushOptionswith default values.Returns:- a new instance ofBulkInserter.FlushOptionsclassisFlushWhenFull
public boolean isFlushWhenFull()setFlushWhenFull
public void setFlushWhenFull(boolean flushWhenFull) Sets the flag to set whether to flush when queues are full or notParameters:flushWhenFull- - boolean value to indicate whether to flush only full queuesgetFlushInterval
public int getFlushInterval()setFlushInterval
public void setFlushInterval(int flushInterval) Sets the flush intervalParameters:flushInterval- - time in seconds