/** {@inheritDoc} */ @Override public final GridCacheProxyImpl<K, V> setSkipStore(boolean skipStore) { CacheOperationContext opCtx = new CacheOperationContext( true, null, false, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX); return new GridCacheProxyImpl<>(ctx, this, opCtx); }
/** {@inheritDoc} */ @Override public final IgniteInternalCache<K, V> withNoRetries() { CacheOperationContext opCtx = new CacheOperationContext( false, null, false, null, true, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX); return new GridCacheProxyImpl<>(ctx, this, opCtx); }
/** {@inheritDoc} */ @Override public final GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) { CacheOperationContext opCtx = new CacheOperationContext( false, subjId, false, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX); return new GridCacheProxyImpl<>(ctx, this, opCtx); }
/** {@inheritDoc} */ @Override public final <K1, V1> GridCacheProxyImpl<K1, V1> keepBinary() { CacheOperationContext opCtx = new CacheOperationContext( false, null, true, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX); return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)this, opCtx); }
/** {@inheritDoc} */ @Override public final IgniteInternalCache<K, V> withAllowAtomicOpsInTx() { CacheOperationContext opCtx = new CacheOperationContext( false, null, false, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX); return new GridCacheProxyImpl<>(ctx, this, opCtx); }
/** {@inheritDoc} */ @Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) { return new GridCacheProxyImpl<>(ctx, delegate, opCtx != null ? opCtx.forSubjectId(subjId) : new CacheOperationContext(false, subjId, false, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); }
/** * @return Internal proxy. */ @Override public GridCacheProxyImpl<K, V> internalProxy() { GridCacheContext<K, V> ctx = getContextSafe(); IgniteInternalCache<K, V> delegate = getDelegateSafe(); return new GridCacheProxyImpl<>(ctx, delegate, ctx.operationContextPerCall()); }
/** {@inheritDoc} */ @Override public IgniteInternalCache<K, V> withAllowAtomicOpsInTx() { CacheOperationContext prev = gate.enter(opCtx); try { return new GridCacheProxyImpl<>(ctx, delegate, opCtx.setAllowAtomicOpsInTx()); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public final GridCacheProxyImpl<K, V> withExpiryPolicy(ExpiryPolicy plc) { assert !CU.isUtilityCache(ctx.name()); CacheOperationContext opCtx = new CacheOperationContext( false, null, false, plc, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX); return new GridCacheProxyImpl<>(ctx, this, opCtx); }
/** {@inheritDoc} */ @Override public <K1, V1> GridCacheProxyImpl<K1, V1> keepBinary() { if (opCtx != null && opCtx.isKeepBinary()) return (GridCacheProxyImpl<K1, V1>)this; return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)delegate, opCtx != null ? opCtx.keepBinary() : new CacheOperationContext(false, null, true, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); }
/** {@inheritDoc} */ @Override public IgniteInternalCache<K, V> withNoRetries() { CacheOperationContext prev = gate.enter(opCtx); try { return new GridCacheProxyImpl<>(ctx, delegate, new CacheOperationContext(false, null, false, null, true, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public GridCacheProxyImpl<K, V> withExpiryPolicy(ExpiryPolicy plc) { CacheOperationContext prev = gate.enter(opCtx); try { return new GridCacheProxyImpl<>(ctx, delegate, opCtx != null ? opCtx.withExpiryPolicy(plc) : new CacheOperationContext(false, null, false, plc, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public GridCacheProxyImpl<K, V> setSkipStore(boolean skipStore) { CacheOperationContext prev = gate.enter(opCtx); try { if (opCtx != null && opCtx.skipStore() == skipStore) return this; return new GridCacheProxyImpl<>(ctx, delegate, opCtx != null ? opCtx.setSkipStore(skipStore) : new CacheOperationContext(true, null, false, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); } finally { gate.leave(prev); } }
opCtx != null ? new GridCacheProxyImpl(internalCache.context(), internalCache, opCtx) : internalCache;
/** * @return Internal proxy. */ @Override public GridCacheProxyImpl<K, V> internalProxy() { checkRestart(); return new GridCacheProxyImpl<>(ctx, delegate, ctx.operationContextPerCall()); }
/** {@inheritDoc} */ @Override public GridCacheProxyImpl<K, V> forSubjectId(UUID subjId) { return new GridCacheProxyImpl<>(ctx, delegate, opCtx != null ? opCtx.forSubjectId(subjId) : new CacheOperationContext(false, subjId, false, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); }
/** {@inheritDoc} */ @Override public IgniteInternalCache<K, V> withAllowAtomicOpsInTx() { CacheOperationContext prev = gate.enter(opCtx); try { return new GridCacheProxyImpl<>(ctx, delegate, opCtx.setAllowAtomicOpsInTx()); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public <K1, V1> GridCacheProxyImpl<K1, V1> keepBinary() { if (opCtx != null && opCtx.isKeepBinary()) return (GridCacheProxyImpl<K1, V1>)this; return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)delegate, opCtx != null ? opCtx.keepBinary() : new CacheOperationContext(false, null, true, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); }
/** {@inheritDoc} */ @Override public IgniteInternalCache<K, V> withNoRetries() { CacheOperationContext prev = gate.enter(opCtx); try { return new GridCacheProxyImpl<>(ctx, delegate, new CacheOperationContext(false, null, false, null, true, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public GridCacheProxyImpl<K, V> withExpiryPolicy(ExpiryPolicy plc) { CacheOperationContext prev = gate.enter(opCtx); try { return new GridCacheProxyImpl<>(ctx, delegate, opCtx != null ? opCtx.withExpiryPolicy(plc) : new CacheOperationContext(false, null, false, plc, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX)); } finally { gate.leave(prev); } }