Class HandlerUtils
java.lang.Object
fr.gouv.vitam.worker.core.handler.HandlerUtils
Handler Utils class
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Save the given map as specified by the rank output argumentstatic void
Save the given map as specified by the rank output argumentstatic void
Save the given map as specified by the rank output argumentstatic void
Save the given set as specified by the rank output argument
-
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 ioobject
- the data object to writerank
- the output rank- Throws:
IOException
- if cannot write file in json formatProcessingException
- 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 ioobject
- the data object to writeworkspacePath
- path to workspace- Throws:
IOException
- if cannot write file in json formatProcessingException
- if processing exception occurred
-
saveMap
public static void saveMap(HandlerIO handlerIO, Map<String, ?> map, int rank, boolean removeTmpFile, boolean asyncIO) throws IOException, ProcessingExceptionSave the given map as specified by the rank output argument- Parameters:
handlerIO
- the handler iomap
- the data map to writerank
- the output rankremoveTmpFile
- if remove temp output file- Throws:
IOException
- if cannot write file in json formatProcessingException
- 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 ioset
- the data set to writerank
- the output rankremoveTmpFile
- if remove temp output file- Throws:
IOException
- if cannot write file in json formatProcessingException
- if processing exception occurred
-