ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [13/66] [abbrv] ignite git commit: IGNITE-950 - Renaming.
Date Thu, 05 Nov 2015 03:28:05 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataCollector.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataCollector.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataCollector.java
deleted file mode 100644
index 5bce7c7..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataCollector.java
+++ /dev/null
@@ -1,263 +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.portable;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-import org.apache.ignite.igniteobject.IgniteObjectException;
-import org.apache.ignite.igniteobject.IgniteObjectRawWriter;
-import org.apache.ignite.igniteobject.IgniteObjectWriter;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Writer for meta data collection.
- */
-class IgniteObjectMetaDataCollector implements IgniteObjectWriter {
-    /** */
-    private final Map<String, String> meta = new HashMap<>();
-
-    /** */
-    private final String typeName;
-
-    /**
-     * @param typeName Type name.
-     */
-    IgniteObjectMetaDataCollector(String typeName) {
-        this.typeName = typeName;
-    }
-
-    /**
-     * @return Field meta data.
-     */
-    Map<String, String> meta() {
-        return meta;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeByte(String fieldName, byte val) throws IgniteObjectException
{
-        add(fieldName, byte.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeShort(String fieldName, short val) throws IgniteObjectException
{
-        add(fieldName, short.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeInt(String fieldName, int val) throws IgniteObjectException
{
-        add(fieldName, int.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeLong(String fieldName, long val) throws IgniteObjectException
{
-        add(fieldName, long.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeFloat(String fieldName, float val) throws IgniteObjectException
{
-        add(fieldName, float.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeDouble(String fieldName, double val) throws IgniteObjectException
{
-        add(fieldName, double.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeChar(String fieldName, char val) throws IgniteObjectException
{
-        add(fieldName, char.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeBoolean(String fieldName, boolean val) throws IgniteObjectException
{
-        add(fieldName, boolean.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeDecimal(String fieldName, @Nullable BigDecimal val) throws
IgniteObjectException {
-        add(fieldName, PortableClassDescriptor.Mode.DECIMAL.typeName());
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeString(String fieldName, @Nullable String val) throws IgniteObjectException
{
-        add(fieldName, String.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeUuid(String fieldName, @Nullable UUID val) throws IgniteObjectException
{
-        add(fieldName, UUID.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeDate(String fieldName, @Nullable Date val) throws IgniteObjectException
{
-        add(fieldName, Date.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeTimestamp(String fieldName, @Nullable Timestamp val) throws
IgniteObjectException {
-        add(fieldName, Timestamp.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <T extends Enum<?>> void writeEnum(String fieldName, T val)
throws IgniteObjectException {
-        add(fieldName, Enum.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <T extends Enum<?>> void writeEnumArray(String fieldName,
T[] val) throws IgniteObjectException {
-        add(fieldName, Enum[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeObject(String fieldName, @Nullable Object obj) throws IgniteObjectException
{
-        add(fieldName, Object.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeByteArray(String fieldName, @Nullable byte[] val) throws IgniteObjectException
{
-        add(fieldName, byte[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeShortArray(String fieldName, @Nullable short[] val) throws
IgniteObjectException {
-        add(fieldName, short[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeIntArray(String fieldName, @Nullable int[] val) throws IgniteObjectException
{
-        add(fieldName, int[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeLongArray(String fieldName, @Nullable long[] val) throws IgniteObjectException
{
-        add(fieldName, long[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeFloatArray(String fieldName, @Nullable float[] val) throws
IgniteObjectException {
-        add(fieldName, float[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeDoubleArray(String fieldName, @Nullable double[] val) throws
IgniteObjectException {
-        add(fieldName, double[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeCharArray(String fieldName, @Nullable char[] val) throws IgniteObjectException
{
-        add(fieldName, char[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeBooleanArray(String fieldName, @Nullable boolean[] val) throws
IgniteObjectException {
-        add(fieldName, boolean[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeDecimalArray(String fieldName, @Nullable BigDecimal[] val)
throws IgniteObjectException {
-        add(fieldName, PortableClassDescriptor.Mode.DECIMAL_ARR.typeName());
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeStringArray(String fieldName, @Nullable String[] val) throws
IgniteObjectException {
-        add(fieldName, String[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeUuidArray(String fieldName, @Nullable UUID[] val) throws IgniteObjectException
{
-        add(fieldName, UUID[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeDateArray(String fieldName, @Nullable Date[] val) throws IgniteObjectException
{
-        add(fieldName, Date[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeTimestampArray(String fieldName, @Nullable Timestamp[] val)
throws IgniteObjectException {
-        add(fieldName, Timestamp[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeObjectArray(String fieldName, @Nullable Object[] val) throws
IgniteObjectException {
-        add(fieldName, Object[].class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <T> void writeCollection(String fieldName, @Nullable Collection<T>
col)
-        throws IgniteObjectException {
-        add(fieldName, Collection.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <K, V> void writeMap(String fieldName, @Nullable Map<K, V>
map) throws IgniteObjectException {
-        add(fieldName, Map.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteObjectRawWriter rawWriter() {
-        return (IgniteObjectRawWriter)Proxy.newProxyInstance(getClass().getClassLoader(),
-            new Class<?>[] { IgniteObjectRawWriterEx.class },
-            new InvocationHandler() {
-                @Override public Object invoke(Object proxy, Method mtd, Object[] args) throws
Throwable {
-                    return null;
-                }
-            });
-    }
-
-    /**
-     * @param name Field name.
-     * @param fieldType Field type.
-     * @throws org.apache.ignite.igniteobject.IgniteObjectException In case of error.
-     */
-    private void add(String name, Class<?> fieldType) throws IgniteObjectException
{
-        assert fieldType != null;
-
-        add(name, fieldType.getSimpleName());
-    }
-
-    /**
-     * @param name Field name.
-     * @param fieldTypeName Field type name.
-     * @throws org.apache.ignite.igniteobject.IgniteObjectException In case of error.
-     */
-    private void add(String name, String fieldTypeName) throws IgniteObjectException {
-        assert name != null;
-
-        String oldFieldTypeName = meta.put(name, fieldTypeName);
-
-        if (oldFieldTypeName != null && !oldFieldTypeName.equals(fieldTypeName))
{
-            throw new IgniteObjectException(
-                "Field is written twice with different types [" +
-                "typeName=" + typeName +
-                ", fieldName=" + name +
-                ", fieldTypeName1=" + oldFieldTypeName +
-                ", fieldTypeName2=" + fieldTypeName +
-                ']'
-            );
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataImpl.java
deleted file mode 100644
index b28fccb..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectMetaDataImpl.java
+++ /dev/null
@@ -1,150 +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.portable;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.igniteobject.IgniteObjectException;
-import org.apache.ignite.igniteobject.IgniteObjectMarshalAware;
-import org.apache.ignite.igniteobject.IgniteObjectMetadata;
-import org.apache.ignite.igniteobject.IgniteObjectRawReader;
-import org.apache.ignite.igniteobject.IgniteObjectRawWriter;
-import org.apache.ignite.igniteobject.IgniteObjectReader;
-import org.apache.ignite.igniteobject.IgniteObjectWriter;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Portable meta data implementation.
- */
-public class IgniteObjectMetaDataImpl implements IgniteObjectMetadata, IgniteObjectMarshalAware,
Externalizable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** */
-    private String typeName;
-
-    /** */
-    @GridToStringInclude
-    private Map<String, String> fields;
-
-    /** */
-    private volatile Map<Integer, String> fldIdToName;
-
-    /** */
-    private String affKeyFieldName;
-
-    /**
-     * For {@link Externalizable}.
-     */
-    public IgniteObjectMetaDataImpl() {
-        // No-op.
-    }
-
-    /**
-     * @param typeName Type name.
-     * @param fields Fields map.
-     * @param affKeyFieldName Affinity key field name.
-     */
-    public IgniteObjectMetaDataImpl(String typeName, @Nullable Map<String, String>
fields,
-        @Nullable String affKeyFieldName) {
-        assert typeName != null;
-
-        this.typeName = typeName;
-        this.fields = fields;
-        this.affKeyFieldName = affKeyFieldName;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String typeName() {
-        return typeName;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Collection<String> fields() {
-        return fields != null ? fields.keySet() : Collections.<String>emptyList();
-    }
-
-    /**
-     * @return Fields.
-     */
-    public Map<String, String> fields0() {
-        return fields != null ? fields : Collections.<String, String>emptyMap();
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public String fieldTypeName(String fieldName) {
-        return fields != null ? fields.get(fieldName) : null;
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public String affinityKeyFieldName() {
-        return affKeyFieldName;
-    }
-
-    /**
-     * @return Fields meta data.
-     */
-    public Map<String, String> fieldsMeta() {
-        return fields != null ? fields : Collections.<String, String>emptyMap();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        U.writeString(out, typeName);
-        U.writeMap(out, fields);
-        U.writeString(out, affKeyFieldName);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-        typeName = U.readString(in);
-        fields = U.readMap(in);
-        affKeyFieldName = U.readString(in);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(IgniteObjectWriter writer) throws IgniteObjectException
{
-        IgniteObjectRawWriter raw = writer.rawWriter();
-
-        raw.writeString(typeName);
-        raw.writeString(affKeyFieldName);
-        raw.writeMap(fields);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(IgniteObjectReader reader) throws IgniteObjectException
{
-        IgniteObjectRawReader raw = reader.rawReader();
-
-        typeName = raw.readString();
-        affKeyFieldName = raw.readString();
-        fields = raw.readMap();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(IgniteObjectMetaDataImpl.class, this);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectOffheapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectOffheapImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectOffheapImpl.java
deleted file mode 100644
index d54fd0a..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectOffheapImpl.java
+++ /dev/null
@@ -1,304 +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.portable;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.nio.ByteBuffer;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.portable.streams.PortableOffheapInputStream;
-import org.apache.ignite.internal.processors.cache.CacheObject;
-import org.apache.ignite.internal.processors.cache.CacheObjectContext;
-import org.apache.ignite.internal.util.GridUnsafe;
-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.igniteobject.IgniteObjectException;
-import org.apache.ignite.igniteobject.IgniteObjectMetadata;
-import org.apache.ignite.igniteobject.IgniteObject;
-import org.apache.ignite.portable.PortableField;
-import org.jetbrains.annotations.Nullable;
-import sun.misc.Unsafe;
-
-/**
- *  Portable object implementation over offheap memory
- */
-public class IgniteObjectOffheapImpl extends IgniteObjectEx implements Externalizable, CacheObject
{
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** */
-    private static final Unsafe UNSAFE = GridUnsafe.unsafe();
-
-    /** */
-    private final PortableContext ctx;
-
-    /** */
-    private final long ptr;
-
-    /** */
-    private final int start;
-
-    /** */
-    private final int size;
-
-    /**
-     * For {@link Externalizable} (not supported).
-     */
-    public IgniteObjectOffheapImpl() {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * @param ctx Context.
-     * @param ptr Memory address.
-     * @param start Object start.
-     * @param size Memory size.
-     */
-    public IgniteObjectOffheapImpl(PortableContext ctx, long ptr, int start, int size) {
-        this.ctx = ctx;
-        this.ptr = ptr;
-        this.start = start;
-        this.size = size;
-    }
-
-    /**
-     * @return Heap-based copy.
-     */
-    public IgniteObject heapCopy() {
-        return new IgniteObjectImpl(ctx, U.copyMemory(ptr, size), start);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int typeId() {
-        return UNSAFE.getInt(ptr + start + GridPortableMarshaller.TYPE_ID_POS);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int length() {
-        return UNSAFE.getInt(ptr + start + GridPortableMarshaller.TOTAL_LEN_POS);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        return UNSAFE.getInt(ptr + start + GridPortableMarshaller.HASH_CODE_POS);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int schemaId() {
-        return UNSAFE.getInt(ptr + start + GridPortableMarshaller.SCHEMA_ID_POS);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected PortableSchema createSchema() {
-        IgniteObjectReaderExImpl reader = new IgniteObjectReaderExImpl(ctx,
-            new PortableOffheapInputStream(ptr, size, false),
-            start,
-            null);
-
-        return reader.createSchema();
-    }
-
-    /** {@inheritDoc} */
-    @Override public PortableField fieldDescriptor(String fieldName) throws IgniteObjectException
{
-        int typeId = typeId();
-
-        PortableSchemaRegistry schemaReg = ctx.schemaRegistry(typeId);
-
-        int fieldId = ctx.userTypeIdMapper(typeId).fieldId(typeId, fieldName);
-
-        return new PortableFieldImpl(schemaReg, fieldId);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int start() {
-        return start;
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte[] array() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long offheapAddress() {
-        return ptr;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean hasArray() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public IgniteObjectMetadata metaData() throws IgniteObjectException
{
-        if (ctx == null)
-            throw new IgniteObjectException("PortableContext is not set for the object.");
-
-        return ctx.metaData(typeId());
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable @Override public <F> F field(String fieldName) throws IgniteObjectException
{
-        IgniteObjectReaderExImpl reader = new IgniteObjectReaderExImpl(ctx,
-            new PortableOffheapInputStream(ptr, size, false),
-            start,
-            null);
-
-        return (F)reader.unmarshalField(fieldName);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable @Override public <F> F field(int fieldId) throws IgniteObjectException
{
-        IgniteObjectReaderExImpl reader = new IgniteObjectReaderExImpl(ctx,
-            new PortableOffheapInputStream(ptr, size, false),
-            start,
-            null);
-
-        return (F)reader.unmarshalField(fieldId);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable @Override protected <F> F fieldByOffset(int fieldOffset) {
-        IgniteObjectReaderExImpl reader = new IgniteObjectReaderExImpl(ctx,
-            new PortableOffheapInputStream(ptr, size, false),
-            start,
-            null);
-
-        return (F)reader.unmarshalFieldByOffset(fieldOffset);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable @Override protected <F> F field(PortableReaderContext rCtx, String fieldName)
{
-        IgniteObjectReaderExImpl reader = new IgniteObjectReaderExImpl(ctx,
-            new PortableOffheapInputStream(ptr, size, false),
-            start,
-            null,
-            rCtx);
-
-        return (F)reader.unmarshalField(fieldName);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasField(String fieldName) {
-        IgniteObjectReaderExImpl reader = new IgniteObjectReaderExImpl(ctx,
-            new PortableOffheapInputStream(ptr, size, false),
-            start,
-            null);
-
-        return reader.hasField(fieldName);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable @Override public <T> T deserialize() throws IgniteObjectException {
-        return (T)deserializeValue();
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("CloneDoesntCallSuperClone")
-    @Override public IgniteObject clone() throws CloneNotSupportedException {
-        return heapCopy();
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte type() {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isPlatformType() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Nullable @Override public <T> T value(CacheObjectContext ctx, boolean cpy) {
-        return (T)deserializeValue();
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte[] valueBytes(CacheObjectContext ctx) throws IgniteCheckedException
{
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheObject prepareForCache(CacheObjectContext ctx) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void finishUnmarshal(CacheObjectContext ctx, ClassLoader ldr) throws
IgniteCheckedException {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void prepareMarshal(CacheObjectContext ctx) throws IgniteCheckedException
{
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte directType() {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte fieldsCount() {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        throw new UnsupportedOperationException(); // To make sure it is not marshalled.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-        throw new UnsupportedOperationException(); // To make sure it is not marshalled.
-    }
-
-    /**
-     * @return Deserialized value.
-     */
-    private Object deserializeValue() {
-        // TODO: IGNITE-1272 - Deserialize with proper class loader.
-        IgniteObjectReaderExImpl reader = new IgniteObjectReaderExImpl(
-            ctx,
-            new PortableOffheapInputStream(ptr, size, false),
-            start,
-            null);
-
-        return reader.deserialize();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawReaderEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawReaderEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawReaderEx.java
deleted file mode 100644
index 8157178..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawReaderEx.java
+++ /dev/null
@@ -1,33 +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.portable;
-
-import org.apache.ignite.igniteobject.IgniteObjectException;
-import org.apache.ignite.igniteobject.IgniteObjectRawReader;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Extended reader interface.
- */
-public interface IgniteObjectRawReaderEx extends IgniteObjectRawReader {
-    /**
-     * @return Object.
-     * @throws org.apache.ignite.igniteobject.IgniteObjectException In case of error.
-     */
-    @Nullable public Object readObjectDetached() throws IgniteObjectException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/20f5b9cd/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawWriterEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawWriterEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawWriterEx.java
deleted file mode 100644
index 112607c..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/IgniteObjectRawWriterEx.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.internal.portable;
-
-import org.apache.ignite.internal.portable.streams.PortableOutputStream;
-import org.apache.ignite.igniteobject.IgniteObjectException;
-import org.apache.ignite.igniteobject.IgniteObjectRawWriter;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Extended writer interface.
- */
-public interface IgniteObjectRawWriterEx extends IgniteObjectRawWriter, AutoCloseable {
-    /**
-     * @param obj Object to write.
-     * @throws org.apache.ignite.igniteobject.IgniteObjectException In case of error.
-     */
-    public void writeObjectDetached(@Nullable Object obj) throws IgniteObjectException;
-
-    /**
-     * @return Output stream.
-     */
-    public PortableOutputStream out();
-
-    /**
-     * Cleans resources.
-     */
-    @Override public void close();
-
-    /**
-     * Reserve a room for an integer.
-     *
-     * @return Position in the stream where value is to be written.
-     */
-    public int reserveInt();
-
-    /**
-     * Write int value at the specific position.
-     *
-     * @param pos Position.
-     * @param val Value.
-     * @throws org.apache.ignite.igniteobject.IgniteObjectException If failed.
-     */
-    public void writeInt(int pos, int val) throws IgniteObjectException;
-}
\ No newline at end of file


Mime
View raw message