http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java index d551258..3993146 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java @@ -43,7 +43,7 @@ public class CacheOperationContext implements Serializable { private final UUID subjId; /** Keep portable flag. */ - private final boolean keepPortable; + private final boolean keepBinary; /** Expiry policy. */ private final ExpiryPolicy expiryPlc; @@ -56,7 +56,7 @@ public class CacheOperationContext implements Serializable { subjId = null; - keepPortable = false; + keepBinary = false; expiryPlc = null; @@ -66,20 +66,20 @@ public class CacheOperationContext implements Serializable { /** * @param skipStore Skip store flag. * @param subjId Subject ID. - * @param keepPortable Keep portable flag. + * @param keepBinary Keep portable flag. * @param expiryPlc Expiry policy. */ public CacheOperationContext( boolean skipStore, @Nullable UUID subjId, - boolean keepPortable, + boolean keepBinary, @Nullable ExpiryPolicy expiryPlc, boolean noRetries) { this.skipStore = skipStore; this.subjId = subjId; - this.keepPortable = keepPortable; + this.keepBinary = keepBinary; this.expiryPlc = expiryPlc; @@ -89,8 +89,8 @@ public class CacheOperationContext implements Serializable { /** * @return Keep portable flag. */ - public boolean isKeepPortable() { - return keepPortable; + public boolean isKeepBinary() { + return keepBinary; } /** @@ -98,7 +98,7 @@ public class CacheOperationContext implements Serializable { * * @return New instance of CacheOperationContext with keep portable flag. */ - public CacheOperationContext keepPortable() { + public CacheOperationContext keepBinary() { return new CacheOperationContext( skipStore, subjId, @@ -126,7 +126,7 @@ public class CacheOperationContext implements Serializable { return new CacheOperationContext( skipStore, subjId, - keepPortable, + keepBinary, expiryPlc, noRetries); } @@ -148,7 +148,7 @@ public class CacheOperationContext implements Serializable { return new CacheOperationContext( skipStore, subjId, - keepPortable, + keepBinary, expiryPlc, noRetries); } @@ -183,7 +183,7 @@ public class CacheOperationContext implements Serializable { return new CacheOperationContext( skipStore, subjId, - keepPortable, + keepBinary, expiryPlc, noRetries );
http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java index 98dcc18..fac704b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java @@ -1878,7 +1878,7 @@ public class GridCacheConcurrentMap { * @return Key iterator. */ Iterator<K> keyIterator() { - return new KeyIterator<>(map, opCtxPerCall != null && opCtxPerCall.isKeepPortable(), filter); + return new KeyIterator<>(map, opCtxPerCall != null && opCtxPerCall.isKeepBinary(), filter); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java index 2a161d3..ac67075 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java @@ -1710,7 +1710,7 @@ public class GridCacheContext<K, V> implements Externalizable { public boolean keepPortable() { CacheOperationContext opCtx = operationContextPerCall(); - return opCtx != null && opCtx.isKeepPortable(); + return opCtx != null && opCtx.isKeepBinary(); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java index 023db2e..48c17ab 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java @@ -3756,7 +3756,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme @Override public <K, V> Cache.Entry<K, V> wrapLazyValue() { CacheOperationContext opCtx = cctx.operationContextPerCall(); - return new LazyValueEntry<>(key, opCtx != null && opCtx.isKeepPortable()); + return new LazyValueEntry<>(key, opCtx != null && opCtx.isKeepBinary()); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java index cd779f2..cca6d6a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java @@ -229,12 +229,12 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte /** {@inheritDoc} */ @Override public <K1, V1> GridCacheProxyImpl<K1, V1> keepPortable() { - if (opCtx != null && opCtx.isKeepPortable()) + if (opCtx != null && opCtx.isKeepBinary()) return (GridCacheProxyImpl<K1, V1>)this; return new GridCacheProxyImpl<>((GridCacheContext<K1, V1>)ctx, (GridCacheAdapter<K1, V1>)delegate, - opCtx != null ? opCtx.keepPortable() : new CacheOperationContext(false, null, true, null, false)); + opCtx != null ? opCtx.keepBinary() : new CacheOperationContext(false, null, true, null, false)); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java index 9838158..b64ad9a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java @@ -445,7 +445,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V final CacheQuery<Map.Entry<K,V>> qry; final CacheQueryFuture<Map.Entry<K,V>> fut; - boolean isKeepPortable = opCtx != null && opCtx.isKeepPortable(); + boolean isKeepPortable = opCtx != null && opCtx.isKeepBinary(); if (filter instanceof ScanQuery) { IgniteBiPredicate<K, V> p = ((ScanQuery)filter).getFilter(); @@ -1672,7 +1672,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V * </ul> <p> For example, if you use {@link Integer} as a key and {@code Value} class as a value (which will be * stored in portable format), you should acquire following projection to avoid deserialization: * <pre> - * IgniteInternalCache<Integer, GridPortableObject> prj = cache.keepPortable(); + * IgniteInternalCache<Integer, GridPortableObject> prj = cache.keepBinary(); * * // Value is not deserialized and returned in portable format. * GridPortableObject po = prj.get(1); @@ -1726,7 +1726,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V CacheOperationContext opCtx0 = new CacheOperationContext(true, opCtx != null ? opCtx.subjectId() : null, - opCtx != null && opCtx.isKeepPortable(), + opCtx != null && opCtx.isKeepBinary(), opCtx != null ? opCtx.expiry() : null, opCtx != null && opCtx.noRetries()); http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java index 167cc8e..2c9ff14 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java @@ -188,7 +188,7 @@ import org.jetbrains.annotations.Nullable; * needed for performance reasons. To work with portable format directly you should create special projection * using {@link #keepPortable()} method: * <pre> - * IgniteInternalCache<Integer, GridPortableObject> prj = Ignition.grid().cache(null).keepPortable(); + * IgniteInternalCache<Integer, GridPortableObject> prj = Ignition.grid().cache(null).keepBinary(); * * // Value is not deserialized and returned in portable format. * GridPortableObject po = prj.get(1); @@ -249,7 +249,7 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> { * (which will be stored in portable format), you should acquire following projection * to avoid deserialization: * <pre> - * IgniteInternalCache<Integer, GridPortableObject> prj = cache.keepPortable(); + * IgniteInternalCache<Integer, GridPortableObject> prj = cache.keepBinary(); * * // Value is not deserialized and returned in portable format. * GridPortableObject po = prj.get(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java index 60faad7..732ff43 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java @@ -39,7 +39,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo; import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException; -import org.apache.ignite.internal.processors.cache.GridCacheFilterFailedException; import org.apache.ignite.internal.processors.cache.GridCacheLockTimeoutException; import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate; import org.apache.ignite.internal.processors.cache.GridCacheReturn; @@ -62,7 +61,6 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException; import org.apache.ignite.internal.util.F0; import org.apache.ignite.internal.util.GridLeanSet; -import org.apache.ignite.internal.util.future.GridEmbeddedFuture; import org.apache.ignite.internal.util.future.GridFinishedFuture; import org.apache.ignite.internal.util.lang.GridClosureException; import org.apache.ignite.internal.util.typedef.C1; @@ -606,7 +604,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach accessTtl, CU.empty0(), opCtx != null && opCtx.skipStore(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index 715a763..255640f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -53,7 +53,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheConcurrentMap; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException; -import org.apache.ignite.internal.processors.cache.GridCacheFilterFailedException; import org.apache.ignite.internal.processors.cache.GridCacheMapEntry; import org.apache.ignite.internal.processors.cache.GridCacheMapEntryFactory; import org.apache.ignite.internal.processors.cache.GridCacheOperation; @@ -834,7 +833,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { subjId, taskNameHash, opCtx != null && opCtx.skipStore(), - opCtx != null && opCtx.isKeepPortable(), + opCtx != null && opCtx.isKeepBinary(), opCtx != null && opCtx.noRetries() ? 1 : MAX_RETRIES, waitTopFut); @@ -900,7 +899,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { subjId, taskNameHash, opCtx != null && opCtx.skipStore(), - opCtx != null && opCtx.isKeepPortable(), + opCtx != null && opCtx.isKeepBinary(), opCtx != null && opCtx.noRetries() ? 1 : MAX_RETRIES, true); http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java index d4fc509..efc10b2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java @@ -490,7 +490,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte accessTtl, CU.empty0(), opCtx != null && opCtx.skipStore(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); // Future will be added to mvcc only if it was mapped to remote nodes. fut.map(); http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java index 5db8b37..8740e44 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java @@ -456,7 +456,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V> accessTtl, CU.empty0(), opCtx != null && opCtx.skipStore(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); if (!ctx.mvcc().addFuture(fut)) throw new IllegalStateException("Duplicate future ID: " + fut); http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java index dd01c88..0afd6bc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java @@ -49,7 +49,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException; -import org.apache.ignite.internal.processors.cache.GridCacheFilterFailedException; import org.apache.ignite.internal.processors.cache.GridCacheMapEntry; import org.apache.ignite.internal.processors.cache.GridCacheMapEntryFactory; import org.apache.ignite.internal.processors.cache.GridCacheOperation; @@ -156,7 +155,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { filter, ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); } /** {@inheritDoc} */ @@ -179,7 +178,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { filter, ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); if (statsEnabled) metrics0().addPutTimeNanos(System.nanoTime() - start); @@ -282,7 +281,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { ctx.equalsValArray(oldVal), ctx.writeThrough(), ctx.readThrough(), - ctx.operationContextPerCall().isKeepPortable()); + ctx.operationContextPerCall().isKeepBinary()); } /** {@inheritDoc} */ @@ -300,7 +299,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { ctx.equalsValArray(val), ctx.writeThrough(), ctx.readThrough(), - ctx.operationContextPerCall().isKeepPortable()); + ctx.operationContextPerCall().isKeepBinary()); } /** {@inheritDoc} */ @@ -342,7 +341,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { CU.empty0(), ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); if (statsEnabled) metrics0().addPutTimeNanos(System.nanoTime() - start); @@ -373,7 +372,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { CU.empty0(), ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); } /** {@inheritDoc} */ @@ -397,7 +396,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { CU.empty0(), ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); } /** {@inheritDoc} */ @@ -426,7 +425,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { CU.empty0(), ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); if (statsEnabled && rmv) metrics0().addRemoveTimeNanos(System.nanoTime() - start); @@ -458,7 +457,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { ctx.equalsValArray(val), ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); } /** {@inheritDoc} */ @@ -670,7 +669,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { CacheOperationContext opCtx = ctx.operationContextPerCall(); - final boolean keepPortable = opCtx != null && opCtx.isKeepPortable(); + final boolean keepPortable = opCtx != null && opCtx.isKeepBinary(); return (Map<K, EntryProcessorResult<T>>)updateAllInternal(TRANSFORM, invokeMap.keySet(), @@ -768,7 +767,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { null, ctx.writeThrough(), ctx.readThrough(), - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); } /** {@inheritDoc} */ @@ -823,7 +822,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { final ExpiryPolicy expiry = expiryPerCall(); - final boolean keepPortable = opCtx != null && opCtx.isKeepPortable(); + final boolean keepPortable = opCtx != null && opCtx.isKeepBinary(); IgniteInternalFuture fut = asyncOp(new Callable<Object>() { @Override public Object call() throws Exception { @@ -874,7 +873,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { CacheOperationContext opCtx = ctx.operationContextPerCall(); - final boolean keepPortable = opCtx != null && opCtx.isKeepPortable(); + final boolean keepPortable = opCtx != null && opCtx.isKeepBinary(); IgniteInternalFuture fut = asyncOp(new Callable<Object>() { @Override public Object call() throws Exception { http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheDefaultPortableAffinityKeyMapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheDefaultPortableAffinityKeyMapper.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheDefaultPortableAffinityKeyMapper.java index 5ead014..c203ddc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheDefaultPortableAffinityKeyMapper.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheDefaultPortableAffinityKeyMapper.java @@ -21,7 +21,7 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper; import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.igniteobject.IgniteObject; +import org.apache.ignite.binary.BinaryObject; /** * @@ -43,8 +43,8 @@ public class CacheDefaultPortableAffinityKeyMapper extends GridCacheDefaultAffin U.error(log, "Failed to marshal key to portable: " + key, e); } - if (key instanceof IgniteObject) - return proc.affinityKey((IgniteObject)key); + if (key instanceof BinaryObject) + return proc.affinityKey((BinaryObject)key); else return super.affinityKey(key); } http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessor.java index b7e942c..dcaf14c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessor.java @@ -22,9 +22,9 @@ import java.util.Map; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteObjects; import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor; -import org.apache.ignite.igniteobject.IgniteObjectBuilder; -import org.apache.ignite.igniteobject.IgniteObjectMetadata; -import org.apache.ignite.igniteobject.IgniteObject; +import org.apache.ignite.binary.BinaryObjectBuilder; +import org.apache.ignite.binary.BinaryTypeMetadata; +import org.apache.ignite.binary.BinaryObject; import org.jetbrains.annotations.Nullable; /** @@ -35,13 +35,13 @@ public interface CacheObjectPortableProcessor extends IgniteCacheObjectProcessor * @param typeId Type ID. * @return Builder. */ - public IgniteObjectBuilder builder(int typeId); + public BinaryObjectBuilder builder(int typeId); /** * @param clsName Class name. * @return Builder. */ - public IgniteObjectBuilder builder(String clsName); + public BinaryObjectBuilder builder(String clsName); /** * Creates builder initialized by existing portable object. @@ -49,14 +49,14 @@ public interface CacheObjectPortableProcessor extends IgniteCacheObjectProcessor * @param portableObj Portable object to edit. * @return Portable builder. */ - public IgniteObjectBuilder builder(IgniteObject portableObj); + public BinaryObjectBuilder builder(BinaryObject portableObj); /** * @param typeId Type ID. * @param newMeta New meta data. * @throws IgniteException In case of error. */ - public void addMeta(int typeId, final IgniteObjectMetadata newMeta) throws IgniteException; + public void addMeta(int typeId, final BinaryTypeMetadata newMeta) throws IgniteException; /** * @param typeId Type ID. @@ -73,20 +73,20 @@ public interface CacheObjectPortableProcessor extends IgniteCacheObjectProcessor * @return Meta data. * @throws IgniteException In case of error. */ - @Nullable public IgniteObjectMetadata metadata(int typeId) throws IgniteException; + @Nullable public BinaryTypeMetadata metadata(int typeId) throws IgniteException; /** * @param typeIds Type ID. * @return Meta data. * @throws IgniteException In case of error. */ - public Map<Integer, IgniteObjectMetadata> metadata(Collection<Integer> typeIds) throws IgniteException; + public Map<Integer, BinaryTypeMetadata> metadata(Collection<Integer> typeIds) throws IgniteException; /** * @return Metadata for all types. * @throws IgniteException In case of error. */ - public Collection<IgniteObjectMetadata> metadata() throws IgniteException; + public Collection<BinaryTypeMetadata> metadata() throws IgniteException; /** * @return Portables interface. http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessorImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessorImpl.java index ab6ac25..8e24847 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectPortableProcessorImpl.java @@ -47,11 +47,11 @@ import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.portable.GridPortableMarshaller; import org.apache.ignite.internal.portable.PortableContext; import org.apache.ignite.internal.portable.PortableMetaDataHandler; -import org.apache.ignite.internal.portable.IgniteObjectMetaDataImpl; -import org.apache.ignite.internal.portable.IgniteObjectImpl; -import org.apache.ignite.internal.portable.IgniteObjectOffheapImpl; +import org.apache.ignite.internal.portable.BinaryMetaDataImpl; +import org.apache.ignite.internal.portable.BinaryObjectImpl; +import org.apache.ignite.internal.portable.BinaryObjectOffheapImpl; import org.apache.ignite.internal.portable.PortableUtils; -import org.apache.ignite.internal.portable.builder.IgniteObjectBuilderImpl; +import org.apache.ignite.internal.portable.builder.BinaryObjectBuilderImpl; import org.apache.ignite.internal.portable.streams.PortableInputStream; import org.apache.ignite.internal.portable.streams.PortableOffheapInputStream; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; @@ -81,10 +81,10 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.marshaller.portable.PortableMarshaller; -import org.apache.ignite.igniteobject.IgniteObjectBuilder; -import org.apache.ignite.igniteobject.IgniteObjectException; -import org.apache.ignite.igniteobject.IgniteObjectMetadata; -import org.apache.ignite.igniteobject.IgniteObject; +import org.apache.ignite.binary.BinaryObjectBuilder; +import org.apache.ignite.binary.BinaryObjectException; +import org.apache.ignite.binary.BinaryTypeMetadata; +import org.apache.ignite.binary.BinaryObject; import org.jetbrains.annotations.Nullable; import org.jsr166.ConcurrentHashMap8; import sun.misc.Unsafe; @@ -141,10 +141,10 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor private final boolean clientNode; /** */ - private volatile IgniteCacheProxy<PortableMetaDataKey, IgniteObjectMetadata> metaDataCache; + private volatile IgniteCacheProxy<PortableMetaDataKey, BinaryTypeMetadata> metaDataCache; /** */ - private final ConcurrentHashMap8<PortableMetaDataKey, IgniteObjectMetadata> clientMetaDataCache; + private final ConcurrentHashMap8<PortableMetaDataKey, BinaryTypeMetadata> clientMetaDataCache; /** Predicate to filter portable meta data in utility cache. */ private final CacheEntryPredicate metaPred = new CacheEntryPredicateAdapter() { @@ -169,7 +169,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor private IgniteObjects portables; /** Metadata updates collected before metadata cache is initialized. */ - private final Map<Integer, IgniteObjectMetadata> metaBuf = new ConcurrentHashMap<>(); + private final Map<Integer, BinaryTypeMetadata> metaBuf = new ConcurrentHashMap<>(); /** */ private UUID metaCacheQryId; @@ -268,24 +268,24 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor clientNode = this.ctx.clientNode(); - clientMetaDataCache = clientNode ? new ConcurrentHashMap8<PortableMetaDataKey, IgniteObjectMetadata>() : null; + clientMetaDataCache = clientNode ? new ConcurrentHashMap8<PortableMetaDataKey, BinaryTypeMetadata>() : null; } /** {@inheritDoc} */ @Override public void start() throws IgniteCheckedException { if (marsh instanceof PortableMarshaller) { PortableMetaDataHandler metaHnd = new PortableMetaDataHandler() { - @Override public void addMeta(int typeId, IgniteObjectMetadata newMeta) - throws IgniteObjectException { + @Override public void addMeta(int typeId, BinaryTypeMetadata newMeta) + throws BinaryObjectException { if (metaDataCache == null) { - IgniteObjectMetadata oldMeta = metaBuf.get(typeId); + BinaryTypeMetadata oldMeta = metaBuf.get(typeId); if (oldMeta == null || checkMeta(typeId, oldMeta, newMeta, null)) { synchronized (this) { Map<String, String> fields = new HashMap<>(); if (checkMeta(typeId, oldMeta, newMeta, fields)) { - newMeta = new IgniteObjectMetaDataImpl(newMeta.typeName(), + newMeta = new BinaryMetaDataImpl(newMeta.typeName(), fields, newMeta.affinityKeyFieldName()); @@ -307,7 +307,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor CacheObjectPortableProcessorImpl.this.addMeta(typeId, newMeta); } - @Override public IgniteObjectMetadata metadata(int typeId) throws IgniteObjectException { + @Override public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException { if (metaDataCache == null) U.awaitQuiet(startLatch); @@ -350,7 +350,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor GridCacheQueryManager qryMgr = metaDataCache.context().queries(); - CacheQuery<Map.Entry<PortableMetaDataKey, IgniteObjectMetadata>> qry = + CacheQuery<Map.Entry<PortableMetaDataKey, BinaryTypeMetadata>> qry = qryMgr.createScanQuery(new MetaDataPredicate(), null, false); qry.keepAll(false); @@ -358,9 +358,9 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor qry.projection(ctx.cluster().get().forNode(oldestSrvNode)); try { - CacheQueryFuture<Map.Entry<PortableMetaDataKey, IgniteObjectMetadata>> fut = qry.execute(); + CacheQueryFuture<Map.Entry<PortableMetaDataKey, BinaryTypeMetadata>> fut = qry.execute(); - Map.Entry<PortableMetaDataKey, IgniteObjectMetadata> next; + Map.Entry<PortableMetaDataKey, BinaryTypeMetadata> next; while ((next = fut.next()) != null) { assert next.getKey() != null : next; @@ -382,7 +382,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor startLatch.countDown(); - for (Map.Entry<Integer, IgniteObjectMetadata> e : metaBuf.entrySet()) + for (Map.Entry<Integer, BinaryTypeMetadata> e : metaBuf.entrySet()) addMeta(e.getKey(), e.getValue()); metaBuf.clear(); @@ -400,16 +400,16 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor * @param key Metadata key. * @param newMeta Metadata. */ - private void addClientCacheMetaData(PortableMetaDataKey key, final IgniteObjectMetadata newMeta) { + private void addClientCacheMetaData(PortableMetaDataKey key, final BinaryTypeMetadata newMeta) { clientMetaDataCache.compute(key, - new ConcurrentHashMap8.BiFun<PortableMetaDataKey, IgniteObjectMetadata, IgniteObjectMetadata>() { - @Override public IgniteObjectMetadata apply(PortableMetaDataKey key, IgniteObjectMetadata oldMeta) { - IgniteObjectMetadata res; + new ConcurrentHashMap8.BiFun<PortableMetaDataKey, BinaryTypeMetadata, BinaryTypeMetadata>() { + @Override public BinaryTypeMetadata apply(PortableMetaDataKey key, BinaryTypeMetadata oldMeta) { + BinaryTypeMetadata res; try { res = checkMeta(key.typeId(), oldMeta, newMeta, null) ? newMeta : oldMeta; } - catch (IgniteObjectException e) { + catch (BinaryObjectException e) { res = oldMeta; } @@ -430,9 +430,9 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor /** * @param obj Object. * @return Bytes. - * @throws org.apache.ignite.igniteobject.IgniteObjectException If failed. + * @throws org.apache.ignite.binary.BinaryObjectException If failed. */ - public byte[] marshal(@Nullable Object obj) throws IgniteObjectException { + public byte[] marshal(@Nullable Object obj) throws BinaryObjectException { byte[] arr = portableMarsh.marshal(obj); assert arr.length > 0; @@ -444,9 +444,9 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor * @param ptr Off-heap pointer. * @param forceHeap If {@code true} creates heap-based object. * @return Object. - * @throws org.apache.ignite.igniteobject.IgniteObjectException If failed. + * @throws org.apache.ignite.binary.BinaryObjectException If failed. */ - public Object unmarshal(long ptr, boolean forceHeap) throws IgniteObjectException { + public Object unmarshal(long ptr, boolean forceHeap) throws BinaryObjectException { assert ptr > 0 : ptr; int size = UNSAFE.getInt(ptr); @@ -467,7 +467,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor } /** {@inheritDoc} */ - @Override public Object marshalToPortable(@Nullable Object obj) throws IgniteObjectException { + @Override public Object marshalToPortable(@Nullable Object obj) throws BinaryObjectException { if (obj == null) return null; @@ -524,9 +524,9 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor Object obj0 = portableMarsh.unmarshal(arr, null); - assert obj0 instanceof IgniteObject; + assert obj0 instanceof BinaryObject; - ((IgniteObjectImpl)obj0).detachAllowed(true); + ((BinaryObjectImpl)obj0).detachAllowed(true); return obj0; } @@ -539,50 +539,50 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor } /** {@inheritDoc} */ - @Override public IgniteObjectBuilder builder(int typeId) { - return new IgniteObjectBuilderImpl(portableCtx, typeId); + @Override public BinaryObjectBuilder builder(int typeId) { + return new BinaryObjectBuilderImpl(portableCtx, typeId); } /** {@inheritDoc} */ - @Override public IgniteObjectBuilder builder(String clsName) { - return new IgniteObjectBuilderImpl(portableCtx, clsName); + @Override public BinaryObjectBuilder builder(String clsName) { + return new BinaryObjectBuilderImpl(portableCtx, clsName); } /** {@inheritDoc} */ - @Override public IgniteObjectBuilder builder(IgniteObject portableObj) { - return IgniteObjectBuilderImpl.wrap(portableObj); + @Override public BinaryObjectBuilder builder(BinaryObject portableObj) { + return BinaryObjectBuilderImpl.wrap(portableObj); } /** {@inheritDoc} */ @Override public void updateMetaData(int typeId, String typeName, @Nullable String affKeyFieldName, - Map<String, Integer> fieldTypeIds) throws IgniteObjectException { + Map<String, Integer> fieldTypeIds) throws BinaryObjectException { portableCtx.updateMetaData(typeId, - new IgniteObjectMetaDataImpl(typeName, fieldTypeNames(fieldTypeIds), affKeyFieldName)); + new BinaryMetaDataImpl(typeName, fieldTypeNames(fieldTypeIds), affKeyFieldName)); } /** {@inheritDoc} */ - @Override public void addMeta(final int typeId, final IgniteObjectMetadata newMeta) throws IgniteObjectException { + @Override public void addMeta(final int typeId, final BinaryTypeMetadata newMeta) throws BinaryObjectException { assert newMeta != null; final PortableMetaDataKey key = new PortableMetaDataKey(typeId); try { - IgniteObjectMetadata oldMeta = metaDataCache.localPeek(key); + BinaryTypeMetadata oldMeta = metaDataCache.localPeek(key); if (oldMeta == null || checkMeta(typeId, oldMeta, newMeta, null)) { - IgniteObjectException err = metaDataCache.invoke(key, new MetaDataProcessor(typeId, newMeta)); + BinaryObjectException err = metaDataCache.invoke(key, new MetaDataProcessor(typeId, newMeta)); if (err != null) throw err; } } catch (CacheException e) { - throw new IgniteObjectException("Failed to update meta data for type: " + newMeta.typeName(), e); + throw new BinaryObjectException("Failed to update meta data for type: " + newMeta.typeName(), e); } } /** {@inheritDoc} */ - @Nullable @Override public IgniteObjectMetadata metadata(final int typeId) throws IgniteObjectException { + @Nullable @Override public BinaryTypeMetadata metadata(final int typeId) throws BinaryObjectException { try { if (clientNode) return clientMetaDataCache.get(new PortableMetaDataKey(typeId)); @@ -590,45 +590,45 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor return metaDataCache.localPeek(new PortableMetaDataKey(typeId)); } catch (CacheException e) { - throw new IgniteObjectException(e); + throw new BinaryObjectException(e); } } /** {@inheritDoc} */ - @Override public Map<Integer, IgniteObjectMetadata> metadata(Collection<Integer> typeIds) - throws IgniteObjectException { + @Override public Map<Integer, BinaryTypeMetadata> metadata(Collection<Integer> typeIds) + throws BinaryObjectException { try { Collection<PortableMetaDataKey> keys = new ArrayList<>(typeIds.size()); for (Integer typeId : typeIds) keys.add(new PortableMetaDataKey(typeId)); - Map<PortableMetaDataKey, IgniteObjectMetadata> meta = metaDataCache.getAll(keys); + Map<PortableMetaDataKey, BinaryTypeMetadata> meta = metaDataCache.getAll(keys); - Map<Integer, IgniteObjectMetadata> res = U.newHashMap(meta.size()); + Map<Integer, BinaryTypeMetadata> res = U.newHashMap(meta.size()); - for (Map.Entry<PortableMetaDataKey, IgniteObjectMetadata> e : meta.entrySet()) + for (Map.Entry<PortableMetaDataKey, BinaryTypeMetadata> e : meta.entrySet()) res.put(e.getKey().typeId(), e.getValue()); return res; } catch (CacheException e) { - throw new IgniteObjectException(e); + throw new BinaryObjectException(e); } } /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public Collection<IgniteObjectMetadata> metadata() throws IgniteObjectException { + @Override public Collection<BinaryTypeMetadata> metadata() throws BinaryObjectException { if (clientNode) return new ArrayList<>(clientMetaDataCache.values()); return F.viewReadOnly(metaDataCache.entrySetx(metaPred), - new C1<Cache.Entry<PortableMetaDataKey, IgniteObjectMetadata>, IgniteObjectMetadata>() { + new C1<Cache.Entry<PortableMetaDataKey, BinaryTypeMetadata>, BinaryTypeMetadata>() { private static final long serialVersionUID = 0L; - @Override public IgniteObjectMetadata apply( - Cache.Entry<PortableMetaDataKey, IgniteObjectMetadata> e) { + @Override public BinaryTypeMetadata apply( + Cache.Entry<PortableMetaDataKey, BinaryTypeMetadata> e) { return e.getValue(); } }); @@ -641,7 +641,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor /** {@inheritDoc} */ @Override public boolean isPortableObject(Object obj) { - return obj instanceof IgniteObject; + return obj instanceof BinaryObject; } /** {@inheritDoc} */ @@ -653,9 +653,9 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor * @param po Portable object. * @return Affinity key. */ - public Object affinityKey(IgniteObject po) { + public Object affinityKey(BinaryObject po) { try { - IgniteObjectMetadata meta = po.metaData(); + BinaryTypeMetadata meta = po.metaData(); if (meta != null) { String affKeyFieldName = meta.affinityKeyFieldName(); @@ -664,7 +664,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor return po.field(affKeyFieldName); } } - catch (IgniteObjectException e) { + catch (BinaryObjectException e) { U.error(log, "Failed to get affinity field from portable object: " + po, e); } @@ -676,7 +676,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor if (obj == null) return 0; - return isPortableObject(obj) ? ((IgniteObject)obj).typeId() : typeId(obj.getClass().getSimpleName()); + return isPortableObject(obj) ? ((BinaryObject)obj).typeId() : typeId(obj.getClass().getSimpleName()); } /** {@inheritDoc} */ @@ -684,12 +684,12 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor if (obj == null) return null; - return isPortableObject(obj) ? ((IgniteObject)obj).field(fieldName) : super.field(obj, fieldName); + return isPortableObject(obj) ? ((BinaryObject)obj).field(fieldName) : super.field(obj, fieldName); } /** {@inheritDoc} */ @Override public boolean hasField(Object obj, String fieldName) { - return obj != null && ((IgniteObject)obj).hasField(fieldName); + return obj != null && ((BinaryObject)obj).hasField(fieldName); } /** @@ -751,8 +751,8 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor if (((CacheObjectPortableContext)ctx).portableEnabled()) { obj = toPortable(obj); - if (obj instanceof IgniteObject) - return (IgniteObjectImpl)obj; + if (obj instanceof BinaryObject) + return (BinaryObjectImpl)obj; } return toCacheKeyObject0(obj, userObj); @@ -769,16 +769,16 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor obj = toPortable(obj); - if (obj instanceof IgniteObject) - return (IgniteObjectImpl)obj; + if (obj instanceof BinaryObject) + return (BinaryObjectImpl)obj; return toCacheObject0(obj, userObj); } /** {@inheritDoc} */ @Override public CacheObject toCacheObject(CacheObjectContext ctx, byte type, byte[] bytes) { - if (type == IgniteObjectImpl.TYPE_PORTABLE) - return new IgniteObjectImpl(portableContext(), bytes, 0); + if (type == BinaryObjectImpl.TYPE_PORTABLE) + return new BinaryObjectImpl(portableContext(), bytes, 0); return super.toCacheObject(ctx, type, bytes); } @@ -791,19 +791,19 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor Object val = unmarshal(valPtr, !tmp); - if (val instanceof IgniteObjectOffheapImpl) - return (IgniteObjectOffheapImpl)val; + if (val instanceof BinaryObjectOffheapImpl) + return (BinaryObjectOffheapImpl)val; return new CacheObjectImpl(val, null); } /** {@inheritDoc} */ - @Override public Object unwrapTemporary(GridCacheContext ctx, Object obj) throws IgniteObjectException { + @Override public Object unwrapTemporary(GridCacheContext ctx, Object obj) throws BinaryObjectException { if (!((CacheObjectPortableContext)ctx.cacheObjectContext()).portableEnabled()) return obj; - if (obj instanceof IgniteObjectOffheapImpl) - return ((IgniteObjectOffheapImpl)obj).heapCopy(); + if (obj instanceof BinaryObjectOffheapImpl) + return ((BinaryObjectOffheapImpl)obj).heapCopy(); return obj; } @@ -829,20 +829,20 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor * @param newMeta New meta. * @param fields Fields map. * @return Whether meta is changed. - * @throws org.apache.ignite.igniteobject.IgniteObjectException In case of error. + * @throws org.apache.ignite.binary.BinaryObjectException In case of error. */ - private static boolean checkMeta(int typeId, @Nullable IgniteObjectMetadata oldMeta, - IgniteObjectMetadata newMeta, @Nullable Map<String, String> fields) throws IgniteObjectException { + private static boolean checkMeta(int typeId, @Nullable BinaryTypeMetadata oldMeta, + BinaryTypeMetadata newMeta, @Nullable Map<String, String> fields) throws BinaryObjectException { assert newMeta != null; - Map<String, String> oldFields = oldMeta != null ? ((IgniteObjectMetaDataImpl)oldMeta).fieldsMeta() : null; - Map<String, String> newFields = ((IgniteObjectMetaDataImpl)newMeta).fieldsMeta(); + Map<String, String> oldFields = oldMeta != null ? ((BinaryMetaDataImpl)oldMeta).fieldsMeta() : null; + Map<String, String> newFields = ((BinaryMetaDataImpl)newMeta).fieldsMeta(); boolean changed = false; if (oldMeta != null) { if (!oldMeta.typeName().equals(newMeta.typeName())) { - throw new IgniteObjectException( + throw new BinaryObjectException( "Two portable types have duplicate type ID [" + "typeId=" + typeId + ", typeName1=" + oldMeta.typeName() + @@ -852,7 +852,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor } if (!F.eq(oldMeta.affinityKeyFieldName(), newMeta.affinityKeyFieldName())) { - throw new IgniteObjectException( + throw new BinaryObjectException( "Portable type has different affinity key fields on different clients [" + "typeName=" + newMeta.typeName() + ", affKeyFieldName1=" + oldMeta.affinityKeyFieldName() + @@ -872,7 +872,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor if (typeName != null) { if (!typeName.equals(e.getValue())) { - throw new IgniteObjectException( + throw new BinaryObjectException( "Portable field has different types on different clients [" + "typeName=" + newMeta.typeName() + ", fieldName=" + e.getKey() + @@ -896,7 +896,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor /** */ private static class MetaDataProcessor implements - EntryProcessor<PortableMetaDataKey, IgniteObjectMetadata, IgniteObjectException>, Externalizable { + EntryProcessor<PortableMetaDataKey, BinaryTypeMetadata, BinaryObjectException>, Externalizable { /** */ private static final long serialVersionUID = 0L; @@ -904,7 +904,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor private int typeId; /** */ - private IgniteObjectMetadata newMeta; + private BinaryTypeMetadata newMeta; /** * For {@link Externalizable}. @@ -917,7 +917,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor * @param typeId Type ID. * @param newMeta New metadata. */ - private MetaDataProcessor(int typeId, IgniteObjectMetadata newMeta) { + private MetaDataProcessor(int typeId, BinaryTypeMetadata newMeta) { assert newMeta != null; this.typeId = typeId; @@ -925,16 +925,16 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor } /** {@inheritDoc} */ - @Override public IgniteObjectException process( - MutableEntry<PortableMetaDataKey, IgniteObjectMetadata> entry, + @Override public BinaryObjectException process( + MutableEntry<PortableMetaDataKey, BinaryTypeMetadata> entry, Object... args) { try { - IgniteObjectMetadata oldMeta = entry.getValue(); + BinaryTypeMetadata oldMeta = entry.getValue(); Map<String, String> fields = new HashMap<>(); if (checkMeta(typeId, oldMeta, newMeta, fields)) { - IgniteObjectMetadata res = new IgniteObjectMetaDataImpl(newMeta.typeName(), + BinaryTypeMetadata res = new BinaryMetaDataImpl(newMeta.typeName(), fields, newMeta.affinityKeyFieldName()); @@ -945,7 +945,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor else return null; } - catch (IgniteObjectException e) { + catch (BinaryObjectException e) { return e; } } @@ -959,7 +959,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor /** {@inheritDoc} */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { typeId = in.readInt(); - newMeta = (IgniteObjectMetadata)in.readObject(); + newMeta = (BinaryTypeMetadata)in.readObject(); } /** {@inheritDoc} */ @@ -971,17 +971,17 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor /** * */ - class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetaDataKey, IgniteObjectMetadata> { + class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetaDataKey, BinaryTypeMetadata> { /** {@inheritDoc} */ @Override public void onUpdated( - Iterable<CacheEntryEvent<? extends PortableMetaDataKey, ? extends IgniteObjectMetadata>> evts) + Iterable<CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryTypeMetadata>> evts) throws CacheEntryListenerException { - for (CacheEntryEvent<? extends PortableMetaDataKey, ? extends IgniteObjectMetadata> evt : evts) { + for (CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryTypeMetadata> evt : evts) { assert evt.getEventType() == EventType.CREATED || evt.getEventType() == EventType.UPDATED : evt; PortableMetaDataKey key = evt.getKey(); - final IgniteObjectMetadata newMeta = evt.getValue(); + final BinaryTypeMetadata newMeta = evt.getValue(); assert newMeta != null : evt; http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteObjectsImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteObjectsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteObjectsImpl.java index 014b487..225eabb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteObjectsImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteObjectsImpl.java @@ -21,10 +21,10 @@ import java.util.Collection; import org.apache.ignite.IgniteObjects; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor; -import org.apache.ignite.igniteobject.IgniteObjectBuilder; -import org.apache.ignite.igniteobject.IgniteObjectException; -import org.apache.ignite.igniteobject.IgniteObjectMetadata; -import org.apache.ignite.igniteobject.IgniteObject; +import org.apache.ignite.binary.BinaryObjectBuilder; +import org.apache.ignite.binary.BinaryObjectException; +import org.apache.ignite.binary.BinaryTypeMetadata; +import org.apache.ignite.binary.BinaryObject; import org.jetbrains.annotations.Nullable; /** @@ -59,7 +59,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Override public <T> T toPortable(@Nullable Object obj) throws IgniteObjectException { + @Override public <T> T toPortable(@Nullable Object obj) throws BinaryObjectException { guard(); try { @@ -71,7 +71,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Override public IgniteObjectBuilder builder(int typeId) { + @Override public BinaryObjectBuilder builder(int typeId) { guard(); try { @@ -83,7 +83,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Override public IgniteObjectBuilder builder(String typeName) { + @Override public BinaryObjectBuilder builder(String typeName) { guard(); try { @@ -95,7 +95,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Override public IgniteObjectBuilder builder(IgniteObject portableObj) { + @Override public BinaryObjectBuilder builder(BinaryObject portableObj) { guard(); try { @@ -107,7 +107,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Nullable @Override public IgniteObjectMetadata metadata(Class<?> cls) throws IgniteObjectException { + @Nullable @Override public BinaryTypeMetadata metadata(Class<?> cls) throws BinaryObjectException { guard(); try { @@ -119,7 +119,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Nullable @Override public IgniteObjectMetadata metadata(String typeName) throws IgniteObjectException { + @Nullable @Override public BinaryTypeMetadata metadata(String typeName) throws BinaryObjectException { guard(); try { @@ -131,7 +131,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Nullable @Override public IgniteObjectMetadata metadata(int typeId) throws IgniteObjectException { + @Nullable @Override public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException { guard(); try { @@ -143,7 +143,7 @@ public class IgniteObjectsImpl implements IgniteObjects { } /** {@inheritDoc} */ - @Override public Collection<IgniteObjectMetadata> metadata() throws IgniteObjectException { + @Override public Collection<BinaryTypeMetadata> metadata() throws BinaryObjectException { guard(); try { http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java index e0904ef..0d9b91f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java @@ -2829,7 +2829,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter null, opCtx != null && opCtx.skipStore(), false, - opCtx != null && opCtx.isKeepPortable()); + opCtx != null && opCtx.isKeepBinary()); if (pessimistic()) { // Loose all skipped. @@ -3057,7 +3057,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter drMap, opCtx != null && opCtx.skipStore(), singleRmv, - opCtx != null && opCtx.isKeepPortable() + opCtx != null && opCtx.isKeepBinary() ); if (log.isDebugEnabled()) @@ -3187,7 +3187,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter private boolean deserializePortables(GridCacheContext cacheCtx) { CacheOperationContext opCtx = cacheCtx.operationContextPerCall(); - return opCtx == null || !opCtx.isKeepPortable(); + return opCtx == null || !opCtx.isKeepBinary(); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java index 109f0ed..09cb29d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java @@ -20,8 +20,8 @@ package org.apache.ignite.internal.processors.platform; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; -import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; +import org.apache.ignite.internal.portable.BinaryRawReaderEx; +import org.apache.ignite.internal.portable.BinaryRawWriterEx; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; import org.apache.ignite.internal.processors.platform.memory.PlatformOutputStream; import org.apache.ignite.internal.processors.platform.utils.PlatformFutureUtils; @@ -62,7 +62,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public long inStreamOutLong(int type, long memPtr) throws Exception { try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { - IgniteObjectRawReaderEx reader = platformCtx.reader(mem); + BinaryRawReaderEx reader = platformCtx.reader(mem); if (type == OP_META) { platformCtx.processMetadata(reader); @@ -80,7 +80,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public Object inStreamOutObject(int type, long memPtr) throws Exception { try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { - IgniteObjectRawReaderEx reader = platformCtx.reader(mem); + BinaryRawReaderEx reader = platformCtx.reader(mem); return processInStreamOutObject(type, reader); } @@ -104,7 +104,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { PlatformOutputStream out = mem.output(); - IgniteObjectRawWriterEx writer = platformCtx.writer(out); + BinaryRawWriterEx writer = platformCtx.writer(out); processOutStream(type, writer); @@ -128,12 +128,12 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public void inStreamOutStream(int type, long inMemPtr, long outMemPtr) throws Exception { try (PlatformMemory inMem = platformCtx.memory().get(inMemPtr)) { - IgniteObjectRawReaderEx reader = platformCtx.reader(inMem); + BinaryRawReaderEx reader = platformCtx.reader(inMem); try (PlatformMemory outMem = platformCtx.memory().get(outMemPtr)) { PlatformOutputStream out = outMem.output(); - IgniteObjectRawWriterEx writer = platformCtx.writer(out); + BinaryRawWriterEx writer = platformCtx.writer(out); processInStreamOutStream(type, reader, writer); @@ -148,12 +148,12 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public void inObjectStreamOutStream(int type, Object arg, long inMemPtr, long outMemPtr) throws Exception { try (PlatformMemory inMem = platformCtx.memory().get(inMemPtr)) { - IgniteObjectRawReaderEx reader = platformCtx.reader(inMem); + BinaryRawReaderEx reader = platformCtx.reader(inMem); try (PlatformMemory outMem = platformCtx.memory().get(outMemPtr)) { PlatformOutputStream out = outMem.output(); - IgniteObjectRawWriterEx writer = platformCtx.writer(out); + BinaryRawWriterEx writer = platformCtx.writer(out); processInObjectStreamOutStream(type, arg, reader, writer); @@ -233,7 +233,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @return Result. * @throws IgniteCheckedException In case of exception. */ - protected long processInStreamOutLong(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { + protected long processInStreamOutLong(int type, BinaryRawReaderEx reader) throws IgniteCheckedException { return throwUnsupported(type); } @@ -245,7 +245,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @param writer Portable writer. * @throws IgniteCheckedException In case of exception. */ - protected void processInStreamOutStream(int type, IgniteObjectRawReaderEx reader, IgniteObjectRawWriterEx writer) + protected void processInStreamOutStream(int type, BinaryRawReaderEx reader, BinaryRawWriterEx writer) throws IgniteCheckedException { throwUnsupported(type); } @@ -258,7 +258,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @return Result. * @throws IgniteCheckedException In case of exception. */ - protected Object processInStreamOutObject(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { + protected Object processInStreamOutObject(int type, BinaryRawReaderEx reader) throws IgniteCheckedException { return throwUnsupported(type); } @@ -271,8 +271,8 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @param writer Portable writer. * @throws IgniteCheckedException In case of exception. */ - protected void processInObjectStreamOutStream(int type, @Nullable Object arg, IgniteObjectRawReaderEx reader, - IgniteObjectRawWriterEx writer) throws IgniteCheckedException { + protected void processInObjectStreamOutStream(int type, @Nullable Object arg, BinaryRawReaderEx reader, + BinaryRawWriterEx writer) throws IgniteCheckedException { throwUnsupported(type); } @@ -293,7 +293,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @param writer Portable writer. * @throws IgniteCheckedException In case of exception. */ - protected void processOutStream(int type, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { + protected void processOutStream(int type, BinaryRawWriterEx writer) throws IgniteCheckedException { throwUnsupported(type); } http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java index d4009a0..12eb36e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java @@ -21,8 +21,8 @@ import org.apache.ignite.cluster.ClusterMetrics; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.events.Event; import org.apache.ignite.internal.GridKernalContext; -import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; -import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; +import org.apache.ignite.internal.portable.BinaryRawReaderEx; +import org.apache.ignite.internal.portable.BinaryRawWriterEx; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilter; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryProcessor; import org.apache.ignite.internal.processors.platform.cache.query.PlatformContinuousQuery; @@ -71,7 +71,7 @@ public interface PlatformContext { * @param mem Memory. * @return Reader. */ - public IgniteObjectRawReaderEx reader(PlatformMemory mem); + public BinaryRawReaderEx reader(PlatformMemory mem); /** * Get memory reader. @@ -79,7 +79,7 @@ public interface PlatformContext { * @param in Input. * @return Reader. */ - public IgniteObjectRawReaderEx reader(PlatformInputStream in); + public BinaryRawReaderEx reader(PlatformInputStream in); /** * Get memory writer. @@ -87,7 +87,7 @@ public interface PlatformContext { * @param mem Memory. * @return Writer. */ - public IgniteObjectRawWriterEx writer(PlatformMemory mem); + public BinaryRawWriterEx writer(PlatformMemory mem); /** * Get memory writer. @@ -95,7 +95,7 @@ public interface PlatformContext { * @param out Output. * @return Writer. */ - public IgniteObjectRawWriterEx writer(PlatformOutputStream out); + public BinaryRawWriterEx writer(PlatformOutputStream out); /** * Sends node info to native platform, if necessary. @@ -110,7 +110,7 @@ public interface PlatformContext { * @param writer Writer. * @param node Node. */ - public void writeNode(IgniteObjectRawWriterEx writer, ClusterNode node); + public void writeNode(BinaryRawWriterEx writer, ClusterNode node); /** * Writes multiple node ids to a stream and sends node info to native platform, if necessary. @@ -118,14 +118,14 @@ public interface PlatformContext { * @param writer Writer. * @param nodes Nodes. */ - public void writeNodes(IgniteObjectRawWriterEx writer, Collection<ClusterNode> nodes); + public void writeNodes(BinaryRawWriterEx writer, Collection<ClusterNode> nodes); /** * Process metadata from the platform. * * @param reader Reader. */ - public void processMetadata(IgniteObjectRawReaderEx reader); + public void processMetadata(BinaryRawReaderEx reader); /** * Write metadata for the given type ID. @@ -133,14 +133,14 @@ public interface PlatformContext { * @param writer Writer. * @param typeId Type ID. */ - public void writeMetadata(IgniteObjectRawWriterEx writer, int typeId); + public void writeMetadata(BinaryRawWriterEx writer, int typeId); /** * Write all available metadata. * * @param writer Writer. */ - public void writeAllMetadata(IgniteObjectRawWriterEx writer); + public void writeAllMetadata(BinaryRawWriterEx writer); /** * Write cluster metrics. @@ -148,7 +148,7 @@ public interface PlatformContext { * @param writer Writer. * @param metrics Metrics. */ - public void writeClusterMetrics(IgniteObjectRawWriterEx writer, @Nullable ClusterMetrics metrics); + public void writeClusterMetrics(BinaryRawWriterEx writer, @Nullable ClusterMetrics metrics); /** * @@ -190,7 +190,7 @@ public interface PlatformContext { * @param writer Writer. * @param evt Event. */ - public void writeEvent(IgniteObjectRawWriterEx writer, Event evt); + public void writeEvent(BinaryRawWriterEx writer, Event evt); /** * Create local event filter. http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java index cc7d507..ed6be20 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java @@ -34,9 +34,9 @@ import org.apache.ignite.events.SwapSpaceEvent; import org.apache.ignite.events.TaskEvent; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.portable.GridPortableMarshaller; -import org.apache.ignite.internal.portable.IgniteObjectMetaDataImpl; -import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; -import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; +import org.apache.ignite.internal.portable.BinaryMetaDataImpl; +import org.apache.ignite.internal.portable.BinaryRawReaderEx; +import org.apache.ignite.internal.portable.BinaryRawWriterEx; import org.apache.ignite.internal.processors.cache.portable.CacheObjectPortableProcessorImpl; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilter; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilterImpl; @@ -70,7 +70,7 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.T4; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; -import org.apache.ignite.igniteobject.IgniteObjectMetadata; +import org.apache.ignite.binary.BinaryTypeMetadata; import org.jetbrains.annotations.Nullable; import java.sql.Timestamp; @@ -170,22 +170,22 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public IgniteObjectRawReaderEx reader(PlatformMemory mem) { + @Override public BinaryRawReaderEx reader(PlatformMemory mem) { return reader(mem.input()); } /** {@inheritDoc} */ - @Override public IgniteObjectRawReaderEx reader(PlatformInputStream in) { + @Override public BinaryRawReaderEx reader(PlatformInputStream in) { return marsh.reader(in); } /** {@inheritDoc} */ - @Override public IgniteObjectRawWriterEx writer(PlatformMemory mem) { + @Override public BinaryRawWriterEx writer(PlatformMemory mem) { return writer(mem.output()); } /** {@inheritDoc} */ - @Override public IgniteObjectRawWriterEx writer(PlatformOutputStream out) { + @Override public BinaryRawWriterEx writer(PlatformOutputStream out) { return marsh.writer(out); } @@ -198,7 +198,7 @@ public class PlatformContextImpl implements PlatformContext { try (PlatformMemory mem0 = mem.allocate()) { PlatformOutputStream out = mem0.output(); - IgniteObjectRawWriterEx w = writer(out); + BinaryRawWriterEx w = writer(out); w.writeUuid(node.id()); @@ -233,7 +233,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeNode(IgniteObjectRawWriterEx writer, ClusterNode node) { + @Override public void writeNode(BinaryRawWriterEx writer, ClusterNode node) { if (node == null) { writer.writeUuid(null); @@ -246,7 +246,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeNodes(IgniteObjectRawWriterEx writer, Collection<ClusterNode> nodes) { + @Override public void writeNodes(BinaryRawWriterEx writer, Collection<ClusterNode> nodes) { if (nodes == null) { writer.writeInt(-1); @@ -263,7 +263,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeClusterMetrics(IgniteObjectRawWriterEx writer, @Nullable ClusterMetrics metrics) { + @Override public void writeClusterMetrics(BinaryRawWriterEx writer, @Nullable ClusterMetrics metrics) { if (metrics == null) writer.writeBoolean(false); else { @@ -339,17 +339,17 @@ public class PlatformContextImpl implements PlatformContext { /** {@inheritDoc} */ @SuppressWarnings("ConstantConditions") - @Override public void processMetadata(IgniteObjectRawReaderEx reader) { + @Override public void processMetadata(BinaryRawReaderEx reader) { Collection<T4<Integer, String, String, Map<String, Integer>>> metas = PlatformUtils.readCollection(reader, new PlatformReaderClosure<T4<Integer, String, String, Map<String, Integer>>>() { - @Override public T4<Integer, String, String, Map<String, Integer>> read(IgniteObjectRawReaderEx reader) { + @Override public T4<Integer, String, String, Map<String, Integer>> read(BinaryRawReaderEx reader) { int typeId = reader.readInt(); String typeName = reader.readString(); String affKey = reader.readString(); Map<String, Integer> fields = PlatformUtils.readMap(reader, new PlatformReaderBiClosure<String, Integer>() { - @Override public IgniteBiTuple<String, Integer> read(IgniteObjectRawReaderEx reader) { + @Override public IgniteBiTuple<String, Integer> read(BinaryRawReaderEx reader) { return F.t(reader.readString(), reader.readInt()); } }); @@ -364,17 +364,17 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeMetadata(IgniteObjectRawWriterEx writer, int typeId) { + @Override public void writeMetadata(BinaryRawWriterEx writer, int typeId) { writeMetadata0(writer, typeId, cacheObjProc.metadata(typeId)); } /** {@inheritDoc} */ - @Override public void writeAllMetadata(IgniteObjectRawWriterEx writer) { - Collection<IgniteObjectMetadata> metas = cacheObjProc.metadata(); + @Override public void writeAllMetadata(BinaryRawWriterEx writer) { + Collection<BinaryTypeMetadata> metas = cacheObjProc.metadata(); writer.writeInt(metas.size()); - for (IgniteObjectMetadata m : metas) + for (BinaryTypeMetadata m : metas) writeMetadata0(writer, cacheObjProc.typeId(m.typeName()), m); } @@ -385,13 +385,13 @@ public class PlatformContextImpl implements PlatformContext { * @param typeId Type id. * @param meta Metadata. */ - private void writeMetadata0(IgniteObjectRawWriterEx writer, int typeId, IgniteObjectMetadata meta) { + private void writeMetadata0(BinaryRawWriterEx writer, int typeId, BinaryTypeMetadata meta) { if (meta == null) writer.writeBoolean(false); else { writer.writeBoolean(true); - Map<String, String> metaFields = ((IgniteObjectMetaDataImpl)meta).fields0(); + Map<String, String> metaFields = ((BinaryMetaDataImpl)meta).fields0(); Map<String, Integer> fields = U.newHashMap(metaFields.size()); @@ -427,7 +427,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeEvent(IgniteObjectRawWriterEx writer, Event evt) { + @Override public void writeEvent(BinaryRawWriterEx writer, Event evt) { assert writer != null; if (evt == null) @@ -565,7 +565,7 @@ public class PlatformContextImpl implements PlatformContext { * @param writer Writer. * @param evt Event. */ - private void writeCommonEventData(IgniteObjectRawWriterEx writer, EventAdapter evt) { + private void writeCommonEventData(BinaryRawWriterEx writer, EventAdapter evt) { PlatformUtils.writeIgniteUuid(writer, evt.id()); writer.writeLong(evt.localOrder()); writeNode(writer, evt.node()); http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java index 21b6baf..e8e7b9b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java @@ -17,7 +17,7 @@ package org.apache.ignite.internal.processors.platform; -import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; +import org.apache.ignite.internal.portable.BinaryRawWriterEx; /** * Denotes an exception which has some data to be written in a special manner. @@ -53,5 +53,5 @@ public abstract class PlatformExtendedException extends PlatformException { * * @param writer Writer. */ - public abstract void writeData(IgniteObjectRawWriterEx writer); + public abstract void writeData(BinaryRawWriterEx writer); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java index 9828753..664067c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java @@ -26,7 +26,7 @@ import org.apache.ignite.configuration.PlatformConfiguration; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.IgniteComputeImpl; import org.apache.ignite.internal.cluster.ClusterGroupAdapter; -import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; +import org.apache.ignite.internal.portable.BinaryRawWriterEx; import org.apache.ignite.internal.processors.GridProcessorAdapter; import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl; @@ -122,7 +122,7 @@ public class PlatformProcessorImpl extends GridProcessorAdapter implements Platf try (PlatformMemory mem = platformCtx.memory().allocate()) { PlatformOutputStream out = mem.output(); - IgniteObjectRawWriterEx writer = platformCtx.writer(out); + BinaryRawWriterEx writer = platformCtx.writer(out); writer.writeString(ctx.gridName());
