Package com.illumon.iris.importers.util
Class MergeData
java.lang.Object
com.illumon.iris.importers.util.MergeData
- All Implemented Interfaces:
StatusCallback
public class MergeData extends Object implements StatusCallback
Easy to use wrapper for merging data.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MergeData.Builder
The Builder class allows setting properties for a merge and provides aMergeData.Builder.build()
method which returns a MergeData object that will use the configured properties to merge data. -
Field Summary
Fields Modifier and Type Field Description static com.fishlib.io.logger.Logger
log
-
Method Summary
Modifier and Type Method Description static MergeDataBuilder
builder(Database database, String namespace, String table)
Creates a new MergeDataBuilder object.int
getValue()
Gets the percent complete.void
run()
Executes a merge.void
update(int progress, Supplier<String> statusSupplier)
Update the progress % and status message.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.util.progress.StatusCallback
finish, finish, getStepValue, remaining, remaining, subrange, update
-
Field Details
-
log
public static final com.fishlib.io.logger.Logger log
-
-
Method Details
-
builder
Creates a new MergeDataBuilder object. Method calls on this object can then be used to configure the merge and run it.- Parameters:
database
- database.namespace
- namespace into which data will be merged.table
- name of the table into which data will be merged.- Returns:
- new
MergeDataBuilder
.
-
run
public void run()Executes a merge. -
update
Update the progress % and status message.- Specified by:
update
in interfaceStatusCallback
- Parameters:
progress
- percent complete (0-100).statusSupplier
- optional message supplier.
-
getValue
public int getValue()Gets the percent complete.- Specified by:
getValue
in interfaceStatusCallback
- Returns:
- percent complete.
-