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>
actions
protected Map<String,BulkActionValidation>
actionValidations
static String
BULK_SCROLL_KEEP_ALIVE_PROPERTY
static String
BULK_SCROLL_PRODUCE_IMMEDIATE_PROPERTY
static String
BULK_SCROLL_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTY
static String
BULK_SCROLL_SIZE_PROPERTY
static String
BULK_SCROLL_TRANSACTION_TIMEOUT_PROPERTY
static String
BULK_SERVICE_PROCESSOR_NAME
static int
DEFAULT_PRODUCE_IMMEDIATE_THRESHOLD_PROPERTY
static int
DEFAULT_SCROLL_KEEP_ALIVE
static int
DEFAULT_SCROLL_SIZE
static Duration
DEFAULT_SCROLL_TRANSACTION_TIMEOUT
protected Map<String,BulkActionDescriptor>
descriptors
static String
SCROLLER_NAME
static String
STATUS_NAME
static Duration
STOP_DURATION
protected StreamProcessor
streamProcessor
-
Constructor Summary
Constructors Constructor Description BulkAdminServiceImpl(List<BulkActionDescriptor> descriptorsList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterStart()
void
beforeStop()
List<String>
getActions()
Returns a list of declared bulk actions.BulkActionValidation
getActionValidation(String action)
Gets the validation class of an action.int
getBatchSize(String action)
Duration
getBatchTransactionTimeout(String action)
Returns the transaction timeout to use to process a batch.int
getBucketSize(String action)
String
getDefaultScroller(String action)
String
getInputStream(String action)
Long
getQueryLimit(String action)
Returns the default query limit for the bulk action.boolean
isExclusive(String actionId)
Returns true if action is exclusive and only one of such command per repository can be scheduled or running.boolean
isHttpEnabled(String actionId)
Returns true if the action id is to be accessible through http API.boolean
isSequentialCommands(String actionId)
Returns true if commands of this action need to be scrolled sequentially.boolean
isSequentialProcessing(String actionId)
Returns true if command processing for this action should be done sequentially.boolean
isSequentialScroll(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:BulkAdminService
Returns a list of declared bulk actions. By design a bulk action listen the stream of its own name.- Specified by:
getActions
in interfaceBulkAdminService
- Returns:
- a list of declared bulk actions
-
getBucketSize
public int getBucketSize(String action)
- Specified by:
getBucketSize
in interfaceBulkAdminService
-
getBatchSize
public int getBatchSize(String action)
- Specified by:
getBatchSize
in interfaceBulkAdminService
-
getBatchTransactionTimeout
public Duration getBatchTransactionTimeout(String action)
Description copied from interface:BulkAdminService
Returns the transaction timeout to use to process a batch.- Specified by:
getBatchTransactionTimeout
in interfaceBulkAdminService
-
getQueryLimit
public Long getQueryLimit(String action)
Description copied from interface:BulkAdminService
Returns the default query limit for the bulk action.- Specified by:
getQueryLimit
in interfaceBulkAdminService
-
getDefaultScroller
public String getDefaultScroller(String action)
- Specified by:
getDefaultScroller
in interfaceBulkAdminService
-
getInputStream
public String getInputStream(String action)
- Specified by:
getInputStream
in interfaceBulkAdminService
-
isHttpEnabled
public boolean isHttpEnabled(String actionId)
Description copied from interface:BulkAdminService
Returns true if the action id is to be accessible through http API.- Specified by:
isHttpEnabled
in interfaceBulkAdminService
-
isSequentialCommands
public boolean isSequentialCommands(String actionId)
Description copied from interface:BulkAdminService
Returns true if commands of this action need to be scrolled sequentially.- Specified by:
isSequentialCommands
in interfaceBulkAdminService
-
isSequentialScroll
public boolean isSequentialScroll(String actionId)
Description copied from interface:BulkAdminService
Returns true if commands of this action need to be scrolled sequentially.- Specified by:
isSequentialScroll
in interfaceBulkAdminService
-
isSequentialProcessing
public boolean isSequentialProcessing(String actionId)
Description copied from interface:BulkAdminService
Returns true if command processing for this action should be done sequentially.- Specified by:
isSequentialProcessing
in interfaceBulkAdminService
-
isExclusive
public boolean isExclusive(String actionId)
Description copied from interface:BulkAdminService
Returns true if action is exclusive and only one of such command per repository can be scheduled or running.- Specified by:
isExclusive
in interfaceBulkAdminService
-
getActionValidation
public BulkActionValidation getActionValidation(String action)
Description copied from interface:BulkAdminService
Gets the validation class of an action.- Specified by:
getActionValidation
in interfaceBulkAdminService
-
afterStart
public void afterStart()
-
beforeStop
public void beforeStop()
-
-