Package org.nuxeo.ecm.core.bulk.message
Class BulkCommand.Builder
java.lang.Object
org.nuxeo.ecm.core.bulk.message.BulkCommand.Builder
- Enclosing class:
- BulkCommand
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected int
protected Long
protected int
protected Boolean
protected Boolean
protected Boolean
protected Map<String,
Serializable> protected final String
protected Long
protected String
protected String
protected Boolean
protected Boolean
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbatch
(int size) The number of documents processed by action within a transactionbatchTransactionTimeout
(Duration timeout) Precision is second.bucket
(int size) The size of a bucket of documents id that fits into a recordbuild()
protected void
orElseAction
(String alternativeAction) If the main action is not enabled or not exist fallback to the alternative action.param
(String key, Serializable value) Add an action parameterparams
(Map<String, Serializable> params) Set all action parametersqueryLimit
(long limit) Limits the query result.Unlimited query results, this will override the action defaultQueryLimit.repository
(String name) Use a non default document repositorySets scroller name used to materialized the document setsetExclusive
(Boolean value) When set totrue
only one command of this action per repository can be scheduled or running.setSequentialProcessing
(Boolean value) When set totrue
the processing of the command is done on the same thread sequentially.setSequentialScroll
(Boolean value) When set totrue
the scroll with other bulk commands having the same flag is done sequentially.Uses a document scroller, the query must be a valid NXQL query.Uses an external scroller.Uses a generic scroller, the query syntax depends on scroller implementation.Deprecated.since 11.1, useBuilder(String, String, String)
constructor with username instead
-
Field Details
-
action
-
query
-
queryLimit
-
repository
-
username
-
bucketSize
protected int bucketSize -
batchSize
protected int batchSize -
batchTransactionTimeout
-
scroller
-
genericScroller
-
externalScroller
-
sequentialScroll
-
sequentialProcessing
-
exclusive
-
params
-
-
Constructor Details
-
Builder
BulkCommand builder- Parameters:
action
- the registered bulk action namequery
- by default an NXQL query that represents the document set to apply the action. When using a generic scroller the query syntax is a convention with the scroller implementation. When using an external scroller the field is null.username
- the user with whose rights the computation will be executed- Since:
- 11.1
-
Builder
Deprecated.since 11.1, useBuilder(String, String, String)
constructor with username insteadBulkCommand builder- Parameters:
action
- the registered bulk action namenxqlQuery
- the query that represent the document set to apply the action
-
-
Method Details
-
repository
Use a non default document repository -
queryLimit
Limits the query result.- Since:
- 11.4
-
queryUnlimited
Unlimited query results, this will override the action defaultQueryLimit.- Since:
- 11.4
-
user
Deprecated.since 11.1, useBuilder(String, String, String)
constructor with username insteadUser running the bulk action -
bucket
The size of a bucket of documents id that fits into a record -
batch
The number of documents processed by action within a transaction -
batchTransactionTimeout
Precision is second.- Since:
- 11.5
-
param
Add an action parameter -
params
Set all action parameters -
scroller
Sets scroller name used to materialized the document set -
useGenericScroller
Uses a generic scroller, the query syntax depends on scroller implementation.- Since:
- 11.1
-
useDocumentScroller
Uses a document scroller, the query must be a valid NXQL query. This is the default.- Since:
- 11.1
-
useExternalScroller
Uses an external scroller.- Since:
- 11.3
-
checkScrollerType
protected void checkScrollerType() -
setSequentialScroll
When set totrue
the scroll with other bulk commands having the same flag is done sequentially. Iffalse
the scroll is done concurrently with others bulk commands. When unsetnull
this choice is done at the action definition level.- Since:
- 2023.4
-
setSequentialProcessing
When set totrue
the processing of the command is done on the same thread sequentially. Iffalse
the processing is done concurrently. When unsetnull
this choice is done at the action definition level.- Since:
- 2023.4
-
setExclusive
When set totrue
only one command of this action per repository can be scheduled or running. Submitting exclusive command while one is already running raises an exception.- Since:
- 2023.4
-
build
-
orElseAction
If the main action is not enabled or not exist fallback to the alternative action.- Since:
- 2023.9
-
Builder(String, String, String)
constructor with username instead