public interface Batcher
QueryBatcher
and WriteBatcher
.Modifier and Type | Method and Description |
---|---|
int |
getBatchSize() |
ForestConfiguration |
getForestConfig() |
java.util.Calendar |
getJobEndTime()
Gets the time at which the Batcher was
stopped
|
java.lang.String |
getJobId() |
java.lang.String |
getJobName() |
java.util.Calendar |
getJobStartTime()
Gets the time at which the Batcher was
started
|
JobTicket |
getJobTicket()
After the job has been started, returns the
JobTicket generated when the job was started.
|
DatabaseClient |
getPrimaryClient()
Gets the primary DatabaseClient associated with
the batcher
|
int |
getThreadCount() |
boolean |
isStarted()
true if the job is started (e.g.
|
boolean |
isStopped()
true if the job is terminated (e.g.
|
Batcher |
withBatchSize(int batchSize)
The size of each batch (usually 50-500).
|
Batcher |
withForestConfig(ForestConfiguration forestConfig)
Updates the ForestConfiguration used by this job
to spread the writes or reads.
|
Batcher |
withJobId(java.lang.String jobId)
Sets the unique id of the job to help with
managing multiple concurrent jobs and start the job with the
specified job id.
|
Batcher |
withJobName(java.lang.String jobName)
Sets the name of the job to help with managing
multiple concurrent jobs.
|
Batcher |
withThreadCount(int threadCount)
The number of threads to be used internally by
this job to perform concurrent tasks on batches (usually >
10).
|
Batcher withJobName(java.lang.String jobName)
jobName
- the name you would like to assign to
this jobjava.lang.String getJobName()
Batcher withJobId(java.lang.String jobId)
jobId
- the unique id you would like to assign to
this jobjava.lang.String getJobId()
Batcher withBatchSize(int batchSize)
The size of each batch (usually 50-500). With some experimentation with your custom job, this value can be tuned. Tuning this value is one of the best ways to achieve optimal throughput.
This method cannot be called after the job has started.
batchSize
- the batch size -- must be 1 or
greaterint getBatchSize()
Batcher withThreadCount(int threadCount)
The number of threads to be used internally by this job to perform concurrent tasks on batches (usually > 10). With some experimentation with your custom job and client environment, this value can be tuned. Tuning this value is one of the best ways to achieve optimal throughput or to throttle the server resources used by this job. Setting this to 1 does not guarantee that batches will be processed sequentially because the calling thread will sometimes also process batches.
Unless otherwise noted by a subclass, this method cannot be called after the job has started.
threadCount
- the number of threads to use in this
Batcherint getThreadCount()
ForestConfiguration getForestConfig()
Batcher withForestConfig(ForestConfiguration forestConfig)
DataMovementManager.readForestConfig()
, perhaps
wrapped by something like FilteredForestConfiguration
.forestConfig
- the updated list of forests with
thier hosts, etc.boolean isStarted()
DataMovementManager.startJob
was called), false
otherwiseDataMovementManager.startJob
was called), false
otherwiseboolean isStopped()
DataMovementManager.stopJob
was called), false
otherwiseDataMovementManager.stopJob
was called), false
otherwiseJobTicket getJobTicket()
java.lang.IllegalStateException
- if this job has
not yet been startedjava.util.Calendar getJobStartTime()
java.util.Calendar getJobEndTime()
DatabaseClient getPrimaryClient()
Copyright © 2024 MarkLogic Corporation. All Rights Reserved.