/** {@inheritDoc} */ @Override public <K1, V1> GatewayProtectedCacheProxy<K1, V1> keepBinary() { CacheOperationGate opGate = onEnter(); try { return new GatewayProtectedCacheProxy<>((IgniteCacheProxy<K1, V1>) delegate, opCtx.keepBinary(), lock); } finally { onLeave(opGate); } }
/** {@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 <V1> IgniteQueue<V1> withKeepBinary() { CacheOperationContext opCtx = cctx.operationContextPerCall(); if (opCtx != null && opCtx.isKeepBinary()) return (GridCacheQueueAdapter<V1>)this; opCtx = opCtx == null ? new CacheOperationContext( false, null, true, null, false, null, false, DFLT_ALLOW_ATOMIC_OPS_IN_TX) : opCtx.keepBinary(); cctx.operationContextPerCall(opCtx); return (GridCacheQueueAdapter<V1>)this; }
/** * Makes current operation context as keepBinary. * * @param cctx Cache context. * @return Old operation context. */ private CacheOperationContext setKeepBinaryContext(GridCacheContext<?, ?> cctx) { CacheOperationContext opCtx = cctx.operationContextPerCall(); // Force keepBinary for operation context to avoid binary deserialization inside entry processor if (cctx.binaryMarshaller()) { CacheOperationContext newOpCtx = null; if (opCtx == null) // Mimics behavior of GridCacheAdapter#keepBinary and GridCacheProxyImpl#keepBinary newOpCtx = new CacheOperationContext(false, null, true, null, false, null, false, true); else if (!opCtx.isKeepBinary()) newOpCtx = opCtx.keepBinary(); if (newOpCtx != null) cctx.operationContextPerCall(newOpCtx); } return opCtx; }
newOpCtx = new CacheOperationContext().keepBinary(); else if (!opCtx.isKeepBinary()) newOpCtx = opCtx.keepBinary();
/** {@inheritDoc} */ @Override public <K1, V1> GatewayProtectedCacheProxy<K1, V1> keepBinary() { CacheOperationGate opGate = onEnter(); try { return new GatewayProtectedCacheProxy<>((IgniteCacheProxy<K1, V1>) delegate, opCtx.keepBinary(), lock); } finally { onLeave(opGate); } }
/** {@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)); }
/** * Makes current operation context as keepBinary. * * @param cctx Cache context. * @return Old operation context. */ private CacheOperationContext setKeepBinaryContext(GridCacheContext<?, ?> cctx) { CacheOperationContext opCtx = cctx.operationContextPerCall(); // Force keepBinary for operation context to avoid binary deserialization inside entry processor if (cctx.binaryMarshaller()) { CacheOperationContext newOpCtx = null; if (opCtx == null) // Mimics behavior of GridCacheAdapter#keepBinary and GridCacheProxyImpl#keepBinary newOpCtx = new CacheOperationContext(false, null, true, null, false, null, false, true); else if (!opCtx.isKeepBinary()) newOpCtx = opCtx.keepBinary(); if (newOpCtx != null) cctx.operationContextPerCall(newOpCtx); } return opCtx; }
newOpCtx = new CacheOperationContext().keepBinary(); else if (!opCtx.isKeepBinary()) newOpCtx = opCtx.keepBinary();