Class BatchResult


  • public class BatchResult
    extends java.lang.Object
    BatchResult class encapsulates the results from a batch request, allowing to manipulate results from individual operations one at the time. This class provides mechanisms to check which operations failed, and which operations where successfully completed.
    • Constructor Summary

      Constructors 
      Constructor Description
      BatchResult​(java.lang.Object[] results)
      Constructs an object of a BatchResult.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int[] getFailureIds()
      Returns an array which contains the indexes of the operations that failed.
      java.lang.Object getResult​(int operationID)
      Returns the object produced by the specified batch operation.
      int[] getSuccessIds()
      Returns a list of the operation ID that were successfully completed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • failureIds

        protected int[] failureIds
      • successIds

        protected int[] successIds
    • Constructor Detail

      • BatchResult

        public BatchResult​(java.lang.Object[] results)
        Constructs an object of a BatchResult.
        Parameters:
        results - An array of CIMOperation
    • Method Detail

      • getFailureIds

        public int[] getFailureIds()
        Returns an array which contains the indexes of the operations that failed. A zero length array, means that none of the operations fail.
        Returns:
        The indexes of the operations that failed
      • getResult

        public java.lang.Object getResult​(int operationID)
                                   throws CIMException
        Returns the object produced by the specified batch operation. The object may be an enumeration of entities, a single CIM Object (CIMClass, CIMInstance, CIMObject) or null
        Parameters:
        operationID -
        Returns:
        The object
        Throws:
        CIMException - a cim exception of the operation was not succesfully completed.
        java.lang.IllegalArgumentException - is an invalid operationID is passed.
      • getSuccessIds

        public int[] getSuccessIds()
        Returns a list of the operation ID that were successfully completed.
        Returns:
        The indexes of the operations that succeeded