Package org.nuxeo.ecm.core.bulk
Class BulkAdminServiceImpl
- java.lang.Object
-
- org.nuxeo.ecm.core.bulk.BulkAdminServiceImpl
-
- All Implemented Interfaces:
BulkAdminService
public class BulkAdminServiceImpl extends Object implements BulkAdminService
- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>actionsprotected Map<String,BulkActionValidation>actionValidationsstatic StringBULK_SCROLL_KEEP_ALIVE_PROPERTYstatic StringBULK_SCROLL_PRODUCE_IMMEDIATE_PROPERTYstatic StringBULK_SCROLL_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTYstatic StringBULK_SCROLL_SIZE_PROPERTYstatic StringBULK_SCROLL_TRANSACTION_TIMEOUT_PROPERTYstatic StringBULK_SERVICE_PROCESSOR_NAMEstatic intDEFAULT_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTYstatic intDEFAULT_SCROLL_KEEP_ALIVEstatic intDEFAULT_SCROLL_SIZEstatic DurationDEFAULT_SCROLL_TRANSACTION_TIMEOUTprotected Map<String,BulkActionDescriptor>descriptorsstatic StringSCROLLER_NAMEstatic StringSTATUS_NAMEstatic DurationSTOP_DURATIONprotected StreamProcessorstreamProcessor
-
Constructor Summary
Constructors Constructor Description BulkAdminServiceImpl(List<BulkActionDescriptor> descriptorsList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterStart()voidbeforeStop()List<String>getActions()Returns a list of declared bulk actions.BulkActionValidationgetActionValidation(String action)Gets the validation class of an action.intgetBatchSize(String action)DurationgetBatchTransactionTimeout(String action)Returns the transaction timeout to use to process a batch.intgetBucketSize(String action)StringgetDefaultScroller(String action)StringgetInputStream(String action)LonggetQueryLimit(String action)Returns the default query limit for the bulk action.booleanisExclusive(String actionId)Returns true if action is exclusive and only one of such command per repository can be scheduled or running.booleanisHttpEnabled(String actionId)Returns true if the action id is to be accessible through http API.booleanisSequentialCommands(String actionId)Returns true if commands of this action need to be scrolled sequentially.booleanisSequentialProcessing(String actionId)Returns true if command processing for this action should be done sequentially.booleanisSequentialScroll(String actionId)Returns true if commands of this action need to be scrolled sequentially.
-
-
-
Field Detail
-
SCROLLER_NAME
public static final String SCROLLER_NAME
- See Also:
- Constant Field Values
-
STATUS_NAME
public static final String STATUS_NAME
- See Also:
- Constant Field Values
-
BULK_SERVICE_PROCESSOR_NAME
public static final String BULK_SERVICE_PROCESSOR_NAME
- See Also:
- Constant Field Values
-
BULK_SCROLL_SIZE_PROPERTY
public static final String BULK_SCROLL_SIZE_PROPERTY
- See Also:
- Constant Field Values
-
BULK_SCROLL_KEEP_ALIVE_PROPERTY
public static final String BULK_SCROLL_KEEP_ALIVE_PROPERTY
- See Also:
- Constant Field Values
-
BULK_SCROLL_PRODUCE_IMMEDIATE_PROPERTY
public static final String BULK_SCROLL_PRODUCE_IMMEDIATE_PROPERTY
- See Also:
- Constant Field Values
-
BULK_SCROLL_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTY
public static final String BULK_SCROLL_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTY
public static final int DEFAULT_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_SCROLL_SIZE
public static final int DEFAULT_SCROLL_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_SCROLL_KEEP_ALIVE
public static final int DEFAULT_SCROLL_KEEP_ALIVE
- See Also:
- Constant Field Values
-
BULK_SCROLL_TRANSACTION_TIMEOUT_PROPERTY
public static final String BULK_SCROLL_TRANSACTION_TIMEOUT_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_SCROLL_TRANSACTION_TIMEOUT
public static final Duration DEFAULT_SCROLL_TRANSACTION_TIMEOUT
-
STOP_DURATION
public static final Duration STOP_DURATION
-
descriptors
protected final Map<String,BulkActionDescriptor> descriptors
-
streamProcessor
protected StreamProcessor streamProcessor
-
actionValidations
protected Map<String,BulkActionValidation> actionValidations
-
-
Constructor Detail
-
BulkAdminServiceImpl
public BulkAdminServiceImpl(List<BulkActionDescriptor> descriptorsList)
-
-
Method Detail
-
getActions
public List<String> getActions()
Description copied from interface:BulkAdminServiceReturns a list of declared bulk actions. By design a bulk action listen the stream of its own name.- Specified by:
getActionsin interfaceBulkAdminService- Returns:
- a list of declared bulk actions
-
getBucketSize
public int getBucketSize(String action)
- Specified by:
getBucketSizein interfaceBulkAdminService
-
getBatchSize
public int getBatchSize(String action)
- Specified by:
getBatchSizein interfaceBulkAdminService
-
getBatchTransactionTimeout
public Duration getBatchTransactionTimeout(String action)
Description copied from interface:BulkAdminServiceReturns the transaction timeout to use to process a batch.- Specified by:
getBatchTransactionTimeoutin interfaceBulkAdminService
-
getQueryLimit
public Long getQueryLimit(String action)
Description copied from interface:BulkAdminServiceReturns the default query limit for the bulk action.- Specified by:
getQueryLimitin interfaceBulkAdminService
-
getDefaultScroller
public String getDefaultScroller(String action)
- Specified by:
getDefaultScrollerin interfaceBulkAdminService
-
getInputStream
public String getInputStream(String action)
- Specified by:
getInputStreamin interfaceBulkAdminService
-
isHttpEnabled
public boolean isHttpEnabled(String actionId)
Description copied from interface:BulkAdminServiceReturns true if the action id is to be accessible through http API.- Specified by:
isHttpEnabledin interfaceBulkAdminService
-
isSequentialCommands
public boolean isSequentialCommands(String actionId)
Description copied from interface:BulkAdminServiceReturns true if commands of this action need to be scrolled sequentially.- Specified by:
isSequentialCommandsin interfaceBulkAdminService
-
isSequentialScroll
public boolean isSequentialScroll(String actionId)
Description copied from interface:BulkAdminServiceReturns true if commands of this action need to be scrolled sequentially.- Specified by:
isSequentialScrollin interfaceBulkAdminService
-
isSequentialProcessing
public boolean isSequentialProcessing(String actionId)
Description copied from interface:BulkAdminServiceReturns true if command processing for this action should be done sequentially.- Specified by:
isSequentialProcessingin interfaceBulkAdminService
-
isExclusive
public boolean isExclusive(String actionId)
Description copied from interface:BulkAdminServiceReturns true if action is exclusive and only one of such command per repository can be scheduled or running.- Specified by:
isExclusivein interfaceBulkAdminService
-
getActionValidation
public BulkActionValidation getActionValidation(String action)
Description copied from interface:BulkAdminServiceGets the validation class of an action.- Specified by:
getActionValidationin interfaceBulkAdminService
-
afterStart
public void afterStart()
-
beforeStop
public void beforeStop()
-
-