Package fr.gouv.vitam.worker.core.handler

# Class HandlerUtils

java.lang.Object
fr.gouv.vitam.worker.core.handler.HandlerUtils

public class HandlerUtils extends Object
Handler Utils class

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `save(HandlerIO handlerIO, Object object, int rank)`
  Save the given map as specified by the rank output argument
  `static void`
  `save(HandlerIO handlerIO, Object object, String workspacePath)`
  Save the given map as specified by the rank output argument
  `static void`
  `saveMap(HandlerIO handlerIO, Map<String,?> map, int rank, boolean removeTmpFile, boolean asyncIO)`
  Save the given map as specified by the rank output argument
  `static void`
  `saveSet(HandlerIO handlerIO, Set<?> set, int rank, boolean removeTmpFile, boolean asyncIO)`
  Save the given set as specified by the rank output argument

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

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

- ## Method Details

  - ### save

    public static void save(HandlerIO handlerIO, Object object, int rank) throws IOException, ProcessingException
    Save the given map as specified by the rank output argument
    Parameters:
      `handlerIO` - the handler io
      `object` - the data object to write
      `rank` - the output rank
    Throws:
      `IOException` - if cannot write file in json format
      `ProcessingException` - if processing exception occurred

  - ### save

    public static void save(HandlerIO handlerIO, Object object, String workspacePath) throws IOException, ProcessingException
    Save the given map as specified by the rank output argument
    Parameters:
      `handlerIO` - the handler io
      `object` - the data object to write
      `workspacePath` - path to workspace
    Throws:
      `IOException` - if cannot write file in json format
      `ProcessingException` - if processing exception occurred

  - ### saveMap

    public static void saveMap(HandlerIO handlerIO, Map<String,?> map, int rank, boolean removeTmpFile, boolean asyncIO) throws IOException, ProcessingException
    Save the given map as specified by the rank output argument
    Parameters:
      `handlerIO` - the handler io
      `map` - the data map to write
      `rank` - the output rank
      `removeTmpFile` - if remove temp output file
    Throws:
      `IOException` - if cannot write file in json format
      `ProcessingException` - if processing exception occurred

  - ### saveSet

    public static void saveSet(HandlerIO handlerIO, Set<?> set, int rank, boolean removeTmpFile, boolean asyncIO) throws IOException, ProcessingException
    Save the given set as specified by the rank output argument
    Parameters:
      `handlerIO` - the handler io
      `set` - the data set to write
      `rank` - the output rank
      `removeTmpFile` - if remove temp output file
    Throws:
      `IOException` - if cannot write file in json format
      `ProcessingException` - if processing exception occurred