You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/11/11 11:29:22 UTC
[1/2] ignite git commit: IGNITE-1847: WIP.
Repository: ignite
Updated Branches:
refs/heads/ignite-1847 cda44011f -> 330144620
IGNITE-1847: WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/65edfbcf
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/65edfbcf
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/65edfbcf
Branch: refs/heads/ignite-1847
Commit: 65edfbcfd2db1effcc7bed734423940d5a20670a
Parents: cda4401
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Nov 11 13:29:28 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Nov 11 13:29:28 2015 +0300
----------------------------------------------------------------------
.../CacheObjectBinaryProcessorImpl.java | 44 +++++------
.../cache/portable/PortableMetaDataKey.java | 82 --------------------
.../cache/portable/PortableMetadataKey2.java | 82 ++++++++++++++++++++
3 files changed, 104 insertions(+), 104 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/65edfbcf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
index 5e794d9..d765197 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
@@ -110,7 +110,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
private final boolean clientNode;
/** */
- private volatile IgniteCacheProxy<PortableMetaDataKey, BinaryMetadata> metaDataCache;
+ private volatile IgniteCacheProxy<PortableMetadataKey2, BinaryMetadata> metaDataCache;
/** */
private final ConcurrentHashMap8<Integer, BinaryTypeImpl> clientMetaDataCache;
@@ -120,7 +120,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
private static final long serialVersionUID = 0L;
@Override public boolean apply(GridCacheEntryEx e) {
- return e.key().value(e.context().cacheObjectContext(), false) instanceof PortableMetaDataKey;
+ return e.key().value(e.context().cacheObjectContext(), false) instanceof PortableMetadataKey2;
}
};
@@ -238,7 +238,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
GridCacheQueryManager qryMgr = metaDataCache.context().queries();
- CacheQuery<Map.Entry<PortableMetaDataKey, BinaryMetadata>> qry =
+ CacheQuery<Map.Entry<PortableMetadataKey2, BinaryMetadata>> qry =
qryMgr.createScanQuery(new MetaDataPredicate(), null, false);
qry.keepAll(false);
@@ -246,9 +246,9 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
qry.projection(ctx.cluster().get().forNode(oldestSrvNode));
try {
- CacheQueryFuture<Map.Entry<PortableMetaDataKey, BinaryMetadata>> fut = qry.execute();
+ CacheQueryFuture<Map.Entry<PortableMetadataKey2, BinaryMetadata>> fut = qry.execute();
- Map.Entry<PortableMetaDataKey, BinaryMetadata> next;
+ Map.Entry<PortableMetadataKey2, BinaryMetadata> next;
while ((next = fut.next()) != null) {
assert next.getKey() != null : next;
@@ -294,7 +294,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
* @param key Metadata key.
* @param newMeta Metadata.
*/
- private void addClientCacheMetaData(PortableMetaDataKey key, final BinaryMetadata newMeta) {
+ private void addClientCacheMetaData(PortableMetadataKey2 key, final BinaryMetadata newMeta) {
int key0 = key.typeId();
clientMetaDataCache.compute(key0,
@@ -460,7 +460,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
BinaryMetadata newMeta0 = ((BinaryTypeImpl)newMeta).metadata();
- final PortableMetaDataKey key = new PortableMetaDataKey(typeId);
+ final PortableMetadataKey2 key = new PortableMetadataKey2(typeId);
try {
BinaryMetadata oldMeta = metaDataCache.localPeek(key);
@@ -483,7 +483,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
if (clientNode)
return clientMetaDataCache.get(typeId);
else {
- BinaryMetadata meta = metaDataCache.localPeek(new PortableMetaDataKey(typeId));
+ BinaryMetadata meta = metaDataCache.localPeek(new PortableMetadataKey2(typeId));
return meta != null ? meta.wrap(portableCtx) : null;
}
@@ -497,16 +497,16 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
@Override public Map<Integer, BinaryType> metadata(Collection<Integer> typeIds)
throws BinaryObjectException {
try {
- Collection<PortableMetaDataKey> keys = new ArrayList<>(typeIds.size());
+ Collection<PortableMetadataKey2> keys = new ArrayList<>(typeIds.size());
for (Integer typeId : typeIds)
- keys.add(new PortableMetaDataKey(typeId));
+ keys.add(new PortableMetadataKey2(typeId));
- Map<PortableMetaDataKey, BinaryMetadata> meta = metaDataCache.getAll(keys);
+ Map<PortableMetadataKey2, BinaryMetadata> meta = metaDataCache.getAll(keys);
Map<Integer, BinaryType> res = U.newHashMap(meta.size());
- for (Map.Entry<PortableMetaDataKey, BinaryMetadata> e : meta.entrySet())
+ for (Map.Entry<PortableMetadataKey2, BinaryMetadata> e : meta.entrySet())
res.put(e.getKey().typeId(), e.getValue().wrap(portableCtx));
return res;
@@ -527,10 +527,10 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
});
else {
return F.viewReadOnly(metaDataCache.entrySetx(metaPred),
- new C1<Cache.Entry<PortableMetaDataKey, BinaryMetadata>, BinaryType>() {
+ new C1<Cache.Entry<PortableMetadataKey2, BinaryMetadata>, BinaryType>() {
private static final long serialVersionUID = 0L;
- @Override public BinaryType apply(Cache.Entry<PortableMetaDataKey, BinaryMetadata> e) {
+ @Override public BinaryType apply(Cache.Entry<PortableMetadataKey2, BinaryMetadata> e) {
return e.getValue().wrap(portableCtx);
}
});
@@ -799,7 +799,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/**
*/
private static class MetaDataProcessor implements
- EntryProcessor<PortableMetaDataKey, BinaryMetadata, BinaryObjectException>, Externalizable {
+ EntryProcessor<PortableMetadataKey2, BinaryMetadata, BinaryObjectException>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
@@ -829,7 +829,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/** {@inheritDoc} */
@Override public BinaryObjectException process(
- MutableEntry<PortableMetaDataKey, BinaryMetadata> entry,
+ MutableEntry<PortableMetadataKey2, BinaryMetadata> entry,
Object... args) {
try {
BinaryMetadata oldMeta = entry.getValue();
@@ -873,15 +873,15 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/**
*
*/
- class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetaDataKey, BinaryMetadata> {
+ class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetadataKey2, BinaryMetadata> {
/** {@inheritDoc} */
@Override public void onUpdated(
- Iterable<CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryMetadata>> evts)
+ Iterable<CacheEntryEvent<? extends PortableMetadataKey2, ? extends BinaryMetadata>> evts)
throws CacheEntryListenerException {
- for (CacheEntryEvent<? extends PortableMetaDataKey, ? extends BinaryMetadata> evt : evts) {
+ for (CacheEntryEvent<? extends PortableMetadataKey2, ? extends BinaryMetadata> evt : evts) {
assert evt.getEventType() == EventType.CREATED || evt.getEventType() == EventType.UPDATED : evt;
- PortableMetaDataKey key = evt.getKey();
+ PortableMetadataKey2 key = evt.getKey();
final BinaryMetadata newMeta = evt.getValue();
@@ -906,7 +906,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/** {@inheritDoc} */
@Override public boolean evaluate(CacheEntryEvent<?, ?> evt) throws CacheEntryListenerException {
- return evt.getKey() instanceof PortableMetaDataKey;
+ return evt.getKey() instanceof PortableMetadataKey2;
}
/** {@inheritDoc} */
@@ -924,7 +924,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/** {@inheritDoc} */
@Override public boolean apply(Object key, Object val) {
- return key instanceof PortableMetaDataKey;
+ return key instanceof PortableMetadataKey2;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/65edfbcf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetaDataKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetaDataKey.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetaDataKey.java
deleted file mode 100644
index 2a98778..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetaDataKey.java
+++ /dev/null
@@ -1,82 +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.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import org.apache.ignite.internal.processors.cache.GridCacheUtilityKey;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- * Key for portable meta data.
- */
-class PortableMetaDataKey extends GridCacheUtilityKey<PortableMetaDataKey> implements Externalizable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** */
- private int typeId;
-
- /**
- * For {@link Externalizable}.
- */
- public PortableMetaDataKey() {
- // No-op.
- }
-
- /**
- * @param typeId Type ID.
- */
- PortableMetaDataKey(int typeId) {
- this.typeId = typeId;
- }
-
- /**
- * @return Type id.
- */
- public int typeId() {
- return typeId;
- }
-
- /** {@inheritDoc} */
- @Override public void writeExternal(ObjectOutput out) throws IOException {
- out.writeInt(typeId);
- }
-
- /** {@inheritDoc} */
- @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- typeId = in.readInt();
- }
-
- /** {@inheritDoc} */
- @Override protected boolean equalsx(PortableMetaDataKey key) {
- return typeId == key.typeId;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return typeId;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(PortableMetaDataKey.class, this);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/65edfbcf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java
new file mode 100644
index 0000000..4c99b70
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java
@@ -0,0 +1,82 @@
+/*
+ * 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.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.processors.cache.GridCacheUtilityKey;
+import org.apache.ignite.internal.util.typedef.internal.S;
+
+/**
+ * Key for portable meta data.
+ */
+class PortableMetadataKey2 extends GridCacheUtilityKey<PortableMetadataKey2> implements Externalizable {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** */
+ private int typeId;
+
+ /**
+ * For {@link Externalizable}.
+ */
+ public PortableMetadataKey2() {
+ // No-op.
+ }
+
+ /**
+ * @param typeId Type ID.
+ */
+ PortableMetadataKey2(int typeId) {
+ this.typeId = typeId;
+ }
+
+ /**
+ * @return Type id.
+ */
+ public int typeId() {
+ return typeId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeInt(typeId);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ typeId = in.readInt();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean equalsx(PortableMetadataKey2 key) {
+ return typeId == key.typeId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ return typeId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(PortableMetadataKey2.class, this);
+ }
+}
\ No newline at end of file
[2/2] ignite git commit: IGNITE-1847: WIP.
Posted by vo...@apache.org.
IGNITE-1847: WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/33014462
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/33014462
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/33014462
Branch: refs/heads/ignite-1847
Commit: 330144620aade982b592f1d323898a2892125347
Parents: 65edfbc
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Nov 11 13:29:35 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Nov 11 13:29:35 2015 +0300
----------------------------------------------------------------------
.../CacheObjectBinaryProcessorImpl.java | 44 +++++------
.../cache/portable/PortableMetadataKey.java | 82 ++++++++++++++++++++
.../cache/portable/PortableMetadataKey2.java | 82 --------------------
3 files changed, 104 insertions(+), 104 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/33014462/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
index d765197..05cfb5f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
@@ -110,7 +110,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
private final boolean clientNode;
/** */
- private volatile IgniteCacheProxy<PortableMetadataKey2, BinaryMetadata> metaDataCache;
+ private volatile IgniteCacheProxy<PortableMetadataKey, BinaryMetadata> metaDataCache;
/** */
private final ConcurrentHashMap8<Integer, BinaryTypeImpl> clientMetaDataCache;
@@ -120,7 +120,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
private static final long serialVersionUID = 0L;
@Override public boolean apply(GridCacheEntryEx e) {
- return e.key().value(e.context().cacheObjectContext(), false) instanceof PortableMetadataKey2;
+ return e.key().value(e.context().cacheObjectContext(), false) instanceof PortableMetadataKey;
}
};
@@ -238,7 +238,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
GridCacheQueryManager qryMgr = metaDataCache.context().queries();
- CacheQuery<Map.Entry<PortableMetadataKey2, BinaryMetadata>> qry =
+ CacheQuery<Map.Entry<PortableMetadataKey, BinaryMetadata>> qry =
qryMgr.createScanQuery(new MetaDataPredicate(), null, false);
qry.keepAll(false);
@@ -246,9 +246,9 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
qry.projection(ctx.cluster().get().forNode(oldestSrvNode));
try {
- CacheQueryFuture<Map.Entry<PortableMetadataKey2, BinaryMetadata>> fut = qry.execute();
+ CacheQueryFuture<Map.Entry<PortableMetadataKey, BinaryMetadata>> fut = qry.execute();
- Map.Entry<PortableMetadataKey2, BinaryMetadata> next;
+ Map.Entry<PortableMetadataKey, BinaryMetadata> next;
while ((next = fut.next()) != null) {
assert next.getKey() != null : next;
@@ -294,7 +294,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
* @param key Metadata key.
* @param newMeta Metadata.
*/
- private void addClientCacheMetaData(PortableMetadataKey2 key, final BinaryMetadata newMeta) {
+ private void addClientCacheMetaData(PortableMetadataKey key, final BinaryMetadata newMeta) {
int key0 = key.typeId();
clientMetaDataCache.compute(key0,
@@ -460,7 +460,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
BinaryMetadata newMeta0 = ((BinaryTypeImpl)newMeta).metadata();
- final PortableMetadataKey2 key = new PortableMetadataKey2(typeId);
+ final PortableMetadataKey key = new PortableMetadataKey(typeId);
try {
BinaryMetadata oldMeta = metaDataCache.localPeek(key);
@@ -483,7 +483,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
if (clientNode)
return clientMetaDataCache.get(typeId);
else {
- BinaryMetadata meta = metaDataCache.localPeek(new PortableMetadataKey2(typeId));
+ BinaryMetadata meta = metaDataCache.localPeek(new PortableMetadataKey(typeId));
return meta != null ? meta.wrap(portableCtx) : null;
}
@@ -497,16 +497,16 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
@Override public Map<Integer, BinaryType> metadata(Collection<Integer> typeIds)
throws BinaryObjectException {
try {
- Collection<PortableMetadataKey2> keys = new ArrayList<>(typeIds.size());
+ Collection<PortableMetadataKey> keys = new ArrayList<>(typeIds.size());
for (Integer typeId : typeIds)
- keys.add(new PortableMetadataKey2(typeId));
+ keys.add(new PortableMetadataKey(typeId));
- Map<PortableMetadataKey2, BinaryMetadata> meta = metaDataCache.getAll(keys);
+ Map<PortableMetadataKey, BinaryMetadata> meta = metaDataCache.getAll(keys);
Map<Integer, BinaryType> res = U.newHashMap(meta.size());
- for (Map.Entry<PortableMetadataKey2, BinaryMetadata> e : meta.entrySet())
+ for (Map.Entry<PortableMetadataKey, BinaryMetadata> e : meta.entrySet())
res.put(e.getKey().typeId(), e.getValue().wrap(portableCtx));
return res;
@@ -527,10 +527,10 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
});
else {
return F.viewReadOnly(metaDataCache.entrySetx(metaPred),
- new C1<Cache.Entry<PortableMetadataKey2, BinaryMetadata>, BinaryType>() {
+ new C1<Cache.Entry<PortableMetadataKey, BinaryMetadata>, BinaryType>() {
private static final long serialVersionUID = 0L;
- @Override public BinaryType apply(Cache.Entry<PortableMetadataKey2, BinaryMetadata> e) {
+ @Override public BinaryType apply(Cache.Entry<PortableMetadataKey, BinaryMetadata> e) {
return e.getValue().wrap(portableCtx);
}
});
@@ -799,7 +799,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/**
*/
private static class MetaDataProcessor implements
- EntryProcessor<PortableMetadataKey2, BinaryMetadata, BinaryObjectException>, Externalizable {
+ EntryProcessor<PortableMetadataKey, BinaryMetadata, BinaryObjectException>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
@@ -829,7 +829,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/** {@inheritDoc} */
@Override public BinaryObjectException process(
- MutableEntry<PortableMetadataKey2, BinaryMetadata> entry,
+ MutableEntry<PortableMetadataKey, BinaryMetadata> entry,
Object... args) {
try {
BinaryMetadata oldMeta = entry.getValue();
@@ -873,15 +873,15 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/**
*
*/
- class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetadataKey2, BinaryMetadata> {
+ class MetaDataEntryListener implements CacheEntryUpdatedListener<PortableMetadataKey, BinaryMetadata> {
/** {@inheritDoc} */
@Override public void onUpdated(
- Iterable<CacheEntryEvent<? extends PortableMetadataKey2, ? extends BinaryMetadata>> evts)
+ Iterable<CacheEntryEvent<? extends PortableMetadataKey, ? extends BinaryMetadata>> evts)
throws CacheEntryListenerException {
- for (CacheEntryEvent<? extends PortableMetadataKey2, ? extends BinaryMetadata> evt : evts) {
+ for (CacheEntryEvent<? extends PortableMetadataKey, ? extends BinaryMetadata> evt : evts) {
assert evt.getEventType() == EventType.CREATED || evt.getEventType() == EventType.UPDATED : evt;
- PortableMetadataKey2 key = evt.getKey();
+ PortableMetadataKey key = evt.getKey();
final BinaryMetadata newMeta = evt.getValue();
@@ -906,7 +906,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/** {@inheritDoc} */
@Override public boolean evaluate(CacheEntryEvent<?, ?> evt) throws CacheEntryListenerException {
- return evt.getKey() instanceof PortableMetadataKey2;
+ return evt.getKey() instanceof PortableMetadataKey;
}
/** {@inheritDoc} */
@@ -924,7 +924,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
/** {@inheritDoc} */
@Override public boolean apply(Object key, Object val) {
- return key instanceof PortableMetadataKey2;
+ return key instanceof PortableMetadataKey;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/33014462/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey.java
new file mode 100644
index 0000000..f838c82
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey.java
@@ -0,0 +1,82 @@
+/*
+ * 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.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.processors.cache.GridCacheUtilityKey;
+import org.apache.ignite.internal.util.typedef.internal.S;
+
+/**
+ * Key for portable meta data.
+ */
+class PortableMetadataKey extends GridCacheUtilityKey<PortableMetadataKey> implements Externalizable {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** */
+ private int typeId;
+
+ /**
+ * For {@link Externalizable}.
+ */
+ public PortableMetadataKey() {
+ // No-op.
+ }
+
+ /**
+ * @param typeId Type ID.
+ */
+ PortableMetadataKey(int typeId) {
+ this.typeId = typeId;
+ }
+
+ /**
+ * @return Type id.
+ */
+ public int typeId() {
+ return typeId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeInt(typeId);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ typeId = in.readInt();
+ }
+
+ /** {@inheritDoc} */
+ @Override protected boolean equalsx(PortableMetadataKey key) {
+ return typeId == key.typeId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ return typeId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(PortableMetadataKey.class, this);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/33014462/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java
deleted file mode 100644
index 4c99b70..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/PortableMetadataKey2.java
+++ /dev/null
@@ -1,82 +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.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import org.apache.ignite.internal.processors.cache.GridCacheUtilityKey;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- * Key for portable meta data.
- */
-class PortableMetadataKey2 extends GridCacheUtilityKey<PortableMetadataKey2> implements Externalizable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** */
- private int typeId;
-
- /**
- * For {@link Externalizable}.
- */
- public PortableMetadataKey2() {
- // No-op.
- }
-
- /**
- * @param typeId Type ID.
- */
- PortableMetadataKey2(int typeId) {
- this.typeId = typeId;
- }
-
- /**
- * @return Type id.
- */
- public int typeId() {
- return typeId;
- }
-
- /** {@inheritDoc} */
- @Override public void writeExternal(ObjectOutput out) throws IOException {
- out.writeInt(typeId);
- }
-
- /** {@inheritDoc} */
- @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- typeId = in.readInt();
- }
-
- /** {@inheritDoc} */
- @Override protected boolean equalsx(PortableMetadataKey2 key) {
- return typeId == key.typeId;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return typeId;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(PortableMetadataKey2.class, this);
- }
-}
\ No newline at end of file