Interface BatchApiOp

  • All Superinterfaces:
    APIOperation
    All Known Subinterfaces:
    ConnectorFacade

    public interface BatchApiOp
    extends APIOperation
    Execute a series of APIOperation. If a resource does not support batch operations in any form and it cannot be coerced into doing so then the connector will not implement the BatchOp interface. Batch will still be supported via the framework but the operations will be executed iteratively through the connector. With this every connector appears to support batch even if it's not the most efficient implementation possible.
    Since:
    1.5
    • Method Detail

      • executeBatch

        Subscription executeBatch​(java.util.List<BatchTask> tasks,
                                  Observer<BatchResult> observer,
                                  OperationOptions options)
        Execute a series of BatchTask.
        Parameters:
        tasks - the list of batch tasks to execute.
        observer - an observer/handler for the ongoing results of the batch.
        options - options for the operation.
        Returns:
        a subscription object for managing the lifecycle of the observer.
      • queryBatch

        Subscription queryBatch​(BatchToken token,
                                Observer<BatchResult> observer,
                                OperationOptions options)
        Query an ongoing batch execution for new results.
        Parameters:
        token - a token for a previously started batch, the ongoing results of which should invoke the observer.
        observer - an observer/handler for the ongoing results of the batch.
        options - options for the operation.
        Returns:
        a subscription object for managing the lifecycle of the observer.