http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/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 new file mode 100644 index 0000000..014b487 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteObjectsImpl.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.IgniteObjects; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor; +import org.apache.ignite.igniteobject.IgniteObjectBuilder; +import org.apache.ignite.igniteobject.IgniteObjectException; +import org.apache.ignite.igniteobject.IgniteObjectMetadata; +import org.apache.ignite.igniteobject.IgniteObject; +import org.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 IgniteObjectException { + guard(); + + try { + return (T)proc.marshalToPortable(obj); + } + finally { + unguard(); + } + } + + /** {@inheritDoc} */ + @Override public IgniteObjectBuilder builder(int typeId) { + guard(); + + try { + return proc.builder(typeId); + } + finally { + unguard(); + } + } + + /** {@inheritDoc} */ + @Override public IgniteObjectBuilder builder(String typeName) { + guard(); + + try { + return proc.builder(typeName); + } + finally { + unguard(); + } + } + + /** {@inheritDoc} */ + @Override public IgniteObjectBuilder builder(IgniteObject portableObj) { + guard(); + + try { + return proc.builder(portableObj); + } + finally { + unguard(); + } + } + + /** {@inheritDoc} */ + @Nullable @Override public IgniteObjectMetadata metadata(Class<?> cls) throws IgniteObjectException { + guard(); + + try { + return proc.metadata(proc.typeId(cls.getName())); + } + finally { + unguard(); + } + } + + /** {@inheritDoc} */ + @Nullable @Override public IgniteObjectMetadata metadata(String typeName) throws IgniteObjectException { + guard(); + + try { + return proc.metadata(proc.typeId(typeName)); + } + finally { + unguard(); + } + } + + /** {@inheritDoc} */ + @Nullable @Override public IgniteObjectMetadata metadata(int typeId) throws IgniteObjectException { + guard(); + + try { + return proc.metadata(typeId); + } + finally { + unguard(); + } + } + + /** {@inheritDoc} */ + @Override public Collection<IgniteObjectMetadata> metadata() throws IgniteObjectException { + 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/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgnitePortablesImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgnitePortablesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgnitePortablesImpl.java deleted file mode 100644 index 5ed6505..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgnitePortablesImpl.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.IgnitePortables; -import org.apache.ignite.internal.GridKernalContext; -import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor; -import org.apache.ignite.portable.PortableBuilder; -import org.apache.ignite.portable.PortableException; -import org.apache.ignite.portable.PortableMetadata; -import org.apache.ignite.portable.PortableObject; -import org.jetbrains.annotations.Nullable; - -/** - * {@link IgnitePortables} implementation. - */ -public class IgnitePortablesImpl implements IgnitePortables { - /** */ - private GridKernalContext ctx; - - /** */ - private CacheObjectPortableProcessor proc; - - /** - * @param ctx Context. - */ - public IgnitePortablesImpl(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 PortableException { - guard(); - - try { - return (T)proc.marshalToPortable(obj); - } - finally { - unguard(); - } - } - - /** {@inheritDoc} */ - @Override public PortableBuilder builder(int typeId) { - guard(); - - try { - return proc.builder(typeId); - } - finally { - unguard(); - } - } - - /** {@inheritDoc} */ - @Override public PortableBuilder builder(String typeName) { - guard(); - - try { - return proc.builder(typeName); - } - finally { - unguard(); - } - } - - /** {@inheritDoc} */ - @Override public PortableBuilder builder(PortableObject portableObj) { - guard(); - - try { - return proc.builder(portableObj); - } - finally { - unguard(); - } - } - - /** {@inheritDoc} */ - @Nullable @Override public PortableMetadata metadata(Class<?> cls) throws PortableException { - guard(); - - try { - return proc.metadata(proc.typeId(cls.getName())); - } - finally { - unguard(); - } - } - - /** {@inheritDoc} */ - @Nullable @Override public PortableMetadata metadata(String typeName) throws PortableException { - guard(); - - try { - return proc.metadata(proc.typeId(typeName)); - } - finally { - unguard(); - } - } - - /** {@inheritDoc} */ - @Nullable @Override public PortableMetadata metadata(int typeId) throws PortableException { - guard(); - - try { - return proc.metadata(typeId); - } - finally { - unguard(); - } - } - - /** {@inheritDoc} */ - @Override public Collection<PortableMetadata> metadata() throws PortableException { - 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/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java index 0f46517..109f0ed 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java @@ -20,8 +20,8 @@ package org.apache.ignite.internal.processors.platform; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; import org.apache.ignite.internal.processors.platform.memory.PlatformOutputStream; import org.apache.ignite.internal.processors.platform.utils.PlatformFutureUtils; @@ -62,7 +62,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public long inStreamOutLong(int type, long memPtr) throws Exception { try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { - PortableRawReaderEx reader = platformCtx.reader(mem); + IgniteObjectRawReaderEx reader = platformCtx.reader(mem); if (type == OP_META) { platformCtx.processMetadata(reader); @@ -80,7 +80,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public Object inStreamOutObject(int type, long memPtr) throws Exception { try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { - PortableRawReaderEx reader = platformCtx.reader(mem); + IgniteObjectRawReaderEx reader = platformCtx.reader(mem); return processInStreamOutObject(type, reader); } @@ -104,7 +104,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = platformCtx.writer(out); + IgniteObjectRawWriterEx writer = platformCtx.writer(out); processOutStream(type, writer); @@ -128,12 +128,12 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public void inStreamOutStream(int type, long inMemPtr, long outMemPtr) throws Exception { try (PlatformMemory inMem = platformCtx.memory().get(inMemPtr)) { - PortableRawReaderEx reader = platformCtx.reader(inMem); + IgniteObjectRawReaderEx reader = platformCtx.reader(inMem); try (PlatformMemory outMem = platformCtx.memory().get(outMemPtr)) { PlatformOutputStream out = outMem.output(); - PortableRawWriterEx writer = platformCtx.writer(out); + IgniteObjectRawWriterEx writer = platformCtx.writer(out); processInStreamOutStream(type, reader, writer); @@ -148,12 +148,12 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public void inObjectStreamOutStream(int type, Object arg, long inMemPtr, long outMemPtr) throws Exception { try (PlatformMemory inMem = platformCtx.memory().get(inMemPtr)) { - PortableRawReaderEx reader = platformCtx.reader(inMem); + IgniteObjectRawReaderEx reader = platformCtx.reader(inMem); try (PlatformMemory outMem = platformCtx.memory().get(outMemPtr)) { PlatformOutputStream out = outMem.output(); - PortableRawWriterEx writer = platformCtx.writer(out); + IgniteObjectRawWriterEx writer = platformCtx.writer(out); processInObjectStreamOutStream(type, arg, reader, writer); @@ -233,7 +233,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @return Result. * @throws IgniteCheckedException In case of exception. */ - protected long processInStreamOutLong(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + protected long processInStreamOutLong(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { return throwUnsupported(type); } @@ -245,7 +245,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @param writer Portable writer. * @throws IgniteCheckedException In case of exception. */ - protected void processInStreamOutStream(int type, PortableRawReaderEx reader, PortableRawWriterEx writer) + protected void processInStreamOutStream(int type, IgniteObjectRawReaderEx reader, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { throwUnsupported(type); } @@ -258,7 +258,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @return Result. * @throws IgniteCheckedException In case of exception. */ - protected Object processInStreamOutObject(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + protected Object processInStreamOutObject(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { return throwUnsupported(type); } @@ -271,8 +271,8 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @param writer Portable writer. * @throws IgniteCheckedException In case of exception. */ - protected void processInObjectStreamOutStream(int type, @Nullable Object arg, PortableRawReaderEx reader, - PortableRawWriterEx writer) throws IgniteCheckedException { + protected void processInObjectStreamOutStream(int type, @Nullable Object arg, IgniteObjectRawReaderEx reader, + IgniteObjectRawWriterEx writer) throws IgniteCheckedException { throwUnsupported(type); } @@ -293,7 +293,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { * @param writer Portable writer. * @throws IgniteCheckedException In case of exception. */ - protected void processOutStream(int type, PortableRawWriterEx writer) throws IgniteCheckedException { + protected void processOutStream(int type, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { throwUnsupported(type); } http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java index a9b7d02..d4009a0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java @@ -21,8 +21,8 @@ import org.apache.ignite.cluster.ClusterMetrics; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.events.Event; import org.apache.ignite.internal.GridKernalContext; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilter; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryProcessor; import org.apache.ignite.internal.processors.platform.cache.query.PlatformContinuousQuery; @@ -71,7 +71,7 @@ public interface PlatformContext { * @param mem Memory. * @return Reader. */ - public PortableRawReaderEx reader(PlatformMemory mem); + public IgniteObjectRawReaderEx reader(PlatformMemory mem); /** * Get memory reader. @@ -79,7 +79,7 @@ public interface PlatformContext { * @param in Input. * @return Reader. */ - public PortableRawReaderEx reader(PlatformInputStream in); + public IgniteObjectRawReaderEx reader(PlatformInputStream in); /** * Get memory writer. @@ -87,7 +87,7 @@ public interface PlatformContext { * @param mem Memory. * @return Writer. */ - public PortableRawWriterEx writer(PlatformMemory mem); + public IgniteObjectRawWriterEx writer(PlatformMemory mem); /** * Get memory writer. @@ -95,7 +95,7 @@ public interface PlatformContext { * @param out Output. * @return Writer. */ - public PortableRawWriterEx writer(PlatformOutputStream out); + public IgniteObjectRawWriterEx writer(PlatformOutputStream out); /** * Sends node info to native platform, if necessary. @@ -110,7 +110,7 @@ public interface PlatformContext { * @param writer Writer. * @param node Node. */ - public void writeNode(PortableRawWriterEx writer, ClusterNode node); + public void writeNode(IgniteObjectRawWriterEx writer, ClusterNode node); /** * Writes multiple node ids to a stream and sends node info to native platform, if necessary. @@ -118,14 +118,14 @@ public interface PlatformContext { * @param writer Writer. * @param nodes Nodes. */ - public void writeNodes(PortableRawWriterEx writer, Collection<ClusterNode> nodes); + public void writeNodes(IgniteObjectRawWriterEx writer, Collection<ClusterNode> nodes); /** * Process metadata from the platform. * * @param reader Reader. */ - public void processMetadata(PortableRawReaderEx reader); + public void processMetadata(IgniteObjectRawReaderEx reader); /** * Write metadata for the given type ID. @@ -133,14 +133,14 @@ public interface PlatformContext { * @param writer Writer. * @param typeId Type ID. */ - public void writeMetadata(PortableRawWriterEx writer, int typeId); + public void writeMetadata(IgniteObjectRawWriterEx writer, int typeId); /** * Write all available metadata. * * @param writer Writer. */ - public void writeAllMetadata(PortableRawWriterEx writer); + public void writeAllMetadata(IgniteObjectRawWriterEx writer); /** * Write cluster metrics. @@ -148,7 +148,7 @@ public interface PlatformContext { * @param writer Writer. * @param metrics Metrics. */ - public void writeClusterMetrics(PortableRawWriterEx writer, @Nullable ClusterMetrics metrics); + public void writeClusterMetrics(IgniteObjectRawWriterEx writer, @Nullable ClusterMetrics metrics); /** * @@ -190,7 +190,7 @@ public interface PlatformContext { * @param writer Writer. * @param evt Event. */ - public void writeEvent(PortableRawWriterEx writer, Event evt); + public void writeEvent(IgniteObjectRawWriterEx writer, Event evt); /** * Create local event filter. http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/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 177a732..cc7d507 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java @@ -34,9 +34,9 @@ import org.apache.ignite.events.SwapSpaceEvent; import org.apache.ignite.events.TaskEvent; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.portable.GridPortableMarshaller; -import org.apache.ignite.internal.portable.PortableMetaDataImpl; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectMetaDataImpl; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.cache.portable.CacheObjectPortableProcessorImpl; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilter; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFilterImpl; @@ -70,13 +70,12 @@ 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.portable.PortableMetadata; +import org.apache.ignite.igniteobject.IgniteObjectMetadata; import org.jetbrains.annotations.Nullable; import java.sql.Timestamp; import java.util.Collection; import java.util.Collections; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -171,22 +170,22 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public PortableRawReaderEx reader(PlatformMemory mem) { + @Override public IgniteObjectRawReaderEx reader(PlatformMemory mem) { return reader(mem.input()); } /** {@inheritDoc} */ - @Override public PortableRawReaderEx reader(PlatformInputStream in) { + @Override public IgniteObjectRawReaderEx reader(PlatformInputStream in) { return marsh.reader(in); } /** {@inheritDoc} */ - @Override public PortableRawWriterEx writer(PlatformMemory mem) { + @Override public IgniteObjectRawWriterEx writer(PlatformMemory mem) { return writer(mem.output()); } /** {@inheritDoc} */ - @Override public PortableRawWriterEx writer(PlatformOutputStream out) { + @Override public IgniteObjectRawWriterEx writer(PlatformOutputStream out) { return marsh.writer(out); } @@ -199,7 +198,7 @@ public class PlatformContextImpl implements PlatformContext { try (PlatformMemory mem0 = mem.allocate()) { PlatformOutputStream out = mem0.output(); - PortableRawWriterEx w = writer(out); + IgniteObjectRawWriterEx w = writer(out); w.writeUuid(node.id()); @@ -234,7 +233,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeNode(PortableRawWriterEx writer, ClusterNode node) { + @Override public void writeNode(IgniteObjectRawWriterEx writer, ClusterNode node) { if (node == null) { writer.writeUuid(null); @@ -247,7 +246,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeNodes(PortableRawWriterEx writer, Collection<ClusterNode> nodes) { + @Override public void writeNodes(IgniteObjectRawWriterEx writer, Collection<ClusterNode> nodes) { if (nodes == null) { writer.writeInt(-1); @@ -264,7 +263,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeClusterMetrics(PortableRawWriterEx writer, @Nullable ClusterMetrics metrics) { + @Override public void writeClusterMetrics(IgniteObjectRawWriterEx writer, @Nullable ClusterMetrics metrics) { if (metrics == null) writer.writeBoolean(false); else { @@ -340,17 +339,17 @@ public class PlatformContextImpl implements PlatformContext { /** {@inheritDoc} */ @SuppressWarnings("ConstantConditions") - @Override public void processMetadata(PortableRawReaderEx reader) { + @Override public void processMetadata(IgniteObjectRawReaderEx reader) { Collection<T4<Integer, String, String, Map<String, Integer>>> metas = PlatformUtils.readCollection(reader, new PlatformReaderClosure<T4<Integer, String, String, Map<String, Integer>>>() { - @Override public T4<Integer, String, String, Map<String, Integer>> read(PortableRawReaderEx reader) { + @Override public T4<Integer, String, String, Map<String, Integer>> read(IgniteObjectRawReaderEx reader) { int typeId = reader.readInt(); String typeName = reader.readString(); String affKey = reader.readString(); Map<String, Integer> fields = PlatformUtils.readMap(reader, new PlatformReaderBiClosure<String, Integer>() { - @Override public IgniteBiTuple<String, Integer> read(PortableRawReaderEx reader) { + @Override public IgniteBiTuple<String, Integer> read(IgniteObjectRawReaderEx reader) { return F.t(reader.readString(), reader.readInt()); } }); @@ -365,17 +364,17 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeMetadata(PortableRawWriterEx writer, int typeId) { + @Override public void writeMetadata(IgniteObjectRawWriterEx writer, int typeId) { writeMetadata0(writer, typeId, cacheObjProc.metadata(typeId)); } /** {@inheritDoc} */ - @Override public void writeAllMetadata(PortableRawWriterEx writer) { - Collection<PortableMetadata> metas = cacheObjProc.metadata(); + @Override public void writeAllMetadata(IgniteObjectRawWriterEx writer) { + Collection<IgniteObjectMetadata> metas = cacheObjProc.metadata(); writer.writeInt(metas.size()); - for (org.apache.ignite.portable.PortableMetadata m : metas) + for (IgniteObjectMetadata m : metas) writeMetadata0(writer, cacheObjProc.typeId(m.typeName()), m); } @@ -386,13 +385,13 @@ public class PlatformContextImpl implements PlatformContext { * @param typeId Type id. * @param meta Metadata. */ - private void writeMetadata0(PortableRawWriterEx writer, int typeId, PortableMetadata meta) { + private void writeMetadata0(IgniteObjectRawWriterEx writer, int typeId, IgniteObjectMetadata meta) { if (meta == null) writer.writeBoolean(false); else { writer.writeBoolean(true); - Map<String, String> metaFields = ((PortableMetaDataImpl)meta).fields0(); + Map<String, String> metaFields = ((IgniteObjectMetaDataImpl)meta).fields0(); Map<String, Integer> fields = U.newHashMap(metaFields.size()); @@ -428,7 +427,7 @@ public class PlatformContextImpl implements PlatformContext { } /** {@inheritDoc} */ - @Override public void writeEvent(PortableRawWriterEx writer, Event evt) { + @Override public void writeEvent(IgniteObjectRawWriterEx writer, Event evt) { assert writer != null; if (evt == null) @@ -566,7 +565,7 @@ public class PlatformContextImpl implements PlatformContext { * @param writer Writer. * @param evt Event. */ - private void writeCommonEventData(PortableRawWriterEx writer, EventAdapter evt) { + private void writeCommonEventData(IgniteObjectRawWriterEx writer, EventAdapter evt) { PlatformUtils.writeIgniteUuid(writer, evt.id()); writer.writeLong(evt.localOrder()); writeNode(writer, evt.node()); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java index 825db6c..21b6baf 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformExtendedException.java @@ -17,7 +17,7 @@ package org.apache.ignite.internal.processors.platform; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; /** * Denotes an exception which has some data to be written in a special manner. @@ -53,5 +53,5 @@ public abstract class PlatformExtendedException extends PlatformException { * * @param writer Writer. */ - public abstract void writeData(PortableRawWriterEx writer); + public abstract void writeData(IgniteObjectRawWriterEx writer); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java index d783928..efe6212 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java @@ -26,7 +26,7 @@ import org.apache.ignite.configuration.PlatformConfiguration; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.IgniteComputeImpl; import org.apache.ignite.internal.cluster.ClusterGroupAdapter; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.GridProcessorAdapter; import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl; @@ -122,7 +122,7 @@ public class PlatformProcessorImpl extends GridProcessorAdapter implements Platf try (PlatformMemory mem = platformCtx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = platformCtx.writer(out); + IgniteObjectRawWriterEx writer = platformCtx.writer(out); writer.writeString(ctx.gridName()); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java index ecdfc2c..3c071db 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java @@ -28,8 +28,8 @@ import org.apache.ignite.cache.query.ScanQuery; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.query.TextQuery; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.cache.CacheOperationContext; import org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException; import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; @@ -276,7 +276,7 @@ public class PlatformCache extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected long processInStreamOutLong(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + @Override protected long processInStreamOutLong(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_PUT: cache.put(reader.readObjectDetached(), reader.readObjectDetached()); @@ -372,7 +372,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Loads cache via localLoadCache or loadCache. */ - private void loadCache0(PortableRawReaderEx reader, boolean loc) throws IgniteCheckedException { + private void loadCache0(IgniteObjectRawReaderEx reader, boolean loc) throws IgniteCheckedException { PlatformCacheEntryFilter filter = null; Object pred = reader.readObjectDetached(); @@ -389,7 +389,7 @@ public class PlatformCache extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected Object processInStreamOutObject(int type, PortableRawReaderEx reader) + @Override protected Object processInStreamOutObject(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_QRY_SQL: @@ -432,7 +432,7 @@ public class PlatformCache extends PlatformAbstractTarget { * @param reader Reader. * @return Arguments. */ - @Nullable private Object[] readQueryArgs(PortableRawReaderEx reader) { + @Nullable private Object[] readQueryArgs(IgniteObjectRawReaderEx reader) { int cnt = reader.readInt(); if (cnt > 0) { @@ -448,7 +448,7 @@ public class PlatformCache extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected void processOutStream(int type, PortableRawWriterEx writer) throws IgniteCheckedException { + @Override protected void processOutStream(int type, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_GET_NAME: writer.writeObject(cache.getName()); @@ -521,7 +521,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** {@inheritDoc} */ @SuppressWarnings({"IfMayBeConditional", "ConstantConditions"}) - @Override protected void processInStreamOutStream(int type, PortableRawReaderEx reader, PortableRawWriterEx writer) + @Override protected void processInStreamOutStream(int type, IgniteObjectRawReaderEx reader, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_GET: { @@ -640,7 +640,7 @@ public class PlatformCache extends PlatformAbstractTarget { * @param writer Writer. * @param results Results. */ - private static void writeInvokeAllResult(PortableRawWriterEx writer, Map<Object, EntryProcessorResult> results) { + private static void writeInvokeAllResult(IgniteObjectRawWriterEx writer, Map<Object, EntryProcessorResult> results) { if (results == null) { writer.writeInt(-1); @@ -674,7 +674,7 @@ public class PlatformCache extends PlatformAbstractTarget { * @param writer Writer. * @param ex Exception. */ - private static void writeError(PortableRawWriterEx writer, Exception ex) { + private static void writeError(IgniteObjectRawWriterEx writer, Exception ex) { if (ex.getCause() instanceof PlatformNativeException) writer.writeObjectDetached(((PlatformNativeException)ex.getCause()).cause()); else { @@ -845,7 +845,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Runs specified query. */ - private PlatformQueryCursor runQuery(PortableRawReaderEx reader, Query qry) throws IgniteCheckedException { + private PlatformQueryCursor runQuery(IgniteObjectRawReaderEx reader, Query qry) throws IgniteCheckedException { try { QueryCursorEx cursor = (QueryCursorEx) cache.query(qry); @@ -861,7 +861,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Runs specified fields query. */ - private PlatformFieldsQueryCursor runFieldsQuery(PortableRawReaderEx reader, Query qry) + private PlatformFieldsQueryCursor runFieldsQuery(IgniteObjectRawReaderEx reader, Query qry) throws IgniteCheckedException { try { QueryCursorEx cursor = (QueryCursorEx) cache.query(qry); @@ -877,7 +877,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Reads the query of specified type. */ - private Query readInitialQuery(PortableRawReaderEx reader) throws IgniteCheckedException { + private Query readInitialQuery(IgniteObjectRawReaderEx reader) throws IgniteCheckedException { int typ = reader.readInt(); switch (typ) { @@ -900,7 +900,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Reads sql query. */ - private Query readSqlQuery(PortableRawReaderEx reader) { + private Query readSqlQuery(IgniteObjectRawReaderEx reader) { boolean loc = reader.readBoolean(); String sql = reader.readString(); String typ = reader.readString(); @@ -914,7 +914,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Reads fields query. */ - private Query readFieldsQuery(PortableRawReaderEx reader) { + private Query readFieldsQuery(IgniteObjectRawReaderEx reader) { boolean loc = reader.readBoolean(); String sql = reader.readString(); final int pageSize = reader.readInt(); @@ -927,7 +927,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Reads text query. */ - private Query readTextQuery(PortableRawReaderEx reader) { + private Query readTextQuery(IgniteObjectRawReaderEx reader) { boolean loc = reader.readBoolean(); String txt = reader.readString(); String typ = reader.readString(); @@ -939,7 +939,7 @@ public class PlatformCache extends PlatformAbstractTarget { /** * Reads scan query. */ - private Query readScanQuery(PortableRawReaderEx reader) { + private Query readScanQuery(IgniteObjectRawReaderEx reader) { boolean loc = reader.readBoolean(); final int pageSize = reader.readInt(); @@ -966,7 +966,7 @@ public class PlatformCache extends PlatformAbstractTarget { */ private static class GetAllWriter implements PlatformFutureUtils.Writer { /** <inheritDoc /> */ - @Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) { + @Override public void write(IgniteObjectRawWriterEx writer, Object obj, Throwable err) { assert obj instanceof Map; PlatformUtils.writeNullableMap(writer, (Map) obj); @@ -983,7 +983,7 @@ public class PlatformCache extends PlatformAbstractTarget { */ private static class EntryProcessorInvokeWriter implements PlatformFutureUtils.Writer { /** <inheritDoc /> */ - @Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) { + @Override public void write(IgniteObjectRawWriterEx writer, Object obj, Throwable err) { if (err == null) { writer.writeBoolean(false); // No error. @@ -1007,7 +1007,7 @@ public class PlatformCache extends PlatformAbstractTarget { */ private static class EntryProcessorInvokeAllWriter implements PlatformFutureUtils.Writer { /** <inheritDoc /> */ - @Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) { + @Override public void write(IgniteObjectRawWriterEx writer, Object obj, Throwable err) { writeInvokeAllResult(writer, (Map)obj); } http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryFilterImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryFilterImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryFilterImpl.java index 5f8ec8f..1dfb428 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryFilterImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryFilterImpl.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.platform.cache; import org.apache.ignite.Ignite; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractPredicate; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; @@ -58,7 +58,7 @@ public class PlatformCacheEntryFilterImpl extends PlatformAbstractPredicate impl try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writer.writeObject(k); writer.writeObject(v); @@ -94,7 +94,7 @@ public class PlatformCacheEntryFilterImpl extends PlatformAbstractPredicate impl try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writer.writeObject(pred); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java index f59a63f..4be6d7e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheEntryProcessorImpl.java @@ -26,8 +26,8 @@ import javax.cache.processor.MutableEntry; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.IgniteKernal; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.PlatformProcessor; import org.apache.ignite.internal.processors.platform.memory.PlatformInputStream; @@ -119,7 +119,7 @@ public class PlatformCacheEntryProcessorImpl implements PlatformCacheEntryProces try (PlatformMemory outMem = ctx.memory().allocate()) { PlatformOutputStream out = outMem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writeEntryAndProcessor(entry, writer); @@ -132,7 +132,7 @@ public class PlatformCacheEntryProcessorImpl implements PlatformCacheEntryProces in.synchronize(); - PortableRawReaderEx reader = ctx.reader(in); + IgniteObjectRawReaderEx reader = ctx.reader(in); return readResultAndUpdateEntry(ctx, entry, reader); } @@ -145,7 +145,7 @@ public class PlatformCacheEntryProcessorImpl implements PlatformCacheEntryProces * @param entry Entry to process. * @param writer Writer. */ - private void writeEntryAndProcessor(MutableEntry entry, PortableRawWriterEx writer) { + private void writeEntryAndProcessor(MutableEntry entry, IgniteObjectRawWriterEx writer) { writer.writeObject(entry.getKey()); writer.writeObject(entry.getValue()); @@ -170,7 +170,7 @@ public class PlatformCacheEntryProcessorImpl implements PlatformCacheEntryProces * @throws javax.cache.processor.EntryProcessorException If processing has failed in user code. */ @SuppressWarnings("unchecked") - private Object readResultAndUpdateEntry(PlatformContext ctx, MutableEntry entry, PortableRawReaderEx reader) { + private Object readResultAndUpdateEntry(PlatformContext ctx, MutableEntry entry, IgniteObjectRawReaderEx reader) { byte state = reader.readByte(); switch (state) { http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheIterator.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheIterator.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheIterator.java index 78ca683..d4c5bfa 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheIterator.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCacheIterator.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.platform.cache; import java.util.Iterator; import javax.cache.Cache; import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget; import org.apache.ignite.internal.processors.platform.PlatformContext; @@ -47,7 +47,7 @@ public class PlatformCacheIterator extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected void processOutStream(int type, PortableRawWriterEx writer) throws IgniteCheckedException { + @Override protected void processOutStream(int type, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_NEXT: if (iter.hasNext()) { http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java index ef17a06..4323ae0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCachePartialUpdateException.java @@ -17,7 +17,7 @@ package org.apache.ignite.internal.processors.platform.cache; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.PlatformExtendedException; @@ -49,7 +49,7 @@ public class PlatformCachePartialUpdateException extends PlatformExtendedExcepti } /** {@inheritDoc} */ - @Override public void writeData(PortableRawWriterEx writer) { + @Override public void writeData(IgniteObjectRawWriterEx writer) { Collection keys = ((CachePartialUpdateCheckedException)getCause()).failedKeys(); writer.writeBoolean(keepPortable); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/affinity/PlatformAffinity.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/affinity/PlatformAffinity.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/affinity/PlatformAffinity.java index 0d2098b..b628855 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/affinity/PlatformAffinity.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/affinity/PlatformAffinity.java @@ -25,8 +25,8 @@ import org.apache.ignite.cache.affinity.Affinity; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.utils.PlatformUtils; @@ -114,7 +114,7 @@ public class PlatformAffinity extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected long processInStreamOutLong(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + @Override protected long processInStreamOutLong(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_PARTITION: return aff.partition(reader.readObjectDetached()); @@ -165,7 +165,7 @@ public class PlatformAffinity extends PlatformAbstractTarget { /** {@inheritDoc} */ @SuppressWarnings({"IfMayBeConditional", "ConstantConditions"}) - @Override protected void processInStreamOutStream(int type, PortableRawReaderEx reader, PortableRawWriterEx writer) + @Override protected void processInStreamOutStream(int type, IgniteObjectRawReaderEx reader, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_PRIMARY_PARTITIONS: { http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java index 6c2c873..737e79f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.platform.cache.query; import java.util.Iterator; import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.cache.query.QueryCursorEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget; import org.apache.ignite.internal.processors.platform.PlatformContext; @@ -62,7 +62,7 @@ public abstract class PlatformAbstractQueryCursor<T> extends PlatformAbstractTar } /** {@inheritDoc} */ - @Override protected void processOutStream(int type, final PortableRawWriterEx writer) throws IgniteCheckedException { + @Override protected void processOutStream(int type, final IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_GET_BATCH: { assert iter != null : "iterator() has not been called"; @@ -157,7 +157,7 @@ public abstract class PlatformAbstractQueryCursor<T> extends PlatformAbstractTar * @param writer Writer. * @param val Value. */ - protected abstract void write(PortableRawWriterEx writer, T val); + protected abstract void write(IgniteObjectRawWriterEx writer, T val); /** * Query cursor consumer. @@ -167,7 +167,7 @@ public abstract class PlatformAbstractQueryCursor<T> extends PlatformAbstractTar private final PlatformAbstractQueryCursor<T> cursor; /** Writer. */ - private final PortableRawWriterEx writer; + private final IgniteObjectRawWriterEx writer; /** Count. */ private int cnt; @@ -177,7 +177,7 @@ public abstract class PlatformAbstractQueryCursor<T> extends PlatformAbstractTar * * @param writer Writer. */ - public Consumer(PlatformAbstractQueryCursor<T> cursor, PortableRawWriterEx writer) { + public Consumer(PlatformAbstractQueryCursor<T> cursor, IgniteObjectRawWriterEx writer) { this.cursor = cursor; this.writer = writer; } http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryRemoteFilter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryRemoteFilter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryRemoteFilter.java index 71aa38c..0100a59 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryRemoteFilter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryRemoteFilter.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.platform.cache.query; import org.apache.ignite.Ignite; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; import org.apache.ignite.internal.processors.platform.memory.PlatformOutputStream; @@ -115,7 +115,7 @@ public class PlatformContinuousQueryRemoteFilter implements PlatformContinuousQu try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writer.writeObject(filter); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java index 44a4f14..6f8f6dd 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.platform.cache.query; import java.util.List; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.cache.query.QueryCursorEx; import org.apache.ignite.internal.processors.platform.PlatformContext; @@ -38,7 +38,7 @@ public class PlatformFieldsQueryCursor extends PlatformAbstractQueryCursor<List< } /** {@inheritDoc} */ - @Override protected void write(PortableRawWriterEx writer, List vals) { + @Override protected void write(IgniteObjectRawWriterEx writer, List vals) { assert vals != null; writer.writeInt(vals.size()); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java index 410e4de..6429663 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.platform.cache.query; import javax.cache.Cache; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.cache.query.QueryCursorEx; import org.apache.ignite.internal.processors.platform.PlatformContext; @@ -38,7 +38,7 @@ public class PlatformQueryCursor extends PlatformAbstractQueryCursor<Cache.Entry } /** {@inheritDoc} */ - @Override protected void write(PortableRawWriterEx writer, Cache.Entry val) { + @Override protected void write(IgniteObjectRawWriterEx writer, Cache.Entry val) { writer.writeObjectDetached(val.getKey()); writer.writeObjectDetached(val.getValue()); } http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/store/PlatformCacheStoreCallback.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/store/PlatformCacheStoreCallback.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/store/PlatformCacheStoreCallback.java index a741f0f..42f9b86 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/store/PlatformCacheStoreCallback.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/store/PlatformCacheStoreCallback.java @@ -17,7 +17,7 @@ package org.apache.ignite.internal.processors.platform.cache.store; -import org.apache.ignite.internal.portable.PortableRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; @@ -45,7 +45,7 @@ public abstract class PlatformCacheStoreCallback { public void invoke(long memPtr) { if (memPtr > 0) { try (PlatformMemory mem = ctx.memory().get(memPtr)) { - PortableRawReaderEx reader = ctx.reader(mem); + IgniteObjectRawReaderEx reader = ctx.reader(mem); invoke0(reader); } @@ -57,5 +57,5 @@ public abstract class PlatformCacheStoreCallback { * * @param reader Reader. */ - protected abstract void invoke0(PortableRawReaderEx reader); + protected abstract void invoke0(IgniteObjectRawReaderEx reader); } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterGroup.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterGroup.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterGroup.java index a1c8516..f839653 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterGroup.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterGroup.java @@ -24,8 +24,8 @@ import org.apache.ignite.IgniteCluster; import org.apache.ignite.cluster.ClusterMetrics; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.cluster.ClusterGroupEx; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.utils.PlatformUtils; @@ -94,7 +94,7 @@ public class PlatformClusterGroup extends PlatformAbstractTarget { /** {@inheritDoc} */ @SuppressWarnings("deprecation") - @Override protected void processOutStream(int type, PortableRawWriterEx writer) throws IgniteCheckedException { + @Override protected void processOutStream(int type, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_METRICS: platformCtx.writeClusterMetrics(writer, prj.metrics()); @@ -113,7 +113,7 @@ public class PlatformClusterGroup extends PlatformAbstractTarget { /** {@inheritDoc} */ @SuppressWarnings({"ConstantConditions", "deprecation"}) - @Override protected void processInStreamOutStream(int type, PortableRawReaderEx reader, PortableRawWriterEx writer) + @Override protected void processInStreamOutStream(int type, IgniteObjectRawReaderEx reader, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_METRICS_FILTERED: { @@ -194,7 +194,7 @@ public class PlatformClusterGroup extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected long processInStreamOutLong(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + @Override protected long processInStreamOutLong(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_PING_NODE: return pingNode(reader.readUuid()) ? TRUE : FALSE; @@ -205,7 +205,7 @@ public class PlatformClusterGroup extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected Object processInStreamOutObject(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + @Override protected Object processInStreamOutObject(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_FOR_NODE_IDS: { Collection<UUID> ids = PlatformUtils.readCollection(reader); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterNodeFilterImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterNodeFilterImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterNodeFilterImpl.java index 5ba9a85..022aad4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterNodeFilterImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterNodeFilterImpl.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.platform.cluster; import org.apache.ignite.Ignite; import org.apache.ignite.cluster.ClusterNode; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractPredicate; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; @@ -56,7 +56,7 @@ public class PlatformClusterNodeFilterImpl extends PlatformAbstractPredicate imp try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writer.writeObject(pred); ctx.writeNode(writer, clusterNode); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractJob.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractJob.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractJob.java index bf9d9e4..7051164 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractJob.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractJob.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.platform.compute; import java.io.Externalizable; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.PlatformProcessor; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; @@ -105,7 +105,7 @@ public abstract class PlatformAbstractJob implements PlatformJob, Externalizable try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writer.writeObject(job); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractTask.java index b17dd97..740c901 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractTask.java @@ -24,7 +24,7 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.compute.ComputeJobResult; import org.apache.ignite.compute.ComputeJobResultPolicy; import org.apache.ignite.compute.ComputeTask; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.PlatformNativeException; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; @@ -86,7 +86,7 @@ public abstract class PlatformAbstractTask implements ComputeTask<Object, Void> try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writer.writeUuid(res.getNode().id()); writer.writeBoolean(res.isCancelled()); @@ -151,7 +151,7 @@ public abstract class PlatformAbstractTask implements ComputeTask<Object, Void> try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); if (e0 == null) { writer.writeBoolean(false); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformClosureJob.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformClosureJob.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformClosureJob.java index 9bd7d60..281dc52 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformClosureJob.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformClosureJob.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.internal.portable.PortableRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.memory.PlatformInputStream; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; @@ -69,7 +69,7 @@ public class PlatformClosureJob extends PlatformAbstractJob { in.synchronize(); - PortableRawReaderEx reader = ctx.reader(in); + IgniteObjectRawReaderEx reader = ctx.reader(in); return PlatformUtils.readInvocationResult(ctx, reader); } http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/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 638b4b1..35e0051 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 @@ -25,15 +25,15 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteCompute; import org.apache.ignite.internal.IgniteComputeImpl; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.portable.PortableObjectImpl; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectImpl; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.util.typedef.C1; import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.lang.IgniteInClosure; -import org.apache.ignite.portable.PortableObject; +import org.apache.ignite.igniteobject.IgniteObject; import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID; @@ -75,7 +75,7 @@ public class PlatformCompute extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected long processInStreamOutLong(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + @Override protected long processInStreamOutLong(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_UNICAST: processClosures(reader.readLong(), reader, false, false); @@ -104,7 +104,7 @@ public class PlatformCompute extends PlatformAbstractTarget { * @param reader Reader. * @param broadcast broadcast flag. */ - private void processClosures(long taskPtr, PortableRawReaderEx reader, boolean broadcast, boolean affinity) { + private void processClosures(long taskPtr, IgniteObjectRawReaderEx reader, boolean broadcast, boolean affinity) { PlatformAbstractTask task; int size = reader.readInt(); @@ -165,12 +165,12 @@ public class PlatformCompute extends PlatformAbstractTarget { * @param reader Reader. * @return Closure job. */ - private PlatformJob nextClosureJob(PlatformAbstractTask task, PortableRawReaderEx reader) { + private PlatformJob nextClosureJob(PlatformAbstractTask task, IgniteObjectRawReaderEx reader) { return platformCtx.createClosureJob(task, reader.readLong(), reader.readObjectDetached()); } /** {@inheritDoc} */ - @Override protected void processInStreamOutStream(int type, PortableRawReaderEx reader, PortableRawWriterEx writer) + @Override protected void processInStreamOutStream(int type, IgniteObjectRawReaderEx reader, IgniteObjectRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_EXEC: @@ -256,7 +256,7 @@ public class PlatformCompute extends PlatformAbstractTarget { * @param reader Reader. * @return Task result. */ - protected Object executeJavaTask(PortableRawReaderEx reader, boolean async) { + protected Object executeJavaTask(IgniteObjectRawReaderEx reader, boolean async) { String taskName = reader.readString(); boolean keepPortable = reader.readBoolean(); Object arg = reader.readObjectDetached(); @@ -268,8 +268,8 @@ public class PlatformCompute extends PlatformAbstractTarget { if (async) compute0 = compute0.withAsync(); - if (!keepPortable && arg instanceof PortableObjectImpl) - arg = ((PortableObject)arg).deserialize(); + if (!keepPortable && arg instanceof IgniteObjectImpl) + arg = ((IgniteObject)arg).deserialize(); Object res = compute0.execute(taskName, arg); @@ -304,7 +304,7 @@ public class PlatformCompute extends PlatformAbstractTarget { * @param reader Reader. * @return Node IDs. */ - protected Collection<UUID> readNodeIds(PortableRawReaderEx reader) { + protected Collection<UUID> readNodeIds(IgniteObjectRawReaderEx reader) { if (reader.readBoolean()) { int len = reader.readInt(); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullJob.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullJob.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullJob.java index cfed735..5fc9078 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullJob.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullJob.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.internal.portable.PortableRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.PlatformProcessor; import org.apache.ignite.internal.processors.platform.memory.PlatformInputStream; @@ -120,7 +120,7 @@ public class PlatformFullJob extends PlatformAbstractJob { in.synchronize(); - PortableRawReaderEx reader = ctx.reader(in); + IgniteObjectRawReaderEx reader = ctx.reader(in); return PlatformUtils.readInvocationResult(ctx, reader); } @@ -209,7 +209,7 @@ public class PlatformFullJob extends PlatformAbstractJob { in.synchronize(); - PortableRawReaderEx reader = ctx.reader(in); + IgniteObjectRawReaderEx reader = ctx.reader(in); if (res) job = reader.readObjectDetached(); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullTask.java index b96d445..1c943e7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullTask.java @@ -27,8 +27,8 @@ import org.apache.ignite.compute.ComputeJob; import org.apache.ignite.compute.ComputeTaskNoResultCache; import org.apache.ignite.internal.IgniteComputeImpl; import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.memory.PlatformInputStream; import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; @@ -83,7 +83,7 @@ public final class PlatformFullTask extends PlatformAbstractTask { try (PlatformMemory outMem = memMgr.allocate()) { PlatformOutputStream out = outMem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); write(writer, nodes, subgrid); @@ -96,7 +96,7 @@ public final class PlatformFullTask extends PlatformAbstractTask { in.synchronize(); - PortableRawReaderEx reader = ctx.reader(in); + IgniteObjectRawReaderEx reader = ctx.reader(in); return read(reader, nodes); } @@ -114,7 +114,7 @@ public final class PlatformFullTask extends PlatformAbstractTask { * @param nodes Current topology nodes. * @param subgrid Subgrid. */ - private void write(PortableRawWriterEx writer, Collection<ClusterNode> nodes, List<ClusterNode> subgrid) { + private void write(IgniteObjectRawWriterEx writer, Collection<ClusterNode> nodes, List<ClusterNode> subgrid) { GridDiscoveryManager discoMgr = ctx.kernalContext().discovery(); long curTopVer = discoMgr.topologyVersion(); @@ -145,7 +145,7 @@ public final class PlatformFullTask extends PlatformAbstractTask { * @param nodes Current topology nodes. * @return Map result. */ - private Map<ComputeJob, ClusterNode> read(PortableRawReaderEx reader, Collection<ClusterNode> nodes) { + private Map<ComputeJob, ClusterNode> read(IgniteObjectRawReaderEx reader, Collection<ClusterNode> nodes) { if (reader.readBoolean()) { if (!reader.readBoolean()) return null; http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformDataStreamer.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformDataStreamer.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformDataStreamer.java index ef64ef9..776f26b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformDataStreamer.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformDataStreamer.java @@ -24,7 +24,7 @@ import org.apache.ignite.events.DiscoveryEvent; import org.apache.ignite.events.Event; import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener; -import org.apache.ignite.internal.portable.PortableRawReaderEx; +import org.apache.ignite.internal.portable.IgniteObjectRawReaderEx; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl; import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget; @@ -87,7 +87,7 @@ public class PlatformDataStreamer extends PlatformAbstractTarget { } /** {@inheritDoc} */ - @Override protected long processInStreamOutLong(int type, PortableRawReaderEx reader) throws IgniteCheckedException { + @Override protected long processInStreamOutLong(int type, IgniteObjectRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_UPDATE: int plc = reader.readInt(); http://git-wip-us.apache.org/repos/asf/ignite/blob/35b6d61f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformStreamReceiverImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformStreamReceiverImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformStreamReceiverImpl.java index 92250c0..e814b03 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformStreamReceiverImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformStreamReceiverImpl.java @@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.platform.datastreamer; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteException; -import org.apache.ignite.internal.portable.PortableRawWriterEx; +import org.apache.ignite.internal.portable.IgniteObjectRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformAbstractPredicate; import org.apache.ignite.internal.processors.platform.PlatformContext; import org.apache.ignite.internal.processors.platform.cache.PlatformCache; @@ -76,7 +76,7 @@ public class PlatformStreamReceiverImpl extends PlatformAbstractPredicate implem try (PlatformMemory mem = ctx.memory().allocate()) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = ctx.writer(out); + IgniteObjectRawWriterEx writer = ctx.writer(out); writer.writeObject(pred);
