Class HandlerUtils


  • public class HandlerUtils
    extends java.lang.Object
    Handler Utils class
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void save​(HandlerIO handlerIO, java.lang.Object object, int rank)
      Save the given map as specified by the rank output argument
      static void save​(HandlerIO handlerIO, java.lang.Object object, java.lang.String workspacePath)
      Save the given map as specified by the rank output argument
      static void saveMap​(HandlerIO handlerIO, java.util.Map<java.lang.String,​?> map, int rank, boolean removeTmpFile, boolean asyncIO)
      Save the given map as specified by the rank output argument
      static void saveSet​(HandlerIO handlerIO, java.util.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 Detail

      • save

        public static void save​(HandlerIO handlerIO,
                                java.lang.Object object,
                                int rank)
                         throws java.io.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:
        java.io.IOException - if cannot write file in json format
        ProcessingException - if processing exception occurred
      • save

        public static void save​(HandlerIO handlerIO,
                                java.lang.Object object,
                                java.lang.String workspacePath)
                         throws java.io.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:
        java.io.IOException - if cannot write file in json format
        ProcessingException - if processing exception occurred
      • saveMap

        public static void saveMap​(HandlerIO handlerIO,
                                   java.util.Map<java.lang.String,​?> map,
                                   int rank,
                                   boolean removeTmpFile,
                                   boolean asyncIO)
                            throws java.io.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:
        java.io.IOException - if cannot write file in json format
        ProcessingException - if processing exception occurred
      • saveSet

        public static void saveSet​(HandlerIO handlerIO,
                                   java.util.Set<?> set,
                                   int rank,
                                   boolean removeTmpFile,
                                   boolean asyncIO)
                            throws java.io.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:
        java.io.IOException - if cannot write file in json format
        ProcessingException - if processing exception occurred