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/10/30 13:46:57 UTC
ignite git commit: ignite-950-new - Fixed compilation.
Repository: ignite
Updated Branches:
refs/heads/ignite-950-new 9d1d7238c -> 68e40f38e
ignite-950-new - Fixed compilation.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/68e40f38
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/68e40f38
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/68e40f38
Branch: refs/heads/ignite-950-new
Commit: 68e40f38e875523cef7d540b41f9bdca780bade8
Parents: 9d1d723
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Oct 30 15:46:33 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Oct 30 15:46:33 2015 +0300
----------------------------------------------------------------------
.../internal/portable/PortableContext.java | 7 +-
.../ignite/portable/PortableRawReader.java | 240 -------------------
.../ignite/portable/PortableRawWriter.java | 225 -----------------
3 files changed, 5 insertions(+), 467 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/68e40f38/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 2822441..471781c 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
@@ -57,6 +57,7 @@ import org.apache.ignite.internal.IgnitionEx;
import org.apache.ignite.internal.processors.cache.portable.CacheObjectPortableProcessorImpl;
import org.apache.ignite.internal.util.GridConcurrentHashSet;
import org.apache.ignite.internal.util.lang.GridMapEntry;
+import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.T2;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteBiTuple;
@@ -308,8 +309,10 @@ public class PortableContext implements Externalizable {
Map<String, String> affFields = new HashMap<>();
- for (CacheKeyConfiguration keyCfg : igniteCfg.getCacheKeyConfiguration())
- affFields.put(keyCfg.getTypeName(), keyCfg.getAffinityKeyFieldName());
+ if (!F.isEmpty(igniteCfg.getCacheKeyConfiguration())) {
+ for (CacheKeyConfiguration keyCfg : igniteCfg.getCacheKeyConfiguration())
+ affFields.put(keyCfg.getTypeName(), keyCfg.getAffinityKeyFieldName());
+ }
if (typeCfgs != null) {
for (IgniteObjectConfiguration typeCfg : typeCfgs) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/68e40f38/modules/core/src/main/java/org/apache/ignite/portable/PortableRawReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portable/PortableRawReader.java b/modules/core/src/main/java/org/apache/ignite/portable/PortableRawReader.java
deleted file mode 100644
index 4b3dc4c..0000000
--- a/modules/core/src/main/java/org/apache/ignite/portable/PortableRawReader.java
+++ /dev/null
@@ -1,240 +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.portable;
-
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Map;
-import java.util.UUID;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Raw reader for portable objects. Raw reader does not use field name hash codes, therefore,
- * making the format even more compact. However, if the raw reader is used,
- * dynamic structure changes to the portable objects are not supported.
- */
-public interface PortableRawReader {
- /**
- * @return Byte value.
- * @throws PortableException In case of error.
- */
- public byte readByte() throws PortableException;
-
- /**
- * @return Short value.
- * @throws PortableException In case of error.
- */
- public short readShort() throws PortableException;
-
- /**
- * @return Integer value.
- * @throws PortableException In case of error.
- */
- public int readInt() throws PortableException;
-
- /**
- * @return Long value.
- * @throws PortableException In case of error.
- */
- public long readLong() throws PortableException;
-
- /**
- * @return Float value.
- * @throws PortableException In case of error.
- */
- public float readFloat() throws PortableException;
-
- /**
- * @return Double value.
- * @throws PortableException In case of error.
- */
- public double readDouble() throws PortableException;
-
- /**
- * @return Char value.
- * @throws PortableException In case of error.
- */
- public char readChar() throws PortableException;
-
- /**
- * @return Boolean value.
- * @throws PortableException In case of error.
- */
- public boolean readBoolean() throws PortableException;
-
- /**
- * @return Decimal value.
- * @throws PortableException In case of error.
- */
- @Nullable public BigDecimal readDecimal() throws PortableException;
-
- /**
- * @return String value.
- * @throws PortableException In case of error.
- */
- @Nullable public String readString() throws PortableException;
-
- /**
- * @return UUID.
- * @throws PortableException In case of error.
- */
- @Nullable public UUID readUuid() throws PortableException;
-
- /**
- * @return Date.
- * @throws PortableException In case of error.
- */
- @Nullable public Date readDate() throws PortableException;
-
- /**
- * @return Timestamp.
- * @throws PortableException In case of error.
- */
- @Nullable public Timestamp readTimestamp() throws PortableException;
-
- /**
- * @return Object.
- * @throws PortableException In case of error.
- */
- @Nullable public <T> T readObject() throws PortableException;
-
- /**
- * @return Byte array.
- * @throws PortableException In case of error.
- */
- @Nullable public byte[] readByteArray() throws PortableException;
-
- /**
- * @return Short array.
- * @throws PortableException In case of error.
- */
- @Nullable public short[] readShortArray() throws PortableException;
-
- /**
- * @return Integer array.
- * @throws PortableException In case of error.
- */
- @Nullable public int[] readIntArray() throws PortableException;
-
- /**
- * @return Long array.
- * @throws PortableException In case of error.
- */
- @Nullable public long[] readLongArray() throws PortableException;
-
- /**
- * @return Float array.
- * @throws PortableException In case of error.
- */
- @Nullable public float[] readFloatArray() throws PortableException;
-
- /**
- * @return Byte array.
- * @throws PortableException In case of error.
- */
- @Nullable public double[] readDoubleArray() throws PortableException;
-
- /**
- * @return Char array.
- * @throws PortableException In case of error.
- */
- @Nullable public char[] readCharArray() throws PortableException;
-
- /**
- * @return Boolean array.
- * @throws PortableException In case of error.
- */
- @Nullable public boolean[] readBooleanArray() throws PortableException;
-
- /**
- * @return Decimal array.
- * @throws PortableException In case of error.
- */
- @Nullable public BigDecimal[] readDecimalArray() throws PortableException;
-
- /**
- * @return String array.
- * @throws PortableException In case of error.
- */
- @Nullable public String[] readStringArray() throws PortableException;
-
- /**
- * @return UUID array.
- * @throws PortableException In case of error.
- */
- @Nullable public UUID[] readUuidArray() throws PortableException;
-
- /**
- * @return Date array.
- * @throws PortableException In case of error.
- */
- @Nullable public Date[] readDateArray() throws PortableException;
-
- /**
- * @return Timestamp array.
- * @throws PortableException In case of error.
- */
- @Nullable public Timestamp[] readTimestampArray() throws PortableException;
-
- /**
- * @return Object array.
- * @throws PortableException In case of error.
- */
- @Nullable public Object[] readObjectArray() throws PortableException;
-
- /**
- * @return Collection.
- * @throws PortableException In case of error.
- */
- @Nullable public <T> Collection<T> readCollection() throws PortableException;
-
- /**
- * @param colCls Collection class.
- * @return Collection.
- * @throws PortableException In case of error.
- */
- @Nullable public <T> Collection<T> readCollection(Class<? extends Collection<T>> colCls)
- throws PortableException;
-
- /**
- * @return Map.
- * @throws PortableException In case of error.
- */
- @Nullable public <K, V> Map<K, V> readMap() throws PortableException;
-
- /**
- * @param mapCls Map class.
- * @return Map.
- * @throws PortableException In case of error.
- */
- @Nullable public <K, V> Map<K, V> readMap(Class<? extends Map<K, V>> mapCls) throws PortableException;
-
- /**
- * @return Value.
- * @throws PortableException In case of error.
- */
- @Nullable public <T extends Enum<?>> T readEnum() throws PortableException;
-
- /**
- * @return Value.
- * @throws PortableException In case of error.
- */
- @Nullable public <T extends Enum<?>> T[] readEnumArray() throws PortableException;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/68e40f38/modules/core/src/main/java/org/apache/ignite/portable/PortableRawWriter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portable/PortableRawWriter.java b/modules/core/src/main/java/org/apache/ignite/portable/PortableRawWriter.java
deleted file mode 100644
index 245f755..0000000
--- a/modules/core/src/main/java/org/apache/ignite/portable/PortableRawWriter.java
+++ /dev/null
@@ -1,225 +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.portable;
-
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Map;
-import java.util.UUID;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Raw writer for portable object. Raw writer does not write field name hash codes, therefore,
- * making the format even more compact. However, if the raw writer is used,
- * dynamic structure changes to the portable objects are not supported.
- */
-public interface PortableRawWriter {
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeByte(byte val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeShort(short val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeInt(int val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeLong(long val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeFloat(float val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeDouble(double val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeChar(char val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeBoolean(boolean val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeDecimal(@Nullable BigDecimal val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeString(@Nullable String val) throws PortableException;
-
- /**
- * @param val UUID to write.
- * @throws PortableException In case of error.
- */
- public void writeUuid(@Nullable UUID val) throws PortableException;
-
- /**
- * @param val Date to write.
- * @throws PortableException In case of error.
- */
- public void writeDate(@Nullable Date val) throws PortableException;
-
- /**
- * @param val Timestamp to write.
- * @throws PortableException In case of error.
- */
- public void writeTimestamp(@Nullable Timestamp val) throws PortableException;
-
- /**
- * @param obj Value to write.
- * @throws PortableException In case of error.
- */
- public void writeObject(@Nullable Object obj) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeByteArray(@Nullable byte[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeShortArray(@Nullable short[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeIntArray(@Nullable int[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeLongArray(@Nullable long[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeFloatArray(@Nullable float[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeDoubleArray(@Nullable double[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeCharArray(@Nullable char[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeBooleanArray(@Nullable boolean[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeDecimalArray(@Nullable BigDecimal[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeStringArray(@Nullable String[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeUuidArray(@Nullable UUID[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeDateArray(@Nullable Date[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeTimestampArray(@Nullable Timestamp[] val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public void writeObjectArray(@Nullable Object[] val) throws PortableException;
-
- /**
- * @param col Collection to write.
- * @throws PortableException In case of error.
- */
- public <T> void writeCollection(@Nullable Collection<T> col) throws PortableException;
-
- /**
- * @param map Map to write.
- * @throws PortableException In case of error.
- */
- public <K, V> void writeMap(@Nullable Map<K, V> map) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public <T extends Enum<?>> void writeEnum(T val) throws PortableException;
-
- /**
- * @param val Value to write.
- * @throws PortableException In case of error.
- */
- public <T extends Enum<?>> void writeEnumArray(T[] val) throws PortableException;
-}
\ No newline at end of file