Class PrometheusBatchControl
java.lang.Object
io.github.tonywasher.joceanus.prometheus.database.PrometheusBatchControl
Batch control class. This controls updating data lists after the commit of the batch.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd item to the batch.protected voidCommit the batch.protected booleanisActive()Is the batch active.protected booleanisFull()Is the batch full.protected voidsetCurrentTable(PrometheusTableDataItem<?> pTable, MetisDataState pMode) Set the currently active state.
-
Constructor Details
-
PrometheusBatchControl
Constructor.- Parameters:
pBatchSize- the batch size
-
-
Method Details
-
isFull
protected boolean isFull()Is the batch full.- Returns:
- true/false is the batch full
-
isActive
protected boolean isActive()Is the batch active.- Returns:
- true/false is the batch active
-
setCurrentTable
Set the currently active state.- Parameters:
pTable- the Table being operated onpMode- the Mode that is in operation
-
addBatchItem
protected void addBatchItem()Add item to the batch. -
commitItems
protected void commitItems()Commit the batch.
-