/** * @param keys Keys to clear. * @throws IgniteCheckedException In case of error. */ private void clear(@Nullable Set<? extends K> keys) throws IgniteCheckedException { //TODO IGNITE-7952 MvccUtils.verifyMvccOperationSupport(ctx, "Clear"); if (isLocal()) { if (keys == null) clearLocally(true, false, false); else clearLocallyAll(keys, true, false, false); } else { executeClearTask(keys, false).get(); executeClearTask(keys, true).get(); } }
/** * @param keys Keys to clear or {@code null} if all cache should be cleared. * @return Future. */ private IgniteInternalFuture<?> clearAsync(@Nullable final Set<? extends K> keys) { //TODO IGNITE-7952 MvccUtils.verifyMvccOperationSupport(ctx, "Clear"); if (isLocal()) return clearLocallyAsync(keys); else return executeClearTask(keys, false).chain(new CX1<IgniteInternalFuture<?>, Object>() { @Override public Object applyx(IgniteInternalFuture<?> fut) throws IgniteCheckedException { executeClearTask(keys, true).get(); return null; } }); }
/** * @param keys Keys to clear. * @throws IgniteCheckedException In case of error. */ private void clear(@Nullable Set<? extends K> keys) throws IgniteCheckedException { //TODO IGNITE-7952 MvccUtils.verifyMvccOperationSupport(ctx, "Clear"); if (isLocal()) { if (keys == null) clearLocally(true, false, false); else clearLocallyAll(keys, true, false, false); } else { executeClearTask(keys, false).get(); executeClearTask(keys, true).get(); } }
/** * @param keys Keys to clear or {@code null} if all cache should be cleared. * @return Future. */ private IgniteInternalFuture<?> clearAsync(@Nullable final Set<? extends K> keys) { //TODO IGNITE-7952 MvccUtils.verifyMvccOperationSupport(ctx, "Clear"); if (isLocal()) return clearLocallyAsync(keys); else return executeClearTask(keys, false).chain(new CX1<IgniteInternalFuture<?>, Object>() { @Override public Object applyx(IgniteInternalFuture<?> fut) throws IgniteCheckedException { executeClearTask(keys, true).get(); return null; } }); }