Package fr.gouv.vitam.worker.core.plugin.bulkatomicupdate

# Class PrepareBulkAtomicUpdate

java.lang.Object
fr.gouv.vitam.worker.core.handler.ActionHandler
fr.gouv.vitam.worker.core.plugin.bulkatomicupdate.PrepareBulkAtomicUpdate

All Implemented Interfaces:
  `VitamAutoCloseable`, `AutoCloseable`

public class PrepareBulkAtomicUpdate extends ActionHandler
Prepares the execution of atomic update queries. Queries are executed in bulks, each bulk is run concurrently is a thread pool. Queries are updated with access contract restrictions. Query projection is set to "_id" field only. Queries with internal fields are blocked ==> Report WARNING in batch report Queries result size is limited to 2. - If a single entry is found ==> Happy path, we append unitId to distribution file - No entries found ==> Report WARNING in batch report (no unit found) - 2 entries found ==> Report WARNING in batch report (multiple units found) Report entries are buffered and sent as bulks to BatchReport (to reduce IOs to BatchReport) Distribution file entries are buffered and written to disk in bulks (to reduce IO contention)

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `PREPARE_BULK_ATOMIC_UPDATE_UNIT_LIST_PLUGIN_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PrepareBulkAtomicUpdate()`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ItemStatus`
  `execute(WorkerParameters param, HandlerIO handler)`
  Execute an action

  ### Methods inherited from class fr.gouv.vitam.worker.core.handler.ActionHandler

  `checkMandatoryIOParameter, checkMandatoryParameters, close, executeList, updateDetailItemStatus`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### PREPARE_BULK_ATOMIC_UPDATE_UNIT_LIST_PLUGIN_NAME

    public static final String PREPARE_BULK_ATOMIC_UPDATE_UNIT_LIST_PLUGIN_NAME
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PrepareBulkAtomicUpdate

    public PrepareBulkAtomicUpdate()
    Constructor.

- ## Method Details

  - ### execute

    public ItemStatus execute(WorkerParameters param, HandlerIO handler) throws ProcessingException
    Description copied from class: `ActionHandler`
    Execute an action
    Overrides:
      `execute` in class `ActionHandler`
    Parameters:
      `param` - `WorkerParameters`
      `handler` - the handlerIo
    Returns:
      CompositeItemStatus:response contains a list of functional message and status code
    Throws:
      `ProcessingException` - if an error is encountered when executing the action