/** * @param fut Future. * @return Future ignoring interrupts on {@code get()}. */ private static <T> IgniteInternalFuture<T> nonInterruptable(IgniteInternalFuture<T> fut) { // Safety. if (fut instanceof GridFutureAdapter) ((GridFutureAdapter)fut).ignoreInterrupts(); return fut; }
/** {@inheritDoc} */ @Override public void close() { IgniteFuture<Boolean> destroyFut = null; gate.enter(); try { delegate.close(); if (delegate.separated()) { IgniteInternalFuture<Boolean> fut = cctx.kernalContext().cache().dynamicDestroyCache( cctx.cache().name(), false, true, false, null); ((GridFutureAdapter)fut).ignoreInterrupts(); destroyFut = new IgniteFutureImpl<>(fut); } } finally { gate.leave(); } if (destroyFut != null) destroyFut.get(); }
/** * @param fut Future. * @return Future ignoring interrupts on {@code get()}. */ private <T> IgniteInternalFuture<T> nonInterruptable(IgniteInternalFuture<T> fut) { // Safety. if (fut instanceof GridFutureAdapter) ((GridFutureAdapter)fut).ignoreInterrupts(); return fut; }
/** {@inheritDoc} */ @Override public void close() { IgniteFuture<Boolean> destroyFut = null; gate.enter(); try { delegate.close(); if (delegate.separated()) { IgniteInternalFuture<Boolean> fut = cctx.kernalContext().cache().dynamicDestroyCache( cctx.cache().name(), false, true, false); ((GridFutureAdapter)fut).ignoreInterrupts(); destroyFut = new IgniteFutureImpl<>(fut); } } finally { gate.leave(); } if (destroyFut != null) destroyFut.get(); }