public static class Deleter.Builder extends Batcher.Builder<Deleter.Builder>
Deleter objects with custom behavioral tweaks.columns, dataSource, maxBatchDelay, maxBatchSize, queue, queueSize, tableName| Constructor and Description |
|---|
Builder(DataSource dataSource,
String tableName,
String... columnNames)
Constructs a new deleter builder for the defined MySQL database and table
|
| Modifier and Type | Method and Description |
|---|---|
Deleter |
build()
Builds a new
Deleter. |
Deleter |
buildAndStart()
Builds and starts a new
Deleter in a new thread. |
Deleter |
buildAndStart(ThreadFactory threadFactory)
Builds and starts a new
Deleter in a new thread provided by the
provided ThreadFactory. |
maxBatchDelay, maxBatchSize, queue, queueSize, untypedColumnspublic Builder(DataSource dataSource, String tableName, String... columnNames)
dataSource - the DataSource to use to connect to the
databasetableName - the name of the MySQL table to be modifiedcolumnNames - the names of the column(s) to be matchedpublic Deleter build()
Deleter.
Note that using this method to build the Deleter will not
automatically start the insertion process, merely provide a reference to
the Runnable that would be used to run the insertions.
To automatically start the Deleter immediately after building it,
use the buildAndStart() or buildAndStart(ThreadFactory)
method.
Deleterpublic Deleter buildAndStart()
Deleter in a new thread.
Note that using this method will immediately start the Deleter in
a new Thread.
Deleterpublic Deleter buildAndStart(ThreadFactory threadFactory)
Deleter in a new thread provided by the
provided ThreadFactory.
This method is particularly useful for those using Deleter in a
container managed context such as Java EE, where thread management is
deferred to the container server.
threadFactory - the ThreadFactory responsible for providing
a new ThreadDeleterCopyright © 2016. All rights reserved.