Class GridCompoundFuture<T,​R>

    • Constructor Detail

      • GridCompoundFuture

        public GridCompoundFuture()
        Default constructor.
      • GridCompoundFuture

        public GridCompoundFuture​(@Nullable
                                  @Nullable IgniteReducer<T,​R> rdc)
        Parameters:
        rdc - Reducer.
    • Method Detail

      • compoundsReadLock

        protected void compoundsReadLock()
        Locks compound to read.
      • compoundsReadUnlock

        protected void compoundsReadUnlock()
        Unlocks compound to read.
      • compoundsLockedExclusively

        protected Object compoundsLockedExclusively​(Supplier<Object> supplier)
        Locks compounds list and executes code in supplier, when the lock holds.
        Parameters:
        supplier - Closure to execute some code when the compounds are locked exclusively.
        Returns:
        A result of the supplier.
      • ignoreFailure

        protected boolean ignoreFailure​(Throwable err)
        Checks if this compound future should ignore this particular exception.
        Parameters:
        err - Exception to check.
        Returns:
        True if this error should be ignored.
      • processFailure

        protected boolean processFailure​(Throwable err,
                                         IgniteInternalFuture<T> fut)
        Processes error thrown by some of the inner futures.
        Parameters:
        err - Thrown exception.
        fut - Failed future.
        Returns:
        True if this error should be ignored.
      • clear

        protected final void clear()
        Clear futures.
      • initialized

        public final boolean initialized()
        Returns:
        True if this future was initialized. Initialization happens when markInitialized() method is called on future.
      • markInitialized

        public final GridCompoundFuture<T,​R> markInitialized()
        Mark this future as initialized.
      • logError

        protected void logError​(IgniteLogger log,
                                String msg,
                                Throwable e)
        Parameters:
        log - IgniteLogger.
        msg - ShortMessage.
        e - Exception.
      • logDebug

        protected void logDebug​(IgniteLogger log,
                                String msg)
        Parameters:
        log - IgniteLogger.
        msg - ShortMessage.
      • future

        protected final IgniteInternalFuture<T> future​(int idx)
        Returns future at the specified position in this list.
        Parameters:
        idx - - index of the element to return
        Returns:
        Future.
      • futuresCountNoLock

        protected final int futuresCountNoLock()
        Returns:
        Futures size.
      • hasFutures

        protected final boolean hasFutures()
        Returns:
        True if has at least one future.