You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/11/03 10:46:01 UTC
[1/3] ignite git commit: IGNITE-950 - Fixed tests, renaming.
Repository: ignite
Updated Branches:
refs/heads/ignite-950-new d1c7baa26 -> 2a1daa206
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java
index 0ae7a09..1e3c499 100644
--- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java
+++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformComputePortableArgTask.java
@@ -25,7 +25,7 @@ import org.apache.ignite.compute.ComputeJobAdapter;
import org.apache.ignite.compute.ComputeJobResult;
import org.apache.ignite.compute.ComputeTaskAdapter;
import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.resources.IgniteInstanceResource;
import org.jetbrains.annotations.Nullable;
@@ -89,7 +89,7 @@ public class PlatformComputePortableArgTask extends ComputeTaskAdapter<Object, I
@Nullable @Override public Object execute() {
BinaryObject arg0 = ((BinaryObject)arg);
- BinaryTypeMetadata meta = ignite.portables().metadata(arg0.typeId());
+ BinaryType meta = ignite.binary().metadata(arg0.typeId());
if (meta == null)
throw new IgniteException("Metadata doesn't exist.");
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
index a4a05aa..b5922cc 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
@@ -35,7 +35,7 @@ import org.apache.ignite.IgniteEvents;
import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteMessaging;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.IgniteQueue;
import org.apache.ignite.IgniteScheduler;
import org.apache.ignite.IgniteServices;
@@ -271,7 +271,7 @@ public class IgniteMock implements Ignite {
}
/** {@inheritDoc} */
- @Override public IgniteObjects portables() {
+ @Override public IgniteBinary binary() {
return null;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java
index 6c3d91d..bf3577b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java
@@ -41,7 +41,7 @@ import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.IgniteIllegalStateException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteMessaging;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.IgniteQueue;
import org.apache.ignite.IgniteScheduler;
import org.apache.ignite.IgniteServices;
@@ -546,7 +546,7 @@ public class IgniteProcessProxy implements IgniteEx {
}
/** {@inheritDoc} */
- @Override public IgniteObjects portables() {
+ @Override public IgniteBinary binary() {
throw new UnsupportedOperationException("Operation isn't supported yet.");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
index 39d581f..c3251f8 100644
--- a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
+++ b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
@@ -347,10 +347,10 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
}
/** {@inheritDoc} */
- @Override public IgniteObjects portables() {
+ @Override public IgniteBinary binary() {
assert g != null;
- return g.portables();
+ return g.binary();
}
/** {@inheritDoc} */
[2/3] ignite git commit: IGNITE-950 - Fixed tests, renaming.
Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 6251ae5..685b998 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -270,9 +270,30 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
Map<KeyCacheObject, GridNearCacheEntry> savedEntries = null;
- // Assign keys to primary nodes.
- for (KeyCacheObject key : keys)
- savedEntries = map(key, mappings, topVer, mapped, savedEntries);
+ {
+ boolean success = false;
+
+ try {
+ // Assign keys to primary nodes.
+ for (KeyCacheObject key : keys)
+ savedEntries = map(key, mappings, topVer, mapped, savedEntries);
+
+ success = true;
+ }
+ finally {
+ // Exception has been thrown, must release reserved near entries.
+ if (!success) {
+ GridCacheVersion obsolete = cctx.versions().next(topVer);
+
+ for (GridNearCacheEntry reserved : savedEntries.values()) {
+ reserved.releaseEviction();
+
+ if (reserved.markObsolete(obsolete))
+ reserved.context().cache().removeEntry(reserved);
+ }
+ }
+ }
+ }
if (isDone())
return;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/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 dcaf14c..08bec85 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
@@ -20,15 +20,15 @@ package org.apache.ignite.internal.processors.cache.portable;
import java.util.Collection;
import java.util.Map;
import org.apache.ignite.IgniteException;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor;
import org.apache.ignite.binary.BinaryObjectBuilder;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.jetbrains.annotations.Nullable;
/**
- * Extended cache object processor interface with additional methods for portables.
+ * Extended cache object processor interface with additional methods for binary.
*/
public interface CacheObjectPortableProcessor extends IgniteCacheObjectProcessor {
/**
@@ -56,7 +56,7 @@ public interface CacheObjectPortableProcessor extends IgniteCacheObjectProcessor
* @param newMeta New meta data.
* @throws IgniteException In case of error.
*/
- public void addMeta(int typeId, final BinaryTypeMetadata newMeta) throws IgniteException;
+ public void addMeta(int typeId, final BinaryType newMeta) throws IgniteException;
/**
* @param typeId Type ID.
@@ -73,26 +73,26 @@ public interface CacheObjectPortableProcessor extends IgniteCacheObjectProcessor
* @return Meta data.
* @throws IgniteException In case of error.
*/
- @Nullable public BinaryTypeMetadata metadata(int typeId) throws IgniteException;
+ @Nullable public BinaryType metadata(int typeId) throws IgniteException;
/**
* @param typeIds Type ID.
* @return Meta data.
* @throws IgniteException In case of error.
*/
- public Map<Integer, BinaryTypeMetadata> metadata(Collection<Integer> typeIds) throws IgniteException;
+ public Map<Integer, BinaryType> metadata(Collection<Integer> typeIds) throws IgniteException;
/**
* @return Metadata for all types.
* @throws IgniteException In case of error.
*/
- public Collection<BinaryTypeMetadata> metadata() throws IgniteException;
+ public Collection<BinaryType> metadata() throws IgniteException;
/**
* @return Portables interface.
* @throws IgniteException If failed.
*/
- public IgniteObjects portables() throws IgniteException;
+ public IgniteBinary portables() throws IgniteException;
/**
* @param obj Original object.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/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 8e24847..229f7c6 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
@@ -39,7 +39,7 @@ import javax.cache.processor.EntryProcessor;
import javax.cache.processor.MutableEntry;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -83,7 +83,7 @@ import org.apache.ignite.marshaller.Marshaller;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectBuilder;
import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.jetbrains.annotations.Nullable;
import org.jsr166.ConcurrentHashMap8;
@@ -141,10 +141,10 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
private final boolean clientNode;
/** */
- private volatile IgniteCacheProxy<PortableMetaDataKey, BinaryTypeMetadata> metaDataCache;
+ private volatile IgniteCacheProxy<PortableMetaDataKey, BinaryType> metaDataCache;
/** */
- private final ConcurrentHashMap8<PortableMetaDataKey, BinaryTypeMetadata> clientMetaDataCache;
+ private final ConcurrentHashMap8<PortableMetaDataKey, BinaryType> clientMetaDataCache;
/** Predicate to filter portable meta data in utility cache. */
private final CacheEntryPredicate metaPred = new CacheEntryPredicateAdapter() {
@@ -166,10 +166,10 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
/** */
@GridToStringExclude
- private IgniteObjects portables;
+ private IgniteBinary portables;
/** Metadata updates collected before metadata cache is initialized. */
- private final Map<Integer, BinaryTypeMetadata> metaBuf = new ConcurrentHashMap<>();
+ private final Map<Integer, BinaryType> metaBuf = new ConcurrentHashMap<>();
/** */
private UUID metaCacheQryId;
@@ -268,17 +268,17 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
clientNode = this.ctx.clientNode();
- clientMetaDataCache = clientNode ? new ConcurrentHashMap8<PortableMetaDataKey, BinaryTypeMetadata>() : null;
+ clientMetaDataCache = clientNode ? new ConcurrentHashMap8<PortableMetaDataKey, BinaryType>() : null;
}
/** {@inheritDoc} */
@Override public void start() throws IgniteCheckedException {
if (marsh instanceof PortableMarshaller) {
PortableMetaDataHandler metaHnd = new PortableMetaDataHandler() {
- @Override public void addMeta(int typeId, BinaryTypeMetadata newMeta)
+ @Override public void addMeta(int typeId, BinaryType newMeta)
throws BinaryObjectException {
if (metaDataCache == null) {
- BinaryTypeMetadata oldMeta = metaBuf.get(typeId);
+ BinaryType oldMeta = metaBuf.get(typeId);
if (oldMeta == null || checkMeta(typeId, oldMeta, newMeta, null)) {
synchronized (this) {
@@ -307,7 +307,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
CacheObjectPortableProcessorImpl.this.addMeta(typeId, newMeta);
}
- @Override public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException {
+ @Override public BinaryType metadata(int typeId) throws BinaryObjectException {
if (metaDataCache == null)
U.awaitQuiet(startLatch);
@@ -323,7 +323,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
portableMarsh = new GridPortableMarshaller(portableCtx);
- portables = new IgniteObjectsImpl(ctx, this);
+ portables = new IgniteBinaryImpl(ctx, this);
}
}
@@ -350,7 +350,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
GridCacheQueryManager qryMgr = metaDataCache.context().queries();
- CacheQuery<Map.Entry<PortableMetaDataKey, BinaryTypeMetadata>> qry =
+ CacheQuery<Map.Entry<PortableMetaDataKey, BinaryType>> 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, BinaryTypeMetadata>> fut = qry.execute();
+ CacheQueryFuture<Map.Entry<PortableMetaDataKey, BinaryType>> fut = qry.execute();
- Map.Entry<PortableMetaDataKey, BinaryTypeMetadata> next;
+ Map.Entry<PortableMetaDataKey, BinaryType> 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, BinaryTypeMetadata> e : metaBuf.entrySet())
+ for (Map.Entry<Integer, BinaryType> e : metaBuf.entrySet())
addMeta(e.getKey(), e.getValue());
metaBuf.clear();
@@ -400,11 +400,11 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
* @param key Metadata key.
* @param newMeta Metadata.
*/
- private void addClientCacheMetaData(PortableMetaDataKey key, final BinaryTypeMetadata newMeta) {
+ private void addClientCacheMetaData(PortableMetaDataKey key, final BinaryType newMeta) {
clientMetaDataCache.compute(key,
- new ConcurrentHashMap8.BiFun<PortableMetaDataKey, BinaryTypeMetadata, BinaryTypeMetadata>() {
- @Override public BinaryTypeMetadata apply(PortableMetaDataKey key, BinaryTypeMetadata oldMeta) {
- BinaryTypeMetadata res;
+ new ConcurrentHashMap8.BiFun<PortableMetaDataKey, BinaryType, BinaryType>() {
+ @Override public BinaryType apply(PortableMetaDataKey key, BinaryType oldMeta) {
+ BinaryType res;
try {
res = checkMeta(key.typeId(), oldMeta, newMeta, null) ? newMeta : oldMeta;
@@ -561,13 +561,13 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
}
/** {@inheritDoc} */
- @Override public void addMeta(final int typeId, final BinaryTypeMetadata newMeta) throws BinaryObjectException {
+ @Override public void addMeta(final int typeId, final BinaryType newMeta) throws BinaryObjectException {
assert newMeta != null;
final PortableMetaDataKey key = new PortableMetaDataKey(typeId);
try {
- BinaryTypeMetadata oldMeta = metaDataCache.localPeek(key);
+ BinaryType oldMeta = metaDataCache.localPeek(key);
if (oldMeta == null || checkMeta(typeId, oldMeta, newMeta, null)) {
BinaryObjectException err = metaDataCache.invoke(key, new MetaDataProcessor(typeId, newMeta));
@@ -582,7 +582,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
}
/** {@inheritDoc} */
- @Nullable @Override public BinaryTypeMetadata metadata(final int typeId) throws BinaryObjectException {
+ @Nullable @Override public BinaryType metadata(final int typeId) throws BinaryObjectException {
try {
if (clientNode)
return clientMetaDataCache.get(new PortableMetaDataKey(typeId));
@@ -595,7 +595,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
}
/** {@inheritDoc} */
- @Override public Map<Integer, BinaryTypeMetadata> metadata(Collection<Integer> typeIds)
+ @Override public Map<Integer, BinaryType> metadata(Collection<Integer> typeIds)
throws BinaryObjectException {
try {
Collection<PortableMetaDataKey> keys = new ArrayList<>(typeIds.size());
@@ -603,11 +603,11 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
for (Integer typeId : typeIds)
keys.add(new PortableMetaDataKey(typeId));
- Map<PortableMetaDataKey, BinaryTypeMetadata> meta = metaDataCache.getAll(keys);
+ Map<PortableMetaDataKey, BinaryType> meta = metaDataCache.getAll(keys);
- Map<Integer, BinaryTypeMetadata> res = U.newHashMap(meta.size());
+ Map<Integer, BinaryType> res = U.newHashMap(meta.size());
- for (Map.Entry<PortableMetaDataKey, BinaryTypeMetadata> e : meta.entrySet())
+ for (Map.Entry<PortableMetaDataKey, BinaryType> e : meta.entrySet())
res.put(e.getKey().typeId(), e.getValue());
return res;
@@ -619,23 +619,23 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
- @Override public Collection<BinaryTypeMetadata> metadata() throws BinaryObjectException {
+ @Override public Collection<BinaryType> metadata() throws BinaryObjectException {
if (clientNode)
return new ArrayList<>(clientMetaDataCache.values());
return F.viewReadOnly(metaDataCache.entrySetx(metaPred),
- new C1<Cache.Entry<PortableMetaDataKey, BinaryTypeMetadata>, BinaryTypeMetadata>() {
+ new C1<Cache.Entry<PortableMetaDataKey, BinaryType>, BinaryType>() {
private static final long serialVersionUID = 0L;
- @Override public BinaryTypeMetadata apply(
- Cache.Entry<PortableMetaDataKey, BinaryTypeMetadata> e) {
+ @Override public BinaryType apply(
+ Cache.Entry<PortableMetaDataKey, BinaryType> e) {
return e.getValue();
}
});
}
/** {@inheritDoc} */
- @Override public IgniteObjects portables() throws IgniteException {
+ @Override public IgniteBinary portables() throws IgniteException {
return portables;
}
@@ -655,7 +655,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
*/
public Object affinityKey(BinaryObject po) {
try {
- BinaryTypeMetadata meta = po.metaData();
+ BinaryType meta = po.metaData();
if (meta != null) {
String affKeyFieldName = meta.affinityKeyFieldName();
@@ -831,8 +831,8 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
* @return Whether meta is changed.
* @throws org.apache.ignite.binary.BinaryObjectException In case of error.
*/
- private static boolean checkMeta(int typeId, @Nullable BinaryTypeMetadata oldMeta,
- BinaryTypeMetadata newMeta, @Nullable Map<String, String> fields) throws BinaryObjectException {
+ private static boolean checkMeta(int typeId, @Nullable BinaryType oldMeta,
+ BinaryType newMeta, @Nullable Map<String, String> fields) throws BinaryObjectException {
assert newMeta != null;
Map<String, String> oldFields = oldMeta != null ? ((BinaryMetaDataImpl)oldMeta).fieldsMeta() : null;
@@ -896,7 +896,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
/**
*/
private static class MetaDataProcessor implements
- EntryProcessor<PortableMetaDataKey, BinaryTypeMetadata, BinaryObjectException>, Externalizable {
+ EntryProcessor<PortableMetaDataKey, BinaryType, BinaryObjectException>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
@@ -904,7 +904,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
private int typeId;
/** */
- private BinaryTypeMetadata newMeta;
+ private BinaryType 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, BinaryTypeMetadata newMeta) {
+ private MetaDataProcessor(int typeId, BinaryType newMeta) {
assert newMeta != null;
this.typeId = typeId;
@@ -926,15 +926,15 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
/** {@inheritDoc} */
@Override public BinaryObjectException process(
- MutableEntry<PortableMetaDataKey, BinaryTypeMetadata> entry,
+ MutableEntry<PortableMetaDataKey, BinaryType> entry,
Object... args) {
try {
- BinaryTypeMetadata oldMeta = entry.getValue();
+ BinaryType oldMeta = entry.getValue();
Map<String, String> fields = new HashMap<>();
if (checkMeta(typeId, oldMeta, newMeta, fields)) {
- BinaryTypeMetadata res = new BinaryMetaDataImpl(newMeta.typeName(),
+ BinaryType res = new BinaryMetaDataImpl(newMeta.typeName(),
fields,
newMeta.affinityKeyFieldName());
@@ -959,7 +959,7 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
typeId = in.readInt();
- newMeta = (BinaryTypeMetadata)in.readObject();
+ newMeta = (BinaryType)in.readObject();
}
/** {@inheritDoc} */
@@ -971,17 +971,17 @@ public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessor
/**
*
*/
- class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetaDataKey, BinaryTypeMetadata> {
+ class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetaDataKey, BinaryType> {
/** {@inheritDoc} */
@Override public void onUpdated(
- Iterable<CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryTypeMetadata>> evts)
+ Iterable<CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryType>> evts)
throws CacheEntryListenerException {
- for (CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryTypeMetadata> evt : evts) {
+ for (CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryType> evt : evts) {
assert evt.getEventType() == EventType.CREATED || evt.getEventType() == EventType.UPDATED : evt;
PortableMetaDataKey key = evt.getKey();
- final BinaryTypeMetadata newMeta = evt.getValue();
+ final BinaryType newMeta = evt.getValue();
assert newMeta != null : evt;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
new file mode 100644
index 0000000..5ef24d8
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.portable;
+
+import java.util.Collection;
+import org.apache.ignite.IgniteBinary;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor;
+import org.apache.ignite.binary.BinaryObjectBuilder;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.BinaryType;
+import org.apache.ignite.binary.BinaryObject;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * {@link org.apache.ignite.IgniteBinary} implementation.
+ */
+public class IgniteBinaryImpl implements IgniteBinary {
+ /** */
+ private GridKernalContext ctx;
+
+ /** */
+ private CacheObjectPortableProcessor proc;
+
+ /**
+ * @param ctx Context.
+ */
+ public IgniteBinaryImpl(GridKernalContext ctx, CacheObjectPortableProcessor proc) {
+ this.ctx = ctx;
+
+ this.proc = proc;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int typeId(String typeName) {
+ guard();
+
+ try {
+ return proc.typeId(typeName);
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public <T> T toBinary(@Nullable Object obj) throws BinaryObjectException {
+ guard();
+
+ try {
+ return (T)proc.marshalToPortable(obj);
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public BinaryObjectBuilder builder(int typeId) {
+ guard();
+
+ try {
+ return proc.builder(typeId);
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public BinaryObjectBuilder builder(String typeName) {
+ guard();
+
+ try {
+ return proc.builder(typeName);
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public BinaryObjectBuilder builder(BinaryObject portableObj) {
+ guard();
+
+ try {
+ return proc.builder(portableObj);
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override public BinaryType metadata(Class<?> cls) throws BinaryObjectException {
+ guard();
+
+ try {
+ return proc.metadata(proc.typeId(cls.getName()));
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override public BinaryType metadata(String typeName) throws BinaryObjectException {
+ guard();
+
+ try {
+ return proc.metadata(proc.typeId(typeName));
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override public BinaryType metadata(int typeId) throws BinaryObjectException {
+ guard();
+
+ try {
+ return proc.metadata(typeId);
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public Collection<BinaryType> metadata() throws BinaryObjectException {
+ guard();
+
+ try {
+ return proc.metadata();
+ }
+ finally {
+ unguard();
+ }
+ }
+
+ /**
+ * @return Portable processor.
+ */
+ public IgniteCacheObjectProcessor processor() {
+ return proc;
+ }
+
+ /**
+ * <tt>ctx.gateway().readLock()</tt>
+ */
+ private void guard() {
+ ctx.gateway().readLock();
+ }
+
+ /**
+ * <tt>ctx.gateway().readUnlock()</tt>
+ */
+ private void unguard() {
+ ctx.gateway().readUnlock();
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/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
deleted file mode 100644
index 225eabb..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteObjectsImpl.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.portable;
-
-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.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;
-
-/**
- * {@link org.apache.ignite.IgniteObjects} implementation.
- */
-public class IgniteObjectsImpl implements IgniteObjects {
- /** */
- private GridKernalContext ctx;
-
- /** */
- private CacheObjectPortableProcessor proc;
-
- /**
- * @param ctx Context.
- */
- public IgniteObjectsImpl(GridKernalContext ctx, CacheObjectPortableProcessor proc) {
- this.ctx = ctx;
-
- this.proc = proc;
- }
-
- /** {@inheritDoc} */
- @Override public int typeId(String typeName) {
- guard();
-
- try {
- return proc.typeId(typeName);
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Override public <T> T toPortable(@Nullable Object obj) throws BinaryObjectException {
- guard();
-
- try {
- return (T)proc.marshalToPortable(obj);
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Override public BinaryObjectBuilder builder(int typeId) {
- guard();
-
- try {
- return proc.builder(typeId);
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Override public BinaryObjectBuilder builder(String typeName) {
- guard();
-
- try {
- return proc.builder(typeName);
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Override public BinaryObjectBuilder builder(BinaryObject portableObj) {
- guard();
-
- try {
- return proc.builder(portableObj);
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Nullable @Override public BinaryTypeMetadata metadata(Class<?> cls) throws BinaryObjectException {
- guard();
-
- try {
- return proc.metadata(proc.typeId(cls.getName()));
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Nullable @Override public BinaryTypeMetadata metadata(String typeName) throws BinaryObjectException {
- guard();
-
- try {
- return proc.metadata(proc.typeId(typeName));
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Nullable @Override public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException {
- guard();
-
- try {
- return proc.metadata(typeId);
- }
- finally {
- unguard();
- }
- }
-
- /** {@inheritDoc} */
- @Override public Collection<BinaryTypeMetadata> metadata() throws BinaryObjectException {
- guard();
-
- try {
- return proc.metadata();
- }
- finally {
- unguard();
- }
- }
-
- /**
- * @return Portable processor.
- */
- public IgniteCacheObjectProcessor processor() {
- return proc;
- }
-
- /**
- * <tt>ctx.gateway().readLock()</tt>
- */
- private void guard() {
- ctx.gateway().readLock();
- }
-
- /**
- * <tt>ctx.gateway().readUnlock()</tt>
- */
- private void unguard() {
- ctx.gateway().readUnlock();
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
index c7feda4..fa2d6b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
@@ -165,7 +165,7 @@ public class GridCacheQueryRequest extends GridCacheMessage implements GridCache
* @param incBackups {@code true} if need to include backups.
* @param fields Fields query flag.
* @param all Whether to load all pages.
- * @param keepPortable Whether to keep portables.
+ * @param keepPortable Whether to keep binary.
* @param subjId Subject ID.
* @param taskHash Task name hash code.
* @param topVer Topology version.
@@ -452,7 +452,7 @@ public class GridCacheQueryRequest extends GridCacheMessage implements GridCache
}
/**
- * @return Whether to keep portables.
+ * @return Whether to keep binary.
*/
public boolean keepPortable() {
return keepPortable;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
index b12ccf9..f48ff38 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
@@ -758,7 +758,7 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
assert e != null;
if (e.getMessage() != null) {
- throw new IgniteCheckedException("Cache store must work with portable objects if portables are " +
+ throw new IgniteCheckedException("Cache store must work with portable objects if binary are " +
"enabled for cache [cacheName=" + cctx.namex() + ']', e);
}
else
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/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 a0648ca..214ba45 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
@@ -3185,7 +3185,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
* Checks if portable values should be deserialized.
*
* @param cacheCtx Cache context.
- * @return {@code True} if portables should be deserialized, {@code false} otherwise.
+ * @return {@code True} if binary should be deserialized, {@code false} otherwise.
*/
private boolean deserializePortables(GridCacheContext cacheCtx) {
CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/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 ed6be20..4a1b41a 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
@@ -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.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.jetbrains.annotations.Nullable;
import java.sql.Timestamp;
@@ -370,11 +370,11 @@ public class PlatformContextImpl implements PlatformContext {
/** {@inheritDoc} */
@Override public void writeAllMetadata(BinaryRawWriterEx writer) {
- Collection<BinaryTypeMetadata> metas = cacheObjProc.metadata();
+ Collection<BinaryType> metas = cacheObjProc.metadata();
writer.writeInt(metas.size());
- for (BinaryTypeMetadata m : metas)
+ for (BinaryType m : metas)
writeMetadata0(writer, cacheObjProc.typeId(m.typeName()), m);
}
@@ -385,7 +385,7 @@ public class PlatformContextImpl implements PlatformContext {
* @param typeId Type id.
* @param meta Metadata.
*/
- private void writeMetadata0(BinaryRawWriterEx writer, int typeId, BinaryTypeMetadata meta) {
+ private void writeMetadata0(BinaryRawWriterEx writer, int typeId, BinaryType meta) {
if (meta == null)
writer.writeBoolean(false);
else {
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformCompute.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformCompute.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformCompute.java
index 11d4c74..05db49d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformCompute.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformCompute.java
@@ -295,7 +295,7 @@ public class PlatformCompute extends PlatformAbstractTarget {
* @return Result.
*/
private Object toPortable(Object src) {
- return platformCtx.kernalContext().grid().portables().toPortable(src);
+ return platformCtx.kernalContext().grid().binary().toBinary(src);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
index c49c337..60c0693 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConfigurationClosure.java
@@ -40,7 +40,7 @@ import org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.platform.dotnet.PlatformDotNetLifecycleBean;
import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import java.util.ArrayList;
import java.util.Collections;
@@ -229,12 +229,12 @@ public class PlatformDotNetConfigurationClosure extends PlatformAbstractConfigur
private static GridPortableMarshaller marshaller() {
try {
PortableContext ctx = new PortableContext(new PortableMetaDataHandler() {
- @Override public void addMeta(int typeId, BinaryTypeMetadata meta)
+ @Override public void addMeta(int typeId, BinaryType meta)
throws BinaryObjectException {
// No-op.
}
- @Override public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException {
+ @Override public BinaryType metadata(int typeId) throws BinaryObjectException {
return null;
}
}, new IgniteConfiguration());
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
index 6b53143..3ac16f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
@@ -35,7 +35,7 @@ public class GridClientTaskRequest extends GridClientAbstractMessage {
/** Task parameter. */
private Object arg;
- /** Keep portables flag. */
+ /** Keep binary flag. */
private boolean keepPortables;
/**
@@ -67,14 +67,14 @@ public class GridClientTaskRequest extends GridClientAbstractMessage {
}
/**
- * @return Keep portables flag.
+ * @return Keep binary flag.
*/
public boolean keepPortables() {
return keepPortables;
}
/**
- * @param keepPortables Keep portables flag.
+ * @param keepPortables Keep binary flag.
*/
public void keepPortables(boolean keepPortables) {
this.keepPortables = keepPortables;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderAdditionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderAdditionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderAdditionalSelfTest.java
index 54e61f3..e3adfc1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderAdditionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderAdditionalSelfTest.java
@@ -36,18 +36,18 @@ import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.portable.builder.PortableBuilderEnum;
import org.apache.ignite.internal.portable.builder.BinaryObjectBuilderImpl;
import org.apache.ignite.internal.portable.mutabletest.GridBinaryMarshalerAwareTestClass;
import org.apache.ignite.internal.processors.cache.portable.CacheObjectPortableProcessorImpl;
-import org.apache.ignite.internal.processors.cache.portable.IgniteObjectsImpl;
+import org.apache.ignite.internal.processors.cache.portable.IgniteBinaryImpl;
import org.apache.ignite.internal.util.lang.GridMapEntry;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectBuilder;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -114,8 +114,8 @@ public class GridBinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstrac
/**
* @return Portables API.
*/
- protected IgniteObjects portables() {
- return grid(0).portables();
+ protected IgniteBinary portables() {
+ return grid(0).binary();
}
/**
@@ -965,7 +965,7 @@ public class GridBinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstrac
mutableObj.build();
- BinaryTypeMetadata metadata = portables().metadata(TestObjectContainer.class);
+ BinaryType metadata = portables().metadata(TestObjectContainer.class);
assertEquals("String", metadata.fieldTypeName("xx567"));
}
@@ -981,7 +981,7 @@ public class GridBinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstrac
mutableObj.build();
- BinaryTypeMetadata metadata = portables().metadata(TestObjectContainer.class);
+ BinaryType metadata = portables().metadata(TestObjectContainer.class);
assertEquals("String", metadata.fieldTypeName("xx567"));
}
@@ -1005,7 +1005,7 @@ public class GridBinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstrac
mutableObj.build();
- BinaryTypeMetadata metadata = portables().metadata(c.getClass());
+ BinaryType metadata = portables().metadata(c.getClass());
assertTrue(metadata.fields().containsAll(Arrays.asList("intField", "intArrField", "arrField", "strField",
"colField", "mapField", "enumField", "enumArrField")));
@@ -1264,7 +1264,7 @@ public class GridBinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstrac
* @return Object in portable format.
*/
private BinaryObject toPortable(Object obj) {
- return portables().toPortable(obj);
+ return portables().toBinary(obj);
}
/**
@@ -1281,7 +1281,7 @@ public class GridBinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstrac
*/
private BinaryObjectBuilderImpl newWrapper(Class<?> aCls) {
CacheObjectPortableProcessorImpl processor = (CacheObjectPortableProcessorImpl)(
- (IgniteObjectsImpl)portables()).processor();
+ (IgniteBinaryImpl)portables()).processor();
return new BinaryObjectBuilderImpl(processor.portableContext(), processor.typeId(aCls.getName()),
aCls.getSimpleName());
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
index 8f025e4..1c19639 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
@@ -28,7 +28,7 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.portable.builder.BinaryObjectBuilderImpl;
import org.apache.ignite.internal.portable.mutabletest.GridPortableTestClasses.TestObjectAllTypes;
@@ -42,7 +42,7 @@ import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectBuilder;
import org.apache.ignite.binary.BinaryTypeIdMapper;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryTypeConfiguration;
import org.apache.ignite.testframework.GridTestUtils;
@@ -775,7 +775,7 @@ public class GridBinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
BinaryObject po = builder.build();
- BinaryTypeMetadata meta = po.metaData();
+ BinaryType meta = po.metaData();
assertEquals("MetaTest2", meta.typeName());
assertEquals("Object", meta.fieldTypeName("objectField"));
@@ -794,7 +794,7 @@ public class GridBinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
BinaryObject po = builder.build();
- BinaryTypeMetadata meta = po.metaData();
+ BinaryType meta = po.metaData();
assertEquals("MetaTest", meta.typeName());
@@ -965,8 +965,8 @@ public class GridBinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
/**
* @return Portables.
*/
- private IgniteObjects portables() {
- return grid(0).portables();
+ private IgniteBinary portables() {
+ return grid(0).binary();
}
/**
@@ -974,7 +974,7 @@ public class GridBinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
* @return Portable object.
*/
private BinaryObject toPortable(Object obj) {
- return portables().toPortable(obj);
+ return portables().toBinary(obj);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerCtxDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerCtxDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerCtxDisabledSelfTest.java
index 3fd62c1..ee91167 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerCtxDisabledSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerCtxDisabledSelfTest.java
@@ -29,7 +29,7 @@ import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryReader;
import org.apache.ignite.binary.BinaryWriter;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -40,11 +40,11 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
public class GridPortableMarshallerCtxDisabledSelfTest extends GridCommonAbstractTest {
/** */
protected static final PortableMetaDataHandler META_HND = new PortableMetaDataHandler() {
- @Override public void addMeta(int typeId, BinaryTypeMetadata meta) {
+ @Override public void addMeta(int typeId, BinaryType meta) {
// No-op.
}
- @Override public BinaryTypeMetadata metadata(int typeId) {
+ @Override public BinaryType metadata(int typeId) {
return null;
}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
index 001032e..7576103 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
@@ -47,7 +47,7 @@ import org.apache.ignite.binary.BinaryTypeConfiguration;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.binary.BinaryTypeIdMapper;
import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryRawReader;
import org.apache.ignite.binary.BinaryRawWriter;
import org.apache.ignite.binary.BinaryReader;
@@ -83,11 +83,11 @@ public class GridPortableMarshallerSelfTest extends GridCommonAbstractTest {
/** */
protected static final PortableMetaDataHandler META_HND = new PortableMetaDataHandler() {
- @Override public void addMeta(int typeId, BinaryTypeMetadata meta) {
+ @Override public void addMeta(int typeId, BinaryType meta) {
// No-op.
}
- @Override public BinaryTypeMetadata metadata(int typeId) {
+ @Override public BinaryType metadata(int typeId) {
return null;
}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java
index ed7190e..fbdb562 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java
@@ -17,7 +17,7 @@
package org.apache.ignite.internal.portable;
import java.util.Arrays;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectBuilder;
@@ -47,8 +47,8 @@ public class GridPortableMetaDataDisabledSelfTest extends GridCommonAbstractTest
/**
* @return Portables.
*/
- private IgniteObjects portables() {
- return grid().portables();
+ private IgniteBinary portables() {
+ return grid().binary();
}
/**
@@ -67,9 +67,9 @@ public class GridPortableMetaDataDisabledSelfTest extends GridCommonAbstractTest
try {
startGrid();
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
- portables().toPortable(new TestObject3());
+ portables().toBinary(new TestObject1());
+ portables().toBinary(new TestObject2());
+ portables().toBinary(new TestObject3());
assertEquals(0, portables().metadata(TestObject1.class).fields().size());
assertEquals(0, portables().metadata(TestObject2.class).fields().size());
@@ -106,8 +106,8 @@ public class GridPortableMetaDataDisabledSelfTest extends GridCommonAbstractTest
try {
startGrid();
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject1());
+ portables().toBinary(new TestObject2());
assertEquals(0, portables().metadata(TestObject1.class).fields().size());
assertEquals(1, portables().metadata(TestObject2.class).fields().size());
@@ -137,8 +137,8 @@ public class GridPortableMetaDataDisabledSelfTest extends GridCommonAbstractTest
try {
startGrid();
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject1());
+ portables().toBinary(new TestObject2());
assertEquals(1, portables().metadata(TestObject1.class).fields().size());
assertEquals(0, portables().metadata(TestObject2.class).fields().size());
@@ -166,8 +166,8 @@ public class GridPortableMetaDataDisabledSelfTest extends GridCommonAbstractTest
try {
startGrid();
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject1());
+ portables().toBinary(new TestObject2());
assertEquals(0, portables().metadata(TestObject1.class).fields().size());
assertEquals(1, portables().metadata(TestObject2.class).fields().size());
@@ -195,8 +195,8 @@ public class GridPortableMetaDataDisabledSelfTest extends GridCommonAbstractTest
try {
startGrid();
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject1());
+ portables().toBinary(new TestObject2());
assertEquals(1, portables().metadata(TestObject1.class).fields().size());
assertEquals(0, portables().metadata(TestObject2.class).fields().size());
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataSelfTest.java
index 5b54fb0..98cb9cd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataSelfTest.java
@@ -22,13 +22,13 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryRawWriter;
import org.apache.ignite.binary.BinaryReader;
@@ -74,21 +74,21 @@ public class GridPortableMetaDataSelfTest extends GridCommonAbstractTest {
/**
* @return Portables API.
*/
- protected IgniteObjects portables() {
- return grid().portables();
+ protected IgniteBinary portables() {
+ return grid().binary();
}
/**
* @throws Exception If failed.
*/
public void testGetAll() throws Exception {
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject2());
- Collection<BinaryTypeMetadata> metas = portables().metadata();
+ Collection<BinaryType> metas = portables().metadata();
assertEquals(2, metas.size());
- for (BinaryTypeMetadata meta : metas) {
+ for (BinaryType meta : metas) {
Collection<String> fields;
switch (meta.typeName()) {
@@ -150,7 +150,7 @@ public class GridPortableMetaDataSelfTest extends GridCommonAbstractTest {
public void testNoConfiguration() throws Exception {
fail("https://issues.apache.org/jira/browse/IGNITE-1377");
- portables().toPortable(new TestObject3());
+ portables().toBinary(new TestObject3());
assertNotNull(portables().metadata(TestObject3.class));
}
@@ -159,7 +159,7 @@ public class GridPortableMetaDataSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testReflection() throws Exception {
- BinaryTypeMetadata meta = portables().metadata(TestObject1.class);
+ BinaryType meta = portables().metadata(TestObject1.class);
assertNotNull(meta);
@@ -190,9 +190,9 @@ public class GridPortableMetaDataSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testPortableMarshalAware() throws Exception {
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject2());
- BinaryTypeMetadata meta = portables().metadata(TestObject2.class);
+ BinaryType meta = portables().metadata(TestObject2.class);
assertNotNull(meta);
@@ -223,13 +223,13 @@ public class GridPortableMetaDataSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testMerge() throws Exception {
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject2());
idx = 1;
- portables().toPortable(new TestObject2());
+ portables().toBinary(new TestObject2());
- BinaryTypeMetadata meta = portables().metadata(TestObject2.class);
+ BinaryType meta = portables().metadata(TestObject2.class);
assertNotNull(meta);
@@ -274,11 +274,11 @@ public class GridPortableMetaDataSelfTest extends GridCommonAbstractTest {
obj.decVal = BigDecimal.ZERO;
obj.decArrVal = new BigDecimal[] { BigDecimal.ONE };
- BinaryObject po = portables().toPortable(obj);
+ BinaryObject po = portables().toBinary(obj);
info(po.toString());
- BinaryTypeMetadata meta = po.metaData();
+ BinaryType meta = po.metaData();
assertNotNull(meta);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableWildcardsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableWildcardsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableWildcardsSelfTest.java
index fe34fdc..22125af 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableWildcardsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableWildcardsSelfTest.java
@@ -24,7 +24,7 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.marshaller.MarshallerContextTestImpl;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryTypeIdMapper;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryTypeConfiguration;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -34,11 +34,11 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
public class GridPortableWildcardsSelfTest extends GridCommonAbstractTest {
/** */
private static final PortableMetaDataHandler META_HND = new PortableMetaDataHandler() {
- @Override public void addMeta(int typeId, BinaryTypeMetadata meta) {
+ @Override public void addMeta(int typeId, BinaryType meta) {
// No-op.
}
- @Override public BinaryTypeMetadata metadata(int typeId) {
+ @Override public BinaryType metadata(int typeId) {
return null;
}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheBinaryObjectsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheBinaryObjectsAbstractSelfTest.java
index c25840b..0892750 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheBinaryObjectsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheBinaryObjectsAbstractSelfTest.java
@@ -29,7 +29,7 @@ import javax.cache.processor.EntryProcessor;
import javax.cache.processor.MutableEntry;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CachePeekMode;
@@ -836,7 +836,7 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
Ignite ignite = e.unwrap(Ignite.class);
- IgniteObjects portables = ignite.portables();
+ IgniteBinary portables = ignite.binary();
BinaryObjectBuilder builder = portables.builder(val);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
index eddf066..a33eb7b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java
@@ -27,7 +27,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteInternalFuture;
@@ -35,7 +35,7 @@ import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectBuilder;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -99,7 +99,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
// Update portable metadata concurrently with client nodes start.
fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
- IgniteObjects portables = ignite(0).portables();
+ IgniteBinary portables = ignite(0).binary();
IgniteCache<Object, Object> cache = ignite(0).cache(null).withKeepBinary();
@@ -156,15 +156,15 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
assertEquals((Object)client, ignite(i).configuration().isClientMode());
- IgniteObjects portables = ignite(i).portables();
+ IgniteBinary portables = ignite(i).binary();
- Collection<BinaryTypeMetadata> metaCol = portables.metadata();
+ Collection<BinaryType> metaCol = portables.metadata();
assertEquals(allTypes.size(), metaCol.size());
Set<String> names = new HashSet<>();
- for (BinaryTypeMetadata meta : metaCol) {
+ for (BinaryType meta : metaCol) {
assertTrue(names.add(meta.typeName()));
assertNull(meta.affinityKeyFieldName());
@@ -182,7 +182,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
public void testFailoverOnStart() throws Exception {
startGrids(4);
- IgniteObjects portables = ignite(0).portables();
+ IgniteBinary portables = ignite(0).binary();
IgniteCache<Object, Object> cache = ignite(0).cache(null).withKeepBinary();
@@ -232,25 +232,25 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
assertEquals((Object) client, ignite(i).configuration().isClientMode());
- portables = ignite(i).portables();
+ portables = ignite(i).binary();
- final IgniteObjects p0 = portables;
+ final IgniteBinary p0 = portables;
GridTestUtils.waitForCondition(new GridAbsPredicate() {
@Override public boolean apply() {
- Collection<BinaryTypeMetadata> metaCol = p0.metadata();
+ Collection<BinaryType> metaCol = p0.metadata();
return metaCol.size() == 1000;
}
}, getTestTimeout());
- Collection<BinaryTypeMetadata> metaCol = portables.metadata();
+ Collection<BinaryType> metaCol = portables.metadata();
assertEquals(1000, metaCol.size());
Set<String> names = new HashSet<>();
- for (BinaryTypeMetadata meta : metaCol) {
+ for (BinaryType meta : metaCol) {
assertTrue(names.add(meta.typeName()));
assertNull(meta.affinityKeyFieldName());
@@ -278,7 +278,7 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
assertFalse(ignite1.configuration().isClientMode());
- IgniteObjects portables = ignite(1).portables();
+ IgniteBinary portables = ignite(1).binary();
IgniteCache<Object, Object> cache = ignite(1).cache(null).withKeepBinary();
@@ -290,6 +290,6 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo
cache.put(i, builder.build());
}
- assertEquals(100, ignite(0).portables().metadata().size());
+ assertEquals(100, ignite(0).binary().metadata().size());
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataTest.java
index c2464db..b842ebb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCacheClientNodeBinaryObjectMetadataTest.java
@@ -30,7 +30,7 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectBuilder;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryTypeConfiguration;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
@@ -117,7 +117,7 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra
}
{
- BinaryObjectBuilder builder = ignite0.portables().builder("TestObject3");
+ BinaryObjectBuilder builder = ignite0.binary().builder("TestObject3");
builder.setField("f1", 1);
@@ -127,24 +127,24 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra
BinaryObject obj = cache.get(0);
- BinaryTypeMetadata meta = obj.metaData();
+ BinaryType meta = obj.metaData();
assertNotNull(meta);
assertEquals(1, meta.fields().size());
- meta = ignite0.portables().metadata(TestObject1.class);
+ meta = ignite0.binary().metadata(TestObject1.class);
assertNotNull(meta);
assertEquals("val2", meta.affinityKeyFieldName());
- meta = ignite0.portables().metadata(TestObject2.class);
+ meta = ignite0.binary().metadata(TestObject2.class);
assertNotNull(meta);
assertNull(meta.affinityKeyFieldName());
}
{
- BinaryObjectBuilder builder = ignite1.portables().builder("TestObject3");
+ BinaryObjectBuilder builder = ignite1.binary().builder("TestObject3");
builder.setField("f2", 2);
@@ -154,23 +154,23 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra
BinaryObject obj = cache.get(0);
- BinaryTypeMetadata meta = obj.metaData();
+ BinaryType meta = obj.metaData();
assertNotNull(meta);
assertEquals(2, meta.fields().size());
- meta = ignite1.portables().metadata(TestObject1.class);
+ meta = ignite1.binary().metadata(TestObject1.class);
assertNotNull(meta);
assertEquals("val2", meta.affinityKeyFieldName());
- meta = ignite1.portables().metadata(TestObject2.class);
+ meta = ignite1.binary().metadata(TestObject2.class);
assertNotNull(meta);
assertNull(meta.affinityKeyFieldName());
}
- BinaryTypeMetadata meta = ignite0.portables().metadata("TestObject3");
+ BinaryType meta = ignite0.binary().metadata("TestObject3");
assertNotNull(meta);
assertEquals(2, meta.fields().size());
@@ -187,15 +187,15 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra
assertNotNull(meta);
assertEquals(2, meta.fields().size());
- Collection<BinaryTypeMetadata> meta1 = ignite1.portables().metadata();
- Collection<BinaryTypeMetadata> meta2 = ignite1.portables().metadata();
+ Collection<BinaryType> meta1 = ignite1.binary().metadata();
+ Collection<BinaryType> meta2 = ignite1.binary().metadata();
assertEquals(meta1.size(), meta2.size());
- for (BinaryTypeMetadata m1 : meta1) {
+ for (BinaryType m1 : meta1) {
boolean found = false;
- for (BinaryTypeMetadata m2 : meta1) {
+ for (BinaryType m2 : meta1) {
if (m1.typeName().equals(m2.typeName())) {
assertEquals(m1.affinityKeyFieldName(), m2.affinityKeyFieldName());
assertEquals(m1.fields(), m2.fields());
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreAbstractSelfTest.java
index 7c605b5..1c842e1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreAbstractSelfTest.java
@@ -36,7 +36,7 @@ import org.jetbrains.annotations.Nullable;
import org.jsr166.ConcurrentHashMap8;
/**
- * Tests for cache store with portables.
+ * Tests for cache store with binary.
*/
public abstract class GridCachePortableStoreAbstractSelfTest extends GridCommonAbstractTest {
/** */
@@ -76,7 +76,7 @@ public abstract class GridCachePortableStoreAbstractSelfTest extends GridCommonA
}
/**
- * @return Keep portables in store flag.
+ * @return Keep binary in store flag.
*/
protected abstract boolean keepPortableInStore();
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreObjectsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreObjectsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreObjectsSelfTest.java
index 1c1c99e..8f81572 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreObjectsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStoreObjectsSelfTest.java
@@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.cache.portable;
import java.util.Map;
/**
- * Tests for cache store with portables.
+ * Tests for cache store with binary.
*/
public class GridCachePortableStoreObjectsSelfTest extends GridCachePortableStoreAbstractSelfTest {
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStorePortablesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStorePortablesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStorePortablesSelfTest.java
index 492c4ca..4471502 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStorePortablesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridCachePortableStorePortablesSelfTest.java
@@ -20,7 +20,7 @@ import java.util.Map;
import org.apache.ignite.binary.BinaryObject;
/**
- * Tests for cache store with portables.
+ * Tests for cache store with binary.
*/
public class GridCachePortableStorePortablesSelfTest extends GridCachePortableStoreAbstractSelfTest {
/** {@inheritDoc} */
@@ -61,6 +61,6 @@ public class GridCachePortableStorePortablesSelfTest extends GridCachePortableSt
* @return Portable object.
*/
private Object portable(Object obj) {
- return grid().portables().toPortable(obj);
+ return grid().binary().toBinary(obj);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridPortableCacheEntryMemorySizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridPortableCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridPortableCacheEntryMemorySizeSelfTest.java
index d2a7385..d277801 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridPortableCacheEntryMemorySizeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/GridPortableCacheEntryMemorySizeSelfTest.java
@@ -27,7 +27,7 @@ import org.apache.ignite.marshaller.Marshaller;
import org.apache.ignite.marshaller.MarshallerContextTestImpl;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
/**
*
@@ -40,11 +40,11 @@ public class GridPortableCacheEntryMemorySizeSelfTest extends GridCacheEntryMemo
marsh.setContext(new MarshallerContextTestImpl(null));
PortableContext pCtx = new PortableContext(new PortableMetaDataHandler() {
- @Override public void addMeta(int typeId, BinaryTypeMetadata meta) throws BinaryObjectException {
+ @Override public void addMeta(int typeId, BinaryType meta) throws BinaryObjectException {
// No-op
}
- @Override public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException {
+ @Override public BinaryType metadata(int typeId) throws BinaryObjectException {
return null;
}
}, new IgniteConfiguration());
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/datastreaming/GridDataStreamerImplSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/datastreaming/GridDataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/datastreaming/GridDataStreamerImplSelfTest.java
index 699ed83..3bc3575 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/datastreaming/GridDataStreamerImplSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/datastreaming/GridDataStreamerImplSelfTest.java
@@ -54,7 +54,7 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest {
/** Number of keys to load via data streamer. */
private static final int KEYS_COUNT = 1000;
- /** Flag indicating should be cache configured with portables or not. */
+ /** Flag indicating should be cache configured with binary or not. */
private static boolean portables;
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredAtomicPortableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredAtomicPortableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredAtomicPortableSelfTest.java
index c845257..0c6b77c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredAtomicPortableSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredAtomicPortableSelfTest.java
@@ -33,7 +33,7 @@ public class GridCacheOffHeapTieredAtomicPortableSelfTest extends GridCacheOffHe
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- // Enable portables.
+ // Enable binary.
IgniteConfiguration cfg = super.getConfiguration(gridName);
PortableMarshaller marsh = new PortableMarshaller();
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionAtomicPortableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionAtomicPortableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionAtomicPortableSelfTest.java
index 46bbad1..215567c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionAtomicPortableSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionAtomicPortableSelfTest.java
@@ -29,7 +29,7 @@ import org.apache.ignite.binary.BinaryObject;
public class GridCacheOffHeapTieredEvictionAtomicPortableSelfTest extends GridCacheOffHeapTieredEvictionAtomicSelfTest {
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- // Enable portables.
+ // Enable binary.
IgniteConfiguration cfg = super.getConfiguration(gridName);
PortableMarshaller marsh = new PortableMarshaller();
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionPortableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionPortableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionPortableSelfTest.java
index d321da4..674e17a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionPortableSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredEvictionPortableSelfTest.java
@@ -29,7 +29,7 @@ import org.apache.ignite.binary.BinaryObject;
public class GridCacheOffHeapTieredEvictionPortableSelfTest extends GridCacheOffHeapTieredEvictionSelfTest {
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- // Enable portables.
+ // Enable binary.
IgniteConfiguration cfg = super.getConfiguration(gridName);
PortableMarshaller marsh = new PortableMarshaller();
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredPortableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredPortableSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredPortableSelfTest.java
index 6170e39..9f4e2c5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredPortableSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/portable/distributed/dht/GridCacheOffHeapTieredPortableSelfTest.java
@@ -33,7 +33,7 @@ public class GridCacheOffHeapTieredPortableSelfTest extends GridCacheOffHeapTier
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- // Enable portables.
+ // Enable binary.
IgniteConfiguration cfg = super.getConfiguration(gridName);
PortableMarshaller marsh = new PortableMarshaller();
[3/3] ignite git commit: IGNITE-950 - Fixed tests, renaming.
Posted by ag...@apache.org.
IGNITE-950 - Fixed tests, renaming.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2a1daa20
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2a1daa20
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2a1daa20
Branch: refs/heads/ignite-950-new
Commit: 2a1daa206bd3cf5a50d67a6150b0a9172a976fdf
Parents: d1c7baa
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Nov 3 12:44:47 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Nov 3 12:44:47 2015 +0300
----------------------------------------------------------------------
...mputeClientPortableTaskExecutionExample.java | 2 +-
.../src/main/java/org/apache/ignite/Ignite.java | 6 +-
.../java/org/apache/ignite/IgniteBinary.java | 366 +++++++++++++++++++
.../java/org/apache/ignite/IgniteObjects.java | 366 -------------------
.../org/apache/ignite/binary/BinaryObject.java | 18 +-
.../ignite/binary/BinaryObjectBuilder.java | 12 +-
.../org/apache/ignite/binary/BinaryReader.java | 53 ++-
.../org/apache/ignite/binary/BinaryType.java | 59 +++
.../ignite/binary/BinaryTypeConfiguration.java | 1 +
.../ignite/binary/BinaryTypeMetadata.java | 60 ---
.../org/apache/ignite/binary/Binarylizable.java | 2 +-
.../configuration/CacheConfiguration.java | 8 +-
.../apache/ignite/internal/IgniteKernal.java | 4 +-
.../internal/client/GridClientCompute.java | 2 +-
.../impl/connection/GridClientConnection.java | 2 +-
.../GridClientConnectionManagerAdapter.java | 2 +-
.../connection/GridClientNioTcpConnection.java | 6 +-
.../internal/portable/BinaryMetaDataImpl.java | 4 +-
.../internal/portable/BinaryObjectEx.java | 6 +-
.../internal/portable/BinaryObjectImpl.java | 4 +-
.../portable/BinaryObjectOffheapImpl.java | 4 +-
.../internal/portable/PortableContext.java | 4 +-
.../portable/PortableMetaDataHandler.java | 6 +-
.../builder/BinaryObjectBuilderImpl.java | 4 +-
.../processors/cache/CacheObjectContext.java | 2 +-
.../processors/cache/GridCacheContext.java | 2 +-
.../processors/cache/IgniteInternalCache.java | 2 +-
.../GridDistributedCacheAdapter.java | 2 +
.../distributed/near/GridNearGetFuture.java | 27 +-
.../portable/CacheObjectPortableProcessor.java | 16 +-
.../CacheObjectPortableProcessorImpl.java | 90 ++---
.../cache/portable/IgniteBinaryImpl.java | 177 +++++++++
.../cache/portable/IgniteObjectsImpl.java | 177 ---------
.../cache/query/GridCacheQueryRequest.java | 4 +-
.../store/GridCacheStoreManagerAdapter.java | 2 +-
.../transactions/IgniteTxLocalAdapter.java | 2 +-
.../platform/PlatformContextImpl.java | 8 +-
.../platform/compute/PlatformCompute.java | 2 +-
.../PlatformDotNetConfigurationClosure.java | 6 +-
.../client/message/GridClientTaskRequest.java | 6 +-
...idBinaryObjectBuilderAdditionalSelfTest.java | 20 +-
.../GridBinaryObjectBuilderSelfTest.java | 14 +-
...idPortableMarshallerCtxDisabledSelfTest.java | 6 +-
.../GridPortableMarshallerSelfTest.java | 6 +-
.../GridPortableMetaDataDisabledSelfTest.java | 28 +-
.../portable/GridPortableMetaDataSelfTest.java | 32 +-
.../portable/GridPortableWildcardsSelfTest.java | 6 +-
.../GridCacheBinaryObjectsAbstractSelfTest.java | 4 +-
...ntNodeBinaryObjectMetadataMultinodeTest.java | 28 +-
...CacheClientNodeBinaryObjectMetadataTest.java | 28 +-
.../GridCachePortableStoreAbstractSelfTest.java | 4 +-
.../GridCachePortableStoreObjectsSelfTest.java | 2 +-
...GridCachePortableStorePortablesSelfTest.java | 4 +-
...ridPortableCacheEntryMemorySizeSelfTest.java | 6 +-
.../GridDataStreamerImplSelfTest.java | 2 +-
...acheOffHeapTieredAtomicPortableSelfTest.java | 2 +-
...eapTieredEvictionAtomicPortableSelfTest.java | 2 +-
...heOffHeapTieredEvictionPortableSelfTest.java | 2 +-
.../GridCacheOffHeapTieredPortableSelfTest.java | 2 +-
.../PlatformComputePortableArgTask.java | 4 +-
.../ignite/testframework/junits/IgniteMock.java | 4 +-
.../junits/multijvm/IgniteProcessProxy.java | 4 +-
.../org/apache/ignite/IgniteSpringBean.java | 4 +-
63 files changed, 882 insertions(+), 858 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java
index b281655..d6b8fd3 100644
--- a/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java
@@ -74,7 +74,7 @@ public class ComputeClientPortableTaskExecutionExample {
// Convert collection of employees to collection of portable objects.
// This allows to send objects across nodes without requiring to have
// Employee class on classpath of these nodes.
- Collection<BinaryObject> portables = ignite.portables().toPortable(employees);
+ Collection<BinaryObject> portables = ignite.binary().toBinary(employees);
// Execute task and get average salary.
Long avgSalary = ignite.compute(ignite.cluster().forRemotes()).execute(new ComputeClientTask(), portables);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 4125f8b..3fa35bb 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -459,11 +459,11 @@ public interface Ignite extends AutoCloseable {
public <T extends IgnitePlugin> T plugin(String name) throws PluginNotFoundException;
/**
- * Gets an instance of {@link IgniteObjects} interface.
+ * Gets an instance of {@link IgniteBinary} interface.
*
- * @return Instance of {@link IgniteObjects} interface.
+ * @return Instance of {@link IgniteBinary} interface.
*/
- public IgniteObjects portables();
+ public IgniteBinary binary();
/**
* Closes {@code this} instance of grid. This method is identical to calling
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
new file mode 100644
index 0000000..ebbbd53
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
@@ -0,0 +1,366 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.TreeMap;
+import java.util.UUID;
+import org.apache.ignite.marshaller.portable.PortableMarshaller;
+import org.apache.ignite.binary.BinaryObjectBuilder;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.BinaryType;
+import org.apache.ignite.binary.BinaryObject;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Defines portable objects functionality. With portable objects you are able to:
+ * <ul>
+ * <li>Seamlessly interoperate between Java, .NET, and C++.</li>
+ * <li>Make any object portable with zero code change to your existing code.</li>
+ * <li>Nest portable objects within each other.</li>
+ * <li>Automatically handle {@code circular} or {@code null} references.</li>
+ * <li>Automatically convert collections and maps between Java, .NET, and C++.</li>
+ * <li>
+ * Optionally avoid deserialization of objects on the server side
+ * (objects are stored in {@link org.apache.ignite.binary.BinaryObject} format).
+ * </li>
+ * <li>Avoid need to have concrete class definitions on the server side.</li>
+ * <li>Dynamically change structure of the classes without having to restart the cluster.</li>
+ * <li>Index into portable objects for querying purposes.</li>
+ * </ul>
+ * <h1 class="header">Working With Portables Directly</h1>
+ * Once an object is defined as portable,
+ * Ignite will always store it in memory in the portable (i.e. binary) format.
+ * User can choose to work either with the portable format or with the deserialized form
+ * (assuming that class definitions are present in the classpath).
+ * <p>
+ * To work with the portable format directly, user should create a special cache projection
+ * using IgniteCache.withKeepBinary() method and then retrieve individual fields as needed:
+ * <pre name=code class=java>
+ * IgniteCache<PortableObject, PortableObject> prj = cache.withKeepBinary();
+ *
+ * // Convert instance of MyKey to portable format.
+ * // We could also use PortableBuilder to create the key in portable format directly.
+ * PortableObject key = grid.binary().toBinary(new MyKey());
+ *
+ * PortableObject val = prj.get(key);
+ *
+ * String field = val.field("myFieldName");
+ * </pre>
+ * Alternatively, if we have class definitions in the classpath, we may choose to work with deserialized
+ * typed objects at all times. In this case we do incur the deserialization cost. However, if
+ * {@link PortableMarshaller#isKeepDeserialized()} is {@code true} then Ignite will only deserialize on the first access
+ * and will cache the deserialized object, so it does not have to be deserialized again:
+ * <pre name=code class=java>
+ * IgniteCache<MyKey.class, MyValue.class> cache = grid.cache(null);
+ *
+ * MyValue val = cache.get(new MyKey());
+ *
+ * // Normal java getter.
+ * String fieldVal = val.getMyFieldName();
+ * </pre>
+ * If we used, for example, one of the automatically handled portable types for a key, like integer,
+ * and still wanted to work with binary portable format for values, then we would declare cache projection
+ * as follows:
+ * <pre name=code class=java>
+ * IgniteCache<Integer.class, PortableObject> prj = cache.withKeepBinary();
+ * </pre>
+ * <h1 class="header">Automatic Portable Types</h1>
+ * Note that only portable classes are converted to {@link org.apache.ignite.binary.BinaryObject} format. Following
+ * classes are never converted (e.g., {@link #toBinary(Object)} method will return original
+ * object, and instances of these classes will be stored in cache without changes):
+ * <ul>
+ * <li>All primitives (byte, int, ...) and there boxed versions (Byte, Integer, ...)</li>
+ * <li>Arrays of primitives (byte[], int[], ...)</li>
+ * <li>{@link String} and array of {@link String}s</li>
+ * <li>{@link UUID} and array of {@link UUID}s</li>
+ * <li>{@link Date} and array of {@link Date}s</li>
+ * <li>{@link Timestamp} and array of {@link Timestamp}s</li>
+ * <li>Enums and array of enums</li>
+ * <li>
+ * Maps, collections and array of objects (but objects inside
+ * them will still be converted if they are portable)
+ * </li>
+ * </ul>
+ * <h1 class="header">Working With Maps and Collections</h1>
+ * All maps and collections in the portable objects are serialized automatically. When working
+ * with different platforms, e.g. C++ or .NET, Ignite will automatically pick the most
+ * adequate collection or map in either language. For example, {@link ArrayList} in Java will become
+ * {@code List} in C#, {@link LinkedList} in Java is {@link LinkedList} in C#, {@link HashMap}
+ * in Java is {@code Dictionary} in C#, and {@link TreeMap} in Java becomes {@code SortedDictionary}
+ * in C#, etc.
+ * <h1 class="header">Building Portable Objects</h1>
+ * Ignite comes with {@link org.apache.ignite.binary.BinaryObjectBuilder} which allows to build portable objects dynamically:
+ * <pre name=code class=java>
+ * PortableBuilder builder = Ignition.ignite().binary().builder();
+ *
+ * builder.typeId("MyObject");
+ *
+ * builder.stringField("fieldA", "A");
+ * build.intField("fieldB", "B");
+ *
+ * PortableObject portableObj = builder.build();
+ * </pre>
+ * For the cases when class definition is present
+ * in the class path, it is also possible to populate a standard POJO and then
+ * convert it to portable format, like so:
+ * <pre name=code class=java>
+ * MyObject obj = new MyObject();
+ *
+ * obj.setFieldA("A");
+ * obj.setFieldB(123);
+ *
+ * PortableObject portableObj = Ignition.ignite().binary().toBinary(obj);
+ * </pre>
+ * NOTE: you don't need to convert typed objects to portable format before storing
+ * them in cache, Ignite will do that automatically.
+ * <h1 class="header">Portable Metadata</h1>
+ * Even though Ignite portable protocol only works with hash codes for type and field names
+ * to achieve better performance, Ignite provides metadata for all portable types which
+ * can be queried ar runtime via any of the {@link IgniteBinary#metadata(Class)}
+ * methods. Having metadata also allows for proper formatting of {@code PortableObject#toString()} method,
+ * even when portable objects are kept in binary format only, which may be necessary for audit reasons.
+ * <h1 class="header">Dynamic Structure Changes</h1>
+ * Since objects are always cached in the portable binary format, server does not need to
+ * be aware of the class definitions. Moreover, if class definitions are not present or not
+ * used on the server, then clients can continuously change the structure of the portable
+ * objects without having to restart the cluster. For example, if one client stores a
+ * certain class with fields A and B, and another client stores the same class with
+ * fields B and C, then the server-side portable object will have the fields A, B, and C.
+ * As the structure of a portable object changes, the new fields become available for SQL queries
+ * automatically.
+ * <h1 class="header">Configuration</h1>
+ * By default all your objects are considered as binary and no specific configuration is needed.
+ * However, in some cases, like when an object is used by both Java and .Net, you may need to specify portable objects
+ * explicitly by calling {@link PortableMarshaller#setClassNames(Collection)}.
+ * The only requirement Ignite imposes is that your object has an empty
+ * constructor. Note, that since server side does not have to know the class definition,
+ * you only need to list portable objects in configuration on the client side. However, if you
+ * list them on the server side as well, then you get the ability to deserialize portable objects
+ * into concrete types on the server as well as on the client.
+ * <p>
+ * Here is an example of portable configuration (note that star (*) notation is supported):
+ * <pre name=code class=xml>
+ * ...
+ * <!-- Explicit portable objects configuration. -->
+ * <property name="marshaller">
+ * <bean class="org.apache.ignite.marshaller.portable.PortableMarshaller">
+ * <property name="classNames">
+ * <list>
+ * <value>my.package.for.portable.objects.*</value>
+ * <value>org.apache.ignite.examples.client.portable.Employee</value>
+ * </list>
+ * </property>
+ * </bean>
+ * </property>
+ * ...
+ * </pre>
+ * or from code:
+ * <pre name=code class=java>
+ * IgniteConfiguration cfg = new IgniteConfiguration();
+ *
+ * PortableMarshaller marsh = new PortableMarshaller();
+ *
+ * marsh.setClassNames(Arrays.asList(
+ * Employee.class.getName(),
+ * Address.class.getName())
+ * );
+ *
+ * cfg.setMarshaller(marsh);
+ * </pre>
+ * You can also specify class name for a portable object via {@link org.apache.ignite.binary.BinaryTypeConfiguration}.
+ * Do it in case if you need to override other configuration properties on per-type level, like
+ * ID-mapper, or serializer.
+ * <h1 class="header">Custom Affinity Keys</h1>
+ * Often you need to specify an alternate key (not the cache key) for affinity routing whenever
+ * storing objects in cache. For example, if you are caching {@code Employee} object with
+ * {@code Organization}, and want to colocate employees with organization they work for,
+ * so you can process them together, you need to specify an alternate affinity key.
+ * With portable objects you would have to do it as following:
+ * <pre name=code class=xml>
+ * <property name="marshaller">
+ * <bean class="org.gridgain.grid.marshaller.portable.PortableMarshaller">
+ * ...
+ * <property name="typeConfigurations">
+ * <list>
+ * <bean class="org.apache.ignite.portable.PortableTypeConfiguration">
+ * <property name="className" value="org.apache.ignite.examples.client.portable.EmployeeKey"/>
+ * <property name="affinityKeyFieldName" value="organizationId"/>
+ * </bean>
+ * </list>
+ * </property>
+ * ...
+ * </bean>
+ * </property>
+ * </pre>
+ * <h1 class="header">Serialization</h1>
+ * Serialization and deserialization works out-of-the-box in Ignite. However, you can provide your own custom
+ * serialization logic by optionally implementing {@link org.apache.ignite.binary.Binarylizable} interface, like so:
+ * <pre name=code class=java>
+ * public class Address implements PortableMarshalAware {
+ * private String street;
+ * private int zip;
+ *
+ * // Empty constructor required for portable deserialization.
+ * public Address() {}
+ *
+ * @Override public void writeBinary(PortableWriter writer) throws PortableException {
+ * writer.writeString("street", street);
+ * writer.writeInt("zip", zip);
+ * }
+ *
+ * @Override public void readBinary(PortableReader reader) throws PortableException {
+ * street = reader.readString("street");
+ * zip = reader.readInt("zip");
+ * }
+ * }
+ * </pre>
+ * Alternatively, if you cannot change class definitions, you can provide custom serialization
+ * logic in {@link org.apache.ignite.binary.BinarySerializer} either globally in {@link PortableMarshaller} or
+ * for a specific type via {@link org.apache.ignite.binary.BinaryTypeConfiguration} instance.
+ * <p>
+ * Similar to java serialization you can use {@code writeReplace()} and {@code readResolve()} methods.
+ * <ul>
+ * <li>
+ * {@code readResolve} is defined as follows: {@code ANY-ACCESS-MODIFIER Object readResolve()}.
+ * It may be used to replace the de-serialized object by another one of your choice.
+ * </li>
+ * <li>
+ * {@code writeReplace} is defined as follows: {@code ANY-ACCESS-MODIFIER Object writeReplace()}. This method
+ * allows the developer to provide a replacement object that will be serialized instead of the original one.
+ * </li>
+ * </ul>
+ *
+ * <h1 class="header">Custom ID Mappers</h1>
+ * Ignite implementation uses name hash codes to generate IDs for class names or field names
+ * internally. However, in cases when you want to provide your own ID mapping schema,
+ * you can provide your own {@link org.apache.ignite.binary.BinaryTypeIdMapper} implementation.
+ * <p>
+ * ID-mapper may be provided either globally in {@link PortableMarshaller},
+ * or for a specific type via {@link org.apache.ignite.binary.BinaryTypeConfiguration} instance.
+ * <h1 class="header">Query Indexing</h1>
+ * Portable objects can be indexed for querying by specifying index fields in
+ * {@link org.apache.ignite.cache.CacheTypeMetadata} inside of specific
+ * {@link org.apache.ignite.configuration.CacheConfiguration} instance,
+ * like so:
+ * <pre name=code class=xml>
+ * ...
+ * <bean class="org.apache.ignite.cache.CacheConfiguration">
+ * ...
+ * <property name="typeMetadata">
+ * <list>
+ * <bean class="CacheTypeMetadata">
+ * <property name="type" value="Employee"/>
+ *
+ * <!-- Fields to index in ascending order. -->
+ * <property name="ascendingFields">
+ * <map>
+ * <entry key="name" value="java.lang.String"/>
+ *
+ * <!-- Nested portable objects can also be indexed. -->
+ * <entry key="address.zip" value="java.lang.Integer"/>
+ * </map>
+ * </property>
+ * </bean>
+ * </list>
+ * </property>
+ * </bean>
+ * </pre>
+ */
+public interface IgniteBinary {
+ /**
+ * Gets type ID for given type name.
+ *
+ * @param typeName Type name.
+ * @return Type ID.
+ */
+ public int typeId(String typeName);
+
+ /**
+ * Converts provided object to instance of {@link org.apache.ignite.binary.BinaryObject}.
+ *
+ * @param obj Object to convert.
+ * @return Converted object.
+ * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
+ */
+ public <T> T toBinary(@Nullable Object obj) throws BinaryObjectException;
+
+ /**
+ * Creates new portable builder.
+ *
+ * @param typeId ID of the type.
+ * @return Newly portable builder.
+ */
+ public BinaryObjectBuilder builder(int typeId);
+
+ /**
+ * Creates new portable builder.
+ *
+ * @param typeName Type name.
+ * @return Newly portable builder.
+ */
+ public BinaryObjectBuilder builder(String typeName);
+
+ /**
+ * Creates portable builder initialized by existing portable object.
+ *
+ * @param portableObj Portable object to initialize builder.
+ * @return Portable builder.
+ */
+ public BinaryObjectBuilder builder(BinaryObject portableObj);
+
+ /**
+ * Gets metadata for provided class.
+ *
+ * @param cls Class.
+ * @return Metadata.
+ * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
+ */
+ public BinaryType metadata(Class<?> cls) throws BinaryObjectException;
+
+ /**
+ * Gets metadata for provided class name.
+ *
+ * @param typeName Type name.
+ * @return Metadata.
+ * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
+ */
+ public BinaryType metadata(String typeName) throws BinaryObjectException;
+
+ /**
+ * Gets metadata for provided type ID.
+ *
+ * @param typeId Type ID.
+ * @return Metadata.
+ * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
+ */
+ public BinaryType metadata(int typeId) throws BinaryObjectException;
+
+ /**
+ * Gets metadata for all known types.
+ *
+ * @return Metadata.
+ * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
+ */
+ public Collection<BinaryType> metadata() throws BinaryObjectException;
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/IgniteObjects.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteObjects.java b/modules/core/src/main/java/org/apache/ignite/IgniteObjects.java
deleted file mode 100644
index ace9865..0000000
--- a/modules/core/src/main/java/org/apache/ignite/IgniteObjects.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite;
-
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.TreeMap;
-import java.util.UUID;
-import org.apache.ignite.marshaller.portable.PortableMarshaller;
-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;
-
-/**
- * Defines portable objects functionality. With portable objects you are able to:
- * <ul>
- * <li>Seamlessly interoperate between Java, .NET, and C++.</li>
- * <li>Make any object portable with zero code change to your existing code.</li>
- * <li>Nest portable objects within each other.</li>
- * <li>Automatically handle {@code circular} or {@code null} references.</li>
- * <li>Automatically convert collections and maps between Java, .NET, and C++.</li>
- * <li>
- * Optionally avoid deserialization of objects on the server side
- * (objects are stored in {@link org.apache.ignite.binary.BinaryObject} format).
- * </li>
- * <li>Avoid need to have concrete class definitions on the server side.</li>
- * <li>Dynamically change structure of the classes without having to restart the cluster.</li>
- * <li>Index into portable objects for querying purposes.</li>
- * </ul>
- * <h1 class="header">Working With Portables Directly</h1>
- * Once an object is defined as portable,
- * Ignite will always store it in memory in the portable (i.e. binary) format.
- * User can choose to work either with the portable format or with the deserialized form
- * (assuming that class definitions are present in the classpath).
- * <p>
- * To work with the portable format directly, user should create a special cache projection
- * using IgniteCache.withKeepBinary() method and then retrieve individual fields as needed:
- * <pre name=code class=java>
- * IgniteCache<PortableObject, PortableObject> prj = cache.withKeepBinary();
- *
- * // Convert instance of MyKey to portable format.
- * // We could also use PortableBuilder to create the key in portable format directly.
- * PortableObject key = grid.portables().toPortable(new MyKey());
- *
- * PortableObject val = prj.get(key);
- *
- * String field = val.field("myFieldName");
- * </pre>
- * Alternatively, if we have class definitions in the classpath, we may choose to work with deserialized
- * typed objects at all times. In this case we do incur the deserialization cost. However, if
- * {@link PortableMarshaller#isKeepDeserialized()} is {@code true} then Ignite will only deserialize on the first access
- * and will cache the deserialized object, so it does not have to be deserialized again:
- * <pre name=code class=java>
- * IgniteCache<MyKey.class, MyValue.class> cache = grid.cache(null);
- *
- * MyValue val = cache.get(new MyKey());
- *
- * // Normal java getter.
- * String fieldVal = val.getMyFieldName();
- * </pre>
- * If we used, for example, one of the automatically handled portable types for a key, like integer,
- * and still wanted to work with binary portable format for values, then we would declare cache projection
- * as follows:
- * <pre name=code class=java>
- * IgniteCache<Integer.class, PortableObject> prj = cache.withKeepBinary();
- * </pre>
- * <h1 class="header">Automatic Portable Types</h1>
- * Note that only portable classes are converted to {@link org.apache.ignite.binary.BinaryObject} format. Following
- * classes are never converted (e.g., {@link #toPortable(Object)} method will return original
- * object, and instances of these classes will be stored in cache without changes):
- * <ul>
- * <li>All primitives (byte, int, ...) and there boxed versions (Byte, Integer, ...)</li>
- * <li>Arrays of primitives (byte[], int[], ...)</li>
- * <li>{@link String} and array of {@link String}s</li>
- * <li>{@link UUID} and array of {@link UUID}s</li>
- * <li>{@link Date} and array of {@link Date}s</li>
- * <li>{@link Timestamp} and array of {@link Timestamp}s</li>
- * <li>Enums and array of enums</li>
- * <li>
- * Maps, collections and array of objects (but objects inside
- * them will still be converted if they are portable)
- * </li>
- * </ul>
- * <h1 class="header">Working With Maps and Collections</h1>
- * All maps and collections in the portable objects are serialized automatically. When working
- * with different platforms, e.g. C++ or .NET, Ignite will automatically pick the most
- * adequate collection or map in either language. For example, {@link ArrayList} in Java will become
- * {@code List} in C#, {@link LinkedList} in Java is {@link LinkedList} in C#, {@link HashMap}
- * in Java is {@code Dictionary} in C#, and {@link TreeMap} in Java becomes {@code SortedDictionary}
- * in C#, etc.
- * <h1 class="header">Building Portable Objects</h1>
- * Ignite comes with {@link org.apache.ignite.binary.BinaryObjectBuilder} which allows to build portable objects dynamically:
- * <pre name=code class=java>
- * PortableBuilder builder = Ignition.ignite().portables().builder();
- *
- * builder.typeId("MyObject");
- *
- * builder.stringField("fieldA", "A");
- * build.intField("fieldB", "B");
- *
- * PortableObject portableObj = builder.build();
- * </pre>
- * For the cases when class definition is present
- * in the class path, it is also possible to populate a standard POJO and then
- * convert it to portable format, like so:
- * <pre name=code class=java>
- * MyObject obj = new MyObject();
- *
- * obj.setFieldA("A");
- * obj.setFieldB(123);
- *
- * PortableObject portableObj = Ignition.ignite().portables().toPortable(obj);
- * </pre>
- * NOTE: you don't need to convert typed objects to portable format before storing
- * them in cache, Ignite will do that automatically.
- * <h1 class="header">Portable Metadata</h1>
- * Even though Ignite portable protocol only works with hash codes for type and field names
- * to achieve better performance, Ignite provides metadata for all portable types which
- * can be queried ar runtime via any of the {@link IgniteObjects#metadata(Class)}
- * methods. Having metadata also allows for proper formatting of {@code PortableObject#toString()} method,
- * even when portable objects are kept in binary format only, which may be necessary for audit reasons.
- * <h1 class="header">Dynamic Structure Changes</h1>
- * Since objects are always cached in the portable binary format, server does not need to
- * be aware of the class definitions. Moreover, if class definitions are not present or not
- * used on the server, then clients can continuously change the structure of the portable
- * objects without having to restart the cluster. For example, if one client stores a
- * certain class with fields A and B, and another client stores the same class with
- * fields B and C, then the server-side portable object will have the fields A, B, and C.
- * As the structure of a portable object changes, the new fields become available for SQL queries
- * automatically.
- * <h1 class="header">Configuration</h1>
- * By default all your objects are considered as portables and no specific configuration is needed.
- * However, in some cases, like when an object is used by both Java and .Net, you may need to specify portable objects
- * explicitly by calling {@link PortableMarshaller#setClassNames(Collection)}.
- * The only requirement Ignite imposes is that your object has an empty
- * constructor. Note, that since server side does not have to know the class definition,
- * you only need to list portable objects in configuration on the client side. However, if you
- * list them on the server side as well, then you get the ability to deserialize portable objects
- * into concrete types on the server as well as on the client.
- * <p>
- * Here is an example of portable configuration (note that star (*) notation is supported):
- * <pre name=code class=xml>
- * ...
- * <!-- Explicit portable objects configuration. -->
- * <property name="marshaller">
- * <bean class="org.apache.ignite.marshaller.portable.PortableMarshaller">
- * <property name="classNames">
- * <list>
- * <value>my.package.for.portable.objects.*</value>
- * <value>org.apache.ignite.examples.client.portable.Employee</value>
- * </list>
- * </property>
- * </bean>
- * </property>
- * ...
- * </pre>
- * or from code:
- * <pre name=code class=java>
- * IgniteConfiguration cfg = new IgniteConfiguration();
- *
- * PortableMarshaller marsh = new PortableMarshaller();
- *
- * marsh.setClassNames(Arrays.asList(
- * Employee.class.getName(),
- * Address.class.getName())
- * );
- *
- * cfg.setMarshaller(marsh);
- * </pre>
- * You can also specify class name for a portable object via {@link org.apache.ignite.binary.BinaryTypeConfiguration}.
- * Do it in case if you need to override other configuration properties on per-type level, like
- * ID-mapper, or serializer.
- * <h1 class="header">Custom Affinity Keys</h1>
- * Often you need to specify an alternate key (not the cache key) for affinity routing whenever
- * storing objects in cache. For example, if you are caching {@code Employee} object with
- * {@code Organization}, and want to colocate employees with organization they work for,
- * so you can process them together, you need to specify an alternate affinity key.
- * With portable objects you would have to do it as following:
- * <pre name=code class=xml>
- * <property name="marshaller">
- * <bean class="org.gridgain.grid.marshaller.portable.PortableMarshaller">
- * ...
- * <property name="typeConfigurations">
- * <list>
- * <bean class="org.apache.ignite.portable.PortableTypeConfiguration">
- * <property name="className" value="org.apache.ignite.examples.client.portable.EmployeeKey"/>
- * <property name="affinityKeyFieldName" value="organizationId"/>
- * </bean>
- * </list>
- * </property>
- * ...
- * </bean>
- * </property>
- * </pre>
- * <h1 class="header">Serialization</h1>
- * Serialization and deserialization works out-of-the-box in Ignite. However, you can provide your own custom
- * serialization logic by optionally implementing {@link org.apache.ignite.binary.Binarylizable} interface, like so:
- * <pre name=code class=java>
- * public class Address implements PortableMarshalAware {
- * private String street;
- * private int zip;
- *
- * // Empty constructor required for portable deserialization.
- * public Address() {}
- *
- * @Override public void writeBinary(PortableWriter writer) throws PortableException {
- * writer.writeString("street", street);
- * writer.writeInt("zip", zip);
- * }
- *
- * @Override public void readBinary(PortableReader reader) throws PortableException {
- * street = reader.readString("street");
- * zip = reader.readInt("zip");
- * }
- * }
- * </pre>
- * Alternatively, if you cannot change class definitions, you can provide custom serialization
- * logic in {@link org.apache.ignite.binary.BinarySerializer} either globally in {@link PortableMarshaller} or
- * for a specific type via {@link org.apache.ignite.binary.BinaryTypeConfiguration} instance.
- * <p>
- * Similar to java serialization you can use {@code writeReplace()} and {@code readResolve()} methods.
- * <ul>
- * <li>
- * {@code readResolve} is defined as follows: {@code ANY-ACCESS-MODIFIER Object readResolve()}.
- * It may be used to replace the de-serialized object by another one of your choice.
- * </li>
- * <li>
- * {@code writeReplace} is defined as follows: {@code ANY-ACCESS-MODIFIER Object writeReplace()}. This method
- * allows the developer to provide a replacement object that will be serialized instead of the original one.
- * </li>
- * </ul>
- *
- * <h1 class="header">Custom ID Mappers</h1>
- * Ignite implementation uses name hash codes to generate IDs for class names or field names
- * internally. However, in cases when you want to provide your own ID mapping schema,
- * you can provide your own {@link org.apache.ignite.binary.BinaryTypeIdMapper} implementation.
- * <p>
- * ID-mapper may be provided either globally in {@link PortableMarshaller},
- * or for a specific type via {@link org.apache.ignite.binary.BinaryTypeConfiguration} instance.
- * <h1 class="header">Query Indexing</h1>
- * Portable objects can be indexed for querying by specifying index fields in
- * {@link org.apache.ignite.cache.CacheTypeMetadata} inside of specific
- * {@link org.apache.ignite.configuration.CacheConfiguration} instance,
- * like so:
- * <pre name=code class=xml>
- * ...
- * <bean class="org.apache.ignite.cache.CacheConfiguration">
- * ...
- * <property name="typeMetadata">
- * <list>
- * <bean class="CacheTypeMetadata">
- * <property name="type" value="Employee"/>
- *
- * <!-- Fields to index in ascending order. -->
- * <property name="ascendingFields">
- * <map>
- * <entry key="name" value="java.lang.String"/>
- *
- * <!-- Nested portable objects can also be indexed. -->
- * <entry key="address.zip" value="java.lang.Integer"/>
- * </map>
- * </property>
- * </bean>
- * </list>
- * </property>
- * </bean>
- * </pre>
- */
-public interface IgniteObjects {
- /**
- * Gets type ID for given type name.
- *
- * @param typeName Type name.
- * @return Type ID.
- */
- public int typeId(String typeName);
-
- /**
- * Converts provided object to instance of {@link org.apache.ignite.binary.BinaryObject}.
- *
- * @param obj Object to convert.
- * @return Converted object.
- * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
- */
- public <T> T toPortable(@Nullable Object obj) throws BinaryObjectException;
-
- /**
- * Creates new portable builder.
- *
- * @param typeId ID of the type.
- * @return Newly portable builder.
- */
- public BinaryObjectBuilder builder(int typeId);
-
- /**
- * Creates new portable builder.
- *
- * @param typeName Type name.
- * @return Newly portable builder.
- */
- public BinaryObjectBuilder builder(String typeName);
-
- /**
- * Creates portable builder initialized by existing portable object.
- *
- * @param portableObj Portable object to initialize builder.
- * @return Portable builder.
- */
- public BinaryObjectBuilder builder(BinaryObject portableObj);
-
- /**
- * Gets metadata for provided class.
- *
- * @param cls Class.
- * @return Metadata.
- * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
- */
- @Nullable public BinaryTypeMetadata metadata(Class<?> cls) throws BinaryObjectException;
-
- /**
- * Gets metadata for provided class name.
- *
- * @param typeName Type name.
- * @return Metadata.
- * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
- */
- @Nullable public BinaryTypeMetadata metadata(String typeName) throws BinaryObjectException;
-
- /**
- * Gets metadata for provided type ID.
- *
- * @param typeId Type ID.
- * @return Metadata.
- * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
- */
- @Nullable public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException;
-
- /**
- * Gets metadata for all known types.
- *
- * @return Metadata.
- * @throws org.apache.ignite.binary.BinaryObjectException In case of error.
- */
- public Collection<BinaryTypeMetadata> metadata() throws BinaryObjectException;
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/binary/BinaryObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObject.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObject.java
index 3a00a77..403871e 100644
--- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObject.java
+++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObject.java
@@ -23,7 +23,6 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.TreeMap;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
-import org.jetbrains.annotations.Nullable;
/**
* Wrapper for portable object in portable binary format. Once an object is defined as portable,
@@ -40,7 +39,7 @@ import org.jetbrains.annotations.Nullable;
*
* // Convert instance of MyKey to portable format.
* // We could also use GridPortableBuilder to create the key in portable format directly.
- * PortableObject key = grid.portables().toPortable(new MyKey());
+ * PortableObject key = grid.binary().toBinary(new MyKey());
*
* PortableObject val = prj.get(key);
*
@@ -77,7 +76,7 @@ import org.jetbrains.annotations.Nullable;
* <h1 class="header">Building Portable Objects</h1>
* Ignite comes with {@link BinaryObjectBuilder} which allows to build portable objects dynamically:
* <pre name=code class=java>
- * PortableBuilder builder = Ignition.ignite().portables().builder("org.project.MyObject");
+ * PortableBuilder builder = Ignition.ignite().binary().builder("org.project.MyObject");
*
* builder.setField("fieldA", "A");
* builder.setField("fieldB", "B");
@@ -93,12 +92,12 @@ import org.jetbrains.annotations.Nullable;
* obj.setFieldA("A");
* obj.setFieldB(123);
*
- * PortableObject portableObj = Ignition.ignite().portables().toPortable(obj);
+ * PortableObject portableObj = Ignition.ignite().binary().toBinary(obj);
* </pre>
* <h1 class="header">Portable Metadata</h1>
* Even though Ignite portable protocol only works with hash codes for type and field names
* to achieve better performance, Ignite provides metadata for all portable types which
- * can be queried ar runtime via any of the {@link org.apache.ignite.IgniteObjects#metadata(Class)}
+ * can be queried ar runtime via any of the {@link org.apache.ignite.IgniteBinary#metadata(Class)}
* methods. Having metadata also allows for proper formatting of {@code PortableObject.toString()} method,
* even when portable objects are kept in binary format only, which may be necessary for audit reasons.
*/
@@ -115,8 +114,9 @@ public interface BinaryObject extends Serializable, Cloneable {
*
* @return Meta data.
* @throws BinaryObjectException In case of error.
+ * TODO ignite-950 rename to type().
*/
- @Nullable public BinaryTypeMetadata metaData() throws BinaryObjectException;
+ public BinaryType metaData() throws BinaryObjectException;
/**
* Gets field value.
@@ -124,11 +124,13 @@ public interface BinaryObject extends Serializable, Cloneable {
* @param fieldName Field name.
* @return Field value.
* @throws BinaryObjectException In case of any other error.
+ * TODO ignite-950 remove.
*/
- @Nullable public <F> F field(String fieldName) throws BinaryObjectException;
+ public <F> F field(String fieldName) throws BinaryObjectException;
/**
* Checks whether field is set.
+ ** TODO ignite-950 remove.
*
* @param fieldName Field name.
* @return {@code true} if field is set.
@@ -151,7 +153,7 @@ public interface BinaryObject extends Serializable, Cloneable {
* @throws BinaryInvalidTypeException If class doesn't exist.
* @throws BinaryObjectException In case of any other error.
*/
- @Nullable public <T> T deserialize() throws BinaryObjectException;
+ public <T> T deserialize() throws BinaryObjectException;
/**
* Copies this portable object.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
index 014f256..3d1f0af 100644
--- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
+++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.Nullable;
* <p>
* Here is an example of how a portable object can be built dynamically:
* <pre name=code class=java>
- * PortableBuilder builder = Ignition.ignite().portables().builder("org.project.MyObject");
+ * PortableBuilder builder = Ignition.ignite().binary().builder("org.project.MyObject");
*
* builder.setField("fieldA", "A");
* builder.setField("fieldB", "B");
@@ -36,7 +36,7 @@ import org.jetbrains.annotations.Nullable;
* Also builder can be initialized by existing portable object. This allows changing some fields without affecting
* other fields.
* <pre name=code class=java>
- * PortableBuilder builder = Ignition.ignite().portables().builder(person);
+ * PortableBuilder builder = Ignition.ignite().binary().builder(person);
*
* builder.setField("name", "John");
*
@@ -49,7 +49,7 @@ import org.jetbrains.annotations.Nullable;
* for example:
*
* <pre name=code class=java>
- * PortableBuilder personBuilder = grid.portables().createBuilder(personPortableObj);
+ * PortableBuilder personBuilder = grid.binary().createBuilder(personPortableObj);
* PortableBuilder addressBuilder = personBuilder.setField("address");
*
* addressBuilder.setField("city", "New York");
@@ -60,9 +60,9 @@ import org.jetbrains.annotations.Nullable;
* String city = personPortableObj.getField("address").getField("city");
* </pre>
*
- * @see org.apache.ignite.IgniteObjects#builder(int)
- * @see org.apache.ignite.IgniteObjects#builder(String)
- * @see org.apache.ignite.IgniteObjects#builder(BinaryObject)
+ * @see org.apache.ignite.IgniteBinary#builder(int)
+ * @see org.apache.ignite.IgniteBinary#builder(String)
+ * @see org.apache.ignite.IgniteBinary#builder(BinaryObject)
*/
public interface BinaryObjectBuilder {
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/binary/BinaryReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryReader.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryReader.java
index 3881b49..d49330d 100644
--- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryReader.java
@@ -23,7 +23,6 @@ import java.util.Collection;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
-import org.jetbrains.annotations.Nullable;
/**
* Reader for portable objects used in {@link Binarylizable} implementations.
@@ -99,147 +98,147 @@ public interface BinaryReader {
* @return Decimal value.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public BigDecimal readDecimal(String fieldName) throws BinaryObjectException;
+ public BigDecimal readDecimal(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return String value.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public String readString(String fieldName) throws BinaryObjectException;
+ public String readString(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return UUID.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public UUID readUuid(String fieldName) throws BinaryObjectException;
+ public UUID readUuid(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Date.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public Date readDate(String fieldName) throws BinaryObjectException;
+ public Date readDate(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Timestamp.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public Timestamp readTimestamp(String fieldName) throws BinaryObjectException;
+ public Timestamp readTimestamp(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Object.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public <T> T readObject(String fieldName) throws BinaryObjectException;
+ public <T> T readObject(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Byte array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public byte[] readByteArray(String fieldName) throws BinaryObjectException;
+ public byte[] readByteArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Short array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public short[] readShortArray(String fieldName) throws BinaryObjectException;
+ public short[] readShortArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Integer array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public int[] readIntArray(String fieldName) throws BinaryObjectException;
+ public int[] readIntArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Long array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public long[] readLongArray(String fieldName) throws BinaryObjectException;
+ public long[] readLongArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Float array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public float[] readFloatArray(String fieldName) throws BinaryObjectException;
+ public float[] readFloatArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Byte array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public double[] readDoubleArray(String fieldName) throws BinaryObjectException;
+ public double[] readDoubleArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Char array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public char[] readCharArray(String fieldName) throws BinaryObjectException;
+ public char[] readCharArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Boolean array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public boolean[] readBooleanArray(String fieldName) throws BinaryObjectException;
+ public boolean[] readBooleanArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Decimal array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public BigDecimal[] readDecimalArray(String fieldName) throws BinaryObjectException;
+ public BigDecimal[] readDecimalArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return String array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public String[] readStringArray(String fieldName) throws BinaryObjectException;
+ public String[] readStringArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return UUID array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public UUID[] readUuidArray(String fieldName) throws BinaryObjectException;
+ public UUID[] readUuidArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Date array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public Date[] readDateArray(String fieldName) throws BinaryObjectException;
+ public Date[] readDateArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Timestamp array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public Timestamp[] readTimestampArray(String fieldName) throws BinaryObjectException;
+ public Timestamp[] readTimestampArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Object array.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public Object[] readObjectArray(String fieldName) throws BinaryObjectException;
+ public Object[] readObjectArray(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Collection.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public <T> Collection<T> readCollection(String fieldName) throws BinaryObjectException;
+ public <T> Collection<T> readCollection(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
@@ -247,7 +246,7 @@ public interface BinaryReader {
* @return Collection.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public <T> Collection<T> readCollection(String fieldName, Class<? extends Collection<T>> colCls)
+ public <T> Collection<T> readCollection(String fieldName, Class<? extends Collection<T>> colCls)
throws BinaryObjectException;
/**
@@ -255,7 +254,7 @@ public interface BinaryReader {
* @return Map.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public <K, V> Map<K, V> readMap(String fieldName) throws BinaryObjectException;
+ public <K, V> Map<K, V> readMap(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
@@ -263,7 +262,7 @@ public interface BinaryReader {
* @return Map.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public <K, V> Map<K, V> readMap(String fieldName, Class<? extends Map<K, V>> mapCls)
+ public <K, V> Map<K, V> readMap(String fieldName, Class<? extends Map<K, V>> mapCls)
throws BinaryObjectException;
/**
@@ -271,14 +270,14 @@ public interface BinaryReader {
* @return Value.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public <T extends Enum<?>> T readEnum(String fieldName) throws BinaryObjectException;
+ public <T extends Enum<?>> T readEnum(String fieldName) throws BinaryObjectException;
/**
* @param fieldName Field name.
* @return Value.
* @throws BinaryObjectException In case of error.
*/
- @Nullable public <T extends Enum<?>> T[] readEnumArray(String fieldName) throws BinaryObjectException;
+ public <T extends Enum<?>> T[] readEnumArray(String fieldName) throws BinaryObjectException;
/**
* Gets raw reader. Raw reader does not use field name hash codes, therefore,
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/binary/BinaryType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryType.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryType.java
new file mode 100644
index 0000000..8988c9d
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryType.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.binary;
+
+import java.util.Collection;
+
+/**
+ * Portable type meta data. Metadata for portable types can be accessed from any of the
+ * {@link org.apache.ignite.IgniteBinary#metadata(String)} methods.
+ * Having metadata also allows for proper formatting of {@code PortableObject#toString()} method,
+ * even when portable objects are kept in binary format only, which may be necessary for audit reasons.
+ */
+public interface BinaryType {
+ /**
+ * Gets portable type name.
+ *
+ * @return Portable type name.
+ */
+ public String typeName();
+
+ /**
+ * Gets collection of all field names for this portable type.
+ *
+ * @return Collection of all field names for this portable type.
+ */
+ public Collection<String> fields();
+
+ /**
+ * Gets name of the field type for a given field.
+ *
+ * @param fieldName Field name.
+ * @return Field type name.
+ */
+ public String fieldTypeName(String fieldName);
+
+ /**
+ * Portable objects can optionally specify custom key-affinity mapping in the
+ * configuration. This method returns the name of the field which should be
+ * used for the key-affinity mapping.
+ *
+ * @return Affinity key field name.
+ */
+ public String affinityKeyFieldName();
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeConfiguration.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeConfiguration.java
index 1df2c98..3a09a63 100644
--- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeConfiguration.java
@@ -41,6 +41,7 @@ public class BinaryTypeConfiguration {
private BinarySerializer serializer;
/** Meta data enabled flag. */
+ // TODO ignite-1282.
private Boolean metaDataEnabled;
/** Keep deserialized flag. */
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeMetadata.java b/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeMetadata.java
deleted file mode 100644
index 4a1749b..0000000
--- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryTypeMetadata.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.binary;
-
-import java.util.Collection;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Portable type meta data. Metadata for portable types can be accessed from any of the
- * {@link org.apache.ignite.IgniteObjects#metadata(String)} methods.
- * Having metadata also allows for proper formatting of {@code PortableObject#toString()} method,
- * even when portable objects are kept in binary format only, which may be necessary for audit reasons.
- */
-public interface BinaryTypeMetadata {
- /**
- * Gets portable type name.
- *
- * @return Portable type name.
- */
- public String typeName();
-
- /**
- * Gets collection of all field names for this portable type.
- *
- * @return Collection of all field names for this portable type.
- */
- public Collection<String> fields();
-
- /**
- * Gets name of the field type for a given field.
- *
- * @param fieldName Field name.
- * @return Field type name.
- */
- @Nullable public String fieldTypeName(String fieldName);
-
- /**
- * Portable objects can optionally specify custom key-affinity mapping in the
- * configuration. This method returns the name of the field which should be
- * used for the key-affinity mapping.
- *
- * @return Affinity key field name.
- */
- @Nullable public String affinityKeyFieldName();
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/binary/Binarylizable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/Binarylizable.java b/modules/core/src/main/java/org/apache/ignite/binary/Binarylizable.java
index b1a511e..d360fb7 100644
--- a/modules/core/src/main/java/org/apache/ignite/binary/Binarylizable.java
+++ b/modules/core/src/main/java/org/apache/ignite/binary/Binarylizable.java
@@ -27,7 +27,7 @@ package org.apache.ignite.binary;
* interface, which allows users to override default serialization logic,
* usually for performance reasons. The only difference here is that portable
* serialization is already very fast and implementing custom serialization
- * logic for portables does not provide significant performance gains.
+ * logic for binary does not provide significant performance gains.
*/
public interface Binarylizable {
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index fa1aaab..af0122f 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -883,19 +883,19 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* store implementation in some cases, but it can cause performance
* degradation due to additional serializations and deserializations
* of portable objects. You will also need to have key and value
- * classes on all nodes since portables will be deserialized when
+ * classes on all nodes since binary will be deserialized when
* store is called.
*
- * @return Keep portables in store flag.
+ * @return Keep binary in store flag.
*/
public Boolean isKeepPortableInStore() {
return keepPortableInStore;
}
/**
- * Sets keep portables in store flag.
+ * Sets keep binary in store flag.
*
- * @param keepPortableInStore Keep portables in store flag.
+ * @param keepPortableInStore Keep binary in store flag.
*/
public void setKeepPortableInStore(boolean keepPortableInStore) {
this.keepPortableInStore = keepPortableInStore;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index d5a8cc1..ba57415 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -64,7 +64,7 @@ import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteMessaging;
-import org.apache.ignite.IgniteObjects;
+import org.apache.ignite.IgniteBinary;
import org.apache.ignite.IgniteQueue;
import org.apache.ignite.IgniteScheduler;
import org.apache.ignite.IgniteServices;
@@ -2769,7 +2769,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
}
/** {@inheritDoc} */
- @Override public IgniteObjects portables() {
+ @Override public IgniteBinary binary() {
return ((CacheObjectPortableProcessor)ctx.cacheObjects()).portables();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
index c907779..e7255f9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/GridClientCompute.java
@@ -414,7 +414,7 @@ public interface GridClientCompute {
public GridClientFuture<List<GridClientNode>> refreshTopologyAsync(boolean includeAttrs, boolean includeMetrics);
/**
- * Sets keep portables flag for the next task execution in the current thread.
+ * Sets keep binary flag for the next task execution in the current thread.
*/
public GridClientCompute withKeepPortables();
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnection.java
index fedd15a..8bdb1d0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnection.java
@@ -313,7 +313,7 @@ public abstract class GridClientConnection {
* @param taskName Task name.
* @param arg Task argument.
* @param destNodeId Destination node ID.
- * @param keepPortables Keep portables flag.
+ * @param keepPortables Keep binary flag.
* @return Task execution result.
* @throws GridClientConnectionResetException In case of error.
* @throws GridClientClosedException If client was manually closed before request was sent over network.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
index f1a9af1..dedee10 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
@@ -483,7 +483,7 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
}
/**
- * @return Get thread local used to enable keep portables mode.
+ * @return Get thread local used to enable keep binary mode.
*/
protected ThreadLocal<Boolean> keepPortablesThreadLocal() {
return null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
index eee2858..24c9c70 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientNioTcpConnection.java
@@ -385,7 +385,7 @@ public class GridClientNioTcpConnection extends GridClientConnection {
*
* @param msg Message to request,
* @param destId Destination node identifier.
- * @param keepPortables Keep portables flag.
+ * @param keepPortables Keep binary flag.
* @return Response object.
* @throws GridClientConnectionResetException If request failed.
* @throws GridClientClosedException If client was closed.
@@ -1037,7 +1037,7 @@ public class GridClientNioTcpConnection extends GridClientConnection {
/** Flag indicating if connected message is a forwarded. */
private final boolean forward;
- /** Keep portables flag. */
+ /** Keep binary flag. */
private final boolean keepPortables;
/** Pending message for this future. */
@@ -1101,7 +1101,7 @@ public class GridClientNioTcpConnection extends GridClientConnection {
}
/**
- * @return Keep portables flag.
+ * @return Keep binary flag.
*/
public boolean keepPortables() {
return keepPortables;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
index 30d9d9d..18f538b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
@@ -29,7 +29,7 @@ import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryRawReader;
import org.apache.ignite.binary.BinaryRawWriter;
import org.apache.ignite.binary.BinaryReader;
@@ -39,7 +39,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Portable meta data implementation.
*/
-public class BinaryMetaDataImpl implements BinaryTypeMetadata, Binarylizable, Externalizable {
+public class BinaryMetaDataImpl implements BinaryType, Binarylizable, Externalizable {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectEx.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectEx.java
index 09bc17a..aadaca8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectEx.java
@@ -24,7 +24,7 @@ import org.apache.ignite.IgniteException;
import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory;
import org.apache.ignite.internal.util.typedef.internal.SB;
import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.jetbrains.annotations.Nullable;
@@ -160,7 +160,7 @@ public abstract class BinaryObjectEx implements BinaryObject {
private String toString(PortableReaderContext ctx, IdentityHashMap<BinaryObject, Integer> handles) {
int idHash = System.identityHashCode(this);
- BinaryTypeMetadata meta;
+ BinaryType meta;
try {
meta = metaData();
@@ -209,7 +209,7 @@ public abstract class BinaryObjectEx implements BinaryObject {
Integer idHash0 = handles.get(val);
if (idHash0 != null) { // Circular reference.
- BinaryTypeMetadata meta0 = po.metaData();
+ BinaryType meta0 = po.metaData();
assert meta0 != null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
index dc395d5..d533c22 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectImpl.java
@@ -30,7 +30,7 @@ import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;
import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryField;
import org.jetbrains.annotations.Nullable;
@@ -241,7 +241,7 @@ public final class BinaryObjectImpl extends BinaryObjectEx implements Externaliz
}
/** {@inheritDoc} */
- @Nullable @Override public BinaryTypeMetadata metaData() throws BinaryObjectException {
+ @Nullable @Override public BinaryType metaData() throws BinaryObjectException {
if (ctx == null)
throw new BinaryObjectException("PortableContext is not set for the object.");
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
index e3f8590..e588a95 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectOffheapImpl.java
@@ -31,7 +31,7 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;
import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryField;
import org.jetbrains.annotations.Nullable;
@@ -148,7 +148,7 @@ public class BinaryObjectOffheapImpl extends BinaryObjectEx implements Externali
}
/** {@inheritDoc} */
- @Nullable @Override public BinaryTypeMetadata metaData() throws BinaryObjectException {
+ @Nullable @Override public BinaryType metaData() throws BinaryObjectException {
if (ctx == null)
throw new BinaryObjectException("PortableContext is not set for the object.");
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index 7632e2a..dd185ff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -56,7 +56,7 @@ import org.apache.ignite.binary.BinaryTypeConfiguration;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.binary.BinaryTypeIdMapper;
import org.apache.ignite.binary.BinaryInvalidTypeException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.BinarySerializer;
import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.IgnitionEx;
@@ -813,7 +813,7 @@ public class PortableContext implements Externalizable {
* @return Meta data.
* @throws org.apache.ignite.binary.BinaryObjectException In case of error.
*/
- @Nullable public BinaryTypeMetadata metaData(int typeId) throws BinaryObjectException {
+ @Nullable public BinaryType metaData(int typeId) throws BinaryObjectException {
return metaHnd != null ? metaHnd.metadata(typeId) : null;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableMetaDataHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableMetaDataHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableMetaDataHandler.java
index f9f72d2..8b2eef2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableMetaDataHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableMetaDataHandler.java
@@ -18,7 +18,7 @@
package org.apache.ignite.internal.portable;
import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
/**
* Portable meta data handler.
@@ -31,7 +31,7 @@ public interface PortableMetaDataHandler {
* @param meta Meta data.
* @throws org.apache.ignite.binary.BinaryObjectException In case of error.
*/
- public void addMeta(int typeId, BinaryTypeMetadata meta) throws BinaryObjectException;
+ public void addMeta(int typeId, BinaryType meta) throws BinaryObjectException;
/**
* Gets meta data for provided type ID.
@@ -40,5 +40,5 @@ public interface PortableMetaDataHandler {
* @return Meta data.
* @throws org.apache.ignite.binary.BinaryObjectException In case of error.
*/
- public BinaryTypeMetadata metadata(int typeId) throws BinaryObjectException;
+ public BinaryType metadata(int typeId) throws BinaryObjectException;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
index 721134e..e6a68c1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
@@ -26,7 +26,7 @@ import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryObjectBuilder;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.binary.BinaryInvalidTypeException;
-import org.apache.ignite.binary.BinaryTypeMetadata;
+import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.internal.portable.BinaryObjectImpl;
import org.apache.ignite.internal.portable.BinaryObjectOffheapImpl;
import org.apache.ignite.internal.portable.BinaryWriterExImpl;
@@ -289,7 +289,7 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder {
if (assignedVals != null && (remainsFlds == null || !remainsFlds.isEmpty())) {
boolean metadataEnabled = ctx.isMetaDataEnabled(typeId);
- BinaryTypeMetadata metadata = null;
+ BinaryType metadata = null;
if (metadataEnabled)
metadata = ctx.metaData(typeId);
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectContext.java
index a35b3e1..d49a029 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectContext.java
@@ -198,7 +198,7 @@ import org.apache.ignite.internal.util.typedef.F;
}
/**
- * Unwraps set with portables.
+ * Unwraps set with binary.
*
* @param set Set to unwrap.
* @return Unwrapped set.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/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 ac67075..e244aa5 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
@@ -1752,7 +1752,7 @@ public class GridCacheContext<K, V> implements Externalizable {
}
/**
- * Unwraps object for portables.
+ * Unwraps object for binary.
*
* @param o Object to unwrap.
* @param keepPortable Keep portable flag.
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/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 2c9ff14..4155706 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
@@ -231,7 +231,7 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
* so keys and values will be returned from cache API methods without changes. Therefore,
* signature of the projection can contain only following types:
* <ul>
- * <li><code>org.gridgain.grid.portables.PortableObject</code> for portable classes</li>
+ * <li><code>org.gridgain.grid.binary.PortableObject</code> for portable classes</li>
* <li>All primitives (byte, int, ...) and there boxed versions (Byte, Integer, ...)</li>
* <li>Arrays of primitives (byte[], int[], ...)</li>
* <li>{@link String} and array of {@link String}s</li>
http://git-wip-us.apache.org/repos/asf/ignite/blob/2a1daa20/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index 637e51b..5aace6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -353,6 +353,8 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
if (cache == null)
return true;
+ U.debug(">>>> Running global remove all job: " + cache.name());
+
final GridCacheContext<K, V> ctx = cache.context();
ctx.gate().enter();