Class GridServiceDeploymentCompoundFuture<T extends Serializable>
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<R>
-
- org.apache.ignite.internal.util.future.GridCompoundFuture<Object,Object>
-
- org.apache.ignite.internal.processors.service.GridServiceDeploymentCompoundFuture<T>
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<Object>,IgniteInClosure<IgniteInternalFuture<Object>>
public class GridServiceDeploymentCompoundFuture<T extends Serializable> extends GridCompoundFuture<Object,Object>
Service deployment compound future. If any exceptions are thrown during deployment, thenIgniteCheckedExceptionwithServiceDeploymentExceptionas a cause will be thrown fromget()method after all futures complete or fail. Inner exception will contain configurations of failed services.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridServiceDeploymentCompoundFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(GridServiceDeploymentFuture<T> fut, boolean own)protected booleanonDone(@Nullable Object res, @Nullable Throwable err, boolean cancel)protected booleanprocessFailure(Throwable err, IgniteInternalFuture<Object> fut)Processes error thrown by some of the inner futures.Collection<T>servicesToRollback()-
Methods inherited from class org.apache.ignite.internal.util.future.GridCompoundFuture
add, apply, cancel, clear, compoundsLockedExclusively, compoundsReadLock, compoundsReadUnlock, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, logDebug, logError, markInitialized, toString
-
Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter
chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, listen, logger, onCancelled, onDone, onDone, onDone, onDone, reset, result
-
-
-
-
Method Detail
-
processFailure
protected boolean processFailure(Throwable err, IgniteInternalFuture<Object> fut)
Processes error thrown by some of the inner futures.- Overrides:
processFailurein classGridCompoundFuture<Object,Object>- Parameters:
err- Thrown exception.fut- Failed future.- Returns:
Trueif this error should be ignored.
-
onDone
protected boolean onDone(@Nullable @Nullable Object res, @Nullable @Nullable Throwable err, boolean cancel)- Overrides:
onDonein classGridFutureAdapter<Object>- Parameters:
res- Result.err- Error.cancel-Trueif future is being cancelled.- Returns:
Trueif result was set by this call.
-
add
public void add(GridServiceDeploymentFuture<T> fut, boolean own)
- Parameters:
fut- Child future.own- Iftrue, then corresponding service will be cancelled on failure.
-
servicesToRollback
public Collection<T> servicesToRollback()
- Returns:
- Collection of ids of services that were written to cache during current deployment.
-
-