Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02753174BA for ; Fri, 18 Sep 2015 10:04:06 +0000 (UTC) Received: (qmail 95594 invoked by uid 500); 18 Sep 2015 10:04:05 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 95468 invoked by uid 500); 18 Sep 2015 10:04:05 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 95414 invoked by uid 99); 18 Sep 2015 10:04:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2015 10:04:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6AE2BE049D; Fri, 18 Sep 2015 10:04:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.apache.org Date: Fri, 18 Sep 2015 10:04:06 -0000 Message-Id: <5075d044564c43ec91fc49058cf78bfc@git.apache.org> In-Reply-To: <408a53e3fdb94ef18b380d467c6c004f@git.apache.org> References: <408a53e3fdb94ef18b380d467c6c004f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/14] ignite git commit: IGNITE-1513: Merged Java to core module. http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderBiClosure.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderBiClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderBiClosure.java deleted file mode 100644 index 79759e9..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderBiClosure.java +++ /dev/null @@ -1,34 +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.platform.utils; - -import org.apache.ignite.internal.portable.PortableRawReaderEx; -import org.apache.ignite.lang.IgniteBiTuple; - -/** - * Reader bi-closure. - */ -public interface PlatformReaderBiClosure { - /** - * Read object from reader. - * - * @param reader Reader. - * @return Object. - */ - IgniteBiTuple read(PortableRawReaderEx reader); -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderClosure.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderClosure.java deleted file mode 100644 index 2d9b44a..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformReaderClosure.java +++ /dev/null @@ -1,34 +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.platform.utils; - -import org.apache.ignite.internal.portable.PortableRawReaderEx; - -/** - * Reader closure. - */ -public interface PlatformReaderClosure { - - /** - * Read object from reader. - * - * @param reader Reader. - * @return Object. - */ - T read(PortableRawReaderEx reader); -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java deleted file mode 100644 index 11d8371..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java +++ /dev/null @@ -1,812 +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.platform.utils; - -import org.apache.ignite.Ignite; -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.IgniteException; -import org.apache.ignite.IgniteLogger; -import org.apache.ignite.cache.CachePeekMode; -import org.apache.ignite.internal.GridKernalContext; -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.processors.platform.PlatformContext; -import org.apache.ignite.internal.processors.platform.PlatformExtendedException; -import org.apache.ignite.internal.processors.platform.PlatformNativeException; -import org.apache.ignite.internal.processors.platform.PlatformProcessor; -import org.apache.ignite.internal.processors.platform.memory.PlatformInputStream; -import org.apache.ignite.internal.processors.platform.memory.PlatformMemory; -import org.apache.ignite.internal.processors.platform.memory.PlatformMemoryUtils; -import org.apache.ignite.internal.processors.platform.memory.PlatformOutputStream; -import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.lang.IgniteBiTuple; -import org.apache.ignite.lang.IgnitePredicate; -import org.apache.ignite.lang.IgniteUuid; -import org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration; -import org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration; -import org.apache.ignite.platform.dotnet.PlatformDotNetPortableTypeConfiguration; -import org.jetbrains.annotations.Nullable; - -import javax.cache.CacheException; -import javax.cache.event.CacheEntryEvent; -import javax.cache.event.CacheEntryListenerException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_PREFIX; - -/** - * Platform utility methods. - */ -@SuppressWarnings({"UnusedDeclaration", "unchecked"}) -public class PlatformUtils { - /** Node attribute: platform. */ - public static final String ATTR_PLATFORM = ATTR_PREFIX + ".platform"; - - /** Platform: CPP. */ - public static final String PLATFORM_CPP = "cpp"; - - /** Platform: .Net. */ - public static final String PLATFORM_DOTNET = "dotnet"; - - /** Operation: prepare .Net platform. */ - public static final int OP_PREPARE_DOT_NET = 1; - - /** Amount of peek modes available. */ - private static final int CACHE_PEEK_MODES_CNT = CachePeekMode.values().length; - - /** Cache peek modes. */ - private static volatile CachePeekMode[][] CACHE_PEEK_MODES; - - /** - * Static initializer. - */ - static { - int len = 1 << CACHE_PEEK_MODES_CNT; - - synchronized (PlatformUtils.class) { - CACHE_PEEK_MODES = new CachePeekMode[len][]; - - CACHE_PEEK_MODES[0] = new CachePeekMode[0]; - } - } - - /** - * Write nullable collection to the writer. - * - * @param writer Writer. - * @param col Collection to write. - */ - public static void writeNullableCollection(PortableRawWriterEx writer, @Nullable Collection col) { - writeNullableCollection(writer, col, null, null); - } - - /** - * Write nullable collection to the writer. - * - * @param writer Writer. - * @param col Collection to write. - * @param writeClo Writer closure. - */ - public static void writeNullableCollection(PortableRawWriterEx writer, @Nullable Collection col, - @Nullable PlatformWriterClosure writeClo) { - writeNullableCollection(writer, col, writeClo, null); - } - - /** - * Write collection to the writer. - * - * @param writer Writer. - * @param col Collection to write. - * @param writeClo Optional writer closure. - * @param filter Optional filter. - */ - public static void writeNullableCollection(PortableRawWriterEx writer, @Nullable Collection col, - @Nullable PlatformWriterClosure writeClo, @Nullable IgnitePredicate filter) { - if (col != null) { - writer.writeBoolean(true); - - writeCollection(writer, col, writeClo, filter); - } - else - writer.writeBoolean(false); - } - - /** - * Write collection to the writer. - * - * @param writer Writer. - * @param col Collection to write. - */ - public static void writeCollection(PortableRawWriterEx writer, Collection col) { - writeCollection(writer, col, null, null); - } - - /** - * Write collection to the writer. - * - * @param writer Writer. - * @param col Collection to write. - * @param writeClo Writer closure. - */ - public static void writeCollection(PortableRawWriterEx writer, Collection col, - @Nullable PlatformWriterClosure writeClo) { - writeCollection(writer, col, writeClo, null); - } - - /** - * Write collection to the writer. - * - * @param writer Writer. - * @param col Collection to write. - * @param writeClo Optional writer closure. - * @param filter Optional filter. - */ - public static void writeCollection(PortableRawWriterEx writer, Collection col, - @Nullable PlatformWriterClosure writeClo, @Nullable IgnitePredicate filter) { - assert col != null; - - if (filter == null) { - writer.writeInt(col.size()); - - if (writeClo == null) { - for (T entry : col) - writer.writeObject(entry); - } - else { - for (T entry : col) - writeClo.write(writer, entry); - } - } - else { - int pos = writer.reserveInt(); - int cnt = 0; - - for (T entry : col) { - if (filter.apply(entry)) { - cnt++; - - if (writeClo == null) - writer.writeObject(entry); - else - writeClo.write(writer, entry); - } - } - - writer.writeInt(pos, cnt); - } - } - - /** - * Write nullable map to the writer. - * - * @param writer Writer. - * @param map Map to write. - */ - public static void writeNullableMap(PortableRawWriterEx writer, @Nullable Map map) { - if (map != null) { - writer.writeBoolean(true); - - writeMap(writer, map); - } - else - writer.writeBoolean(false); - } - - /** - * Write nullable map to the writer. - * - * @param writer Writer. - * @param map Map to write. - */ - public static void writeMap(PortableRawWriterEx writer, Map map) { - assert map != null; - - writeMap(writer, map, null); - } - - /** - * Write nullable map to the writer. - * - * @param writer Writer. - * @param map Map to write. - * @param writeClo Writer closure. - */ - public static void writeMap(PortableRawWriterEx writer, Map map, - @Nullable PlatformWriterBiClosure writeClo) { - assert map != null; - - writer.writeInt(map.size()); - - if (writeClo == null) { - for (Map.Entry entry : map.entrySet()) { - writer.writeObject(entry.getKey()); - writer.writeObject(entry.getValue()); - } - } - else { - for (Map.Entry entry : map.entrySet()) - writeClo.write(writer, entry.getKey(), entry.getValue()); - } - } - - /** - * Read collection. - * - * @param reader Reader. - * @return List. - */ - public static List readCollection(PortableRawReaderEx reader) { - return readCollection(reader, null); - } - - /** - * Read collection. - * - * @param reader Reader. - * @param readClo Optional reader closure. - * @return List. - */ - public static List readCollection(PortableRawReaderEx reader, @Nullable PlatformReaderClosure readClo) { - int cnt = reader.readInt(); - - List res = new ArrayList<>(cnt); - - if (readClo == null) { - for (int i = 0; i < cnt; i++) - res.add((T)reader.readObjectDetached()); - } - else { - for (int i = 0; i < cnt; i++) - res.add(readClo.read(reader)); - } - - return res; - } - - /** - * Read nullable collection. - * - * @param reader Reader. - * @return List. - */ - public static List readNullableCollection(PortableRawReaderEx reader) { - return readNullableCollection(reader, null); - } - - /** - * Read nullable collection. - * - * @param reader Reader. - * @return List. - */ - public static List readNullableCollection(PortableRawReaderEx reader, - @Nullable PlatformReaderClosure readClo) { - if (!reader.readBoolean()) - return null; - - return readCollection(reader, readClo); - } - - /** - * @param reader Reader. - * @return Set. - */ - public static Set readSet(PortableRawReaderEx reader) { - int cnt = reader.readInt(); - - Set res = U.newHashSet(cnt); - - for (int i = 0; i < cnt; i++) - res.add((T)reader.readObjectDetached()); - - return res; - } - - /** - * @param reader Reader. - * @return Set. - */ - public static Set readNullableSet(PortableRawReaderEx reader) { - if (!reader.readBoolean()) - return null; - - return readSet(reader); - } - - /** - * Read map. - * - * @param reader Reader. - * @return Map. - */ - public static Map readMap(PortableRawReaderEx reader) { - return readMap(reader, null); - } - - /** - * Read map. - * - * @param reader Reader. - * @param readClo Reader closure. - * @return Map. - */ - public static Map readMap(PortableRawReaderEx reader, - @Nullable PlatformReaderBiClosure readClo) { - int cnt = reader.readInt(); - - Map map = U.newHashMap(cnt); - - if (readClo == null) { - for (int i = 0; i < cnt; i++) - map.put((K)reader.readObjectDetached(), (V)reader.readObjectDetached()); - } - else { - for (int i = 0; i < cnt; i++) { - IgniteBiTuple entry = readClo.read(reader); - - map.put(entry.getKey(), entry.getValue()); - } - } - - return map; - } - - /** - * Read nullable map. - * - * @param reader Reader. - * @return Map. - */ - public static Map readNullableMap(PortableRawReaderEx reader) { - if (!reader.readBoolean()) - return null; - - return readMap(reader); - } - - /** - * Writes IgniteUuid to a writer. - * - * @param writer Writer. - * @param val Values. - */ - public static void writeIgniteUuid(PortableRawWriterEx writer, IgniteUuid val) { - if (val == null) - writer.writeUuid(null); - else { - writer.writeUuid(val.globalId()); - writer.writeLong(val.localId()); - } - } - - /** - * Convert native cache peek modes to Java cache peek modes. - * - * @param modes Encoded peek modes. - * @return Cache peek modes. - */ - public static CachePeekMode[] decodeCachePeekModes(int modes) { - // 1. Try getting cache value. - CachePeekMode[] res = CACHE_PEEK_MODES[modes]; - - if (res == null) { - // 2. Calculate modes from scratch. - List res0 = new ArrayList<>(CACHE_PEEK_MODES_CNT); - - for (int i = 0; i < CACHE_PEEK_MODES_CNT; i++) { - int mask = 1 << i; - - if ((modes & mask) == mask) - res0.add(CachePeekMode.fromOrdinal((byte)i)); - } - - res = res0.toArray(new CachePeekMode[res0.size()]); - - synchronized (PlatformUtils.class) { - CACHE_PEEK_MODES[modes] = res; - } - } - - return res; - } - - /** - * Unwrap query exception. - * - * @param err Initial error. - * @return Unwrapped error. - */ - public static IgniteCheckedException unwrapQueryException(Throwable err) { - assert err != null; - - Throwable parent = err; - Throwable child = parent.getCause(); - - while (true) { - if (child == null || child == parent) - break; - - if (child instanceof IgniteException || child instanceof IgniteCheckedException - || child instanceof CacheException) { - // Continue unwrapping. - parent = child; - - child = parent.getCause(); - - continue; - } - - break; - } - - // Specific exception found, but detailed message doesn't exist. Just pass exception name then. - if (parent.getMessage() == null) - return new IgniteCheckedException("Query execution failed due to exception: " + - parent.getClass().getName(), err); - - return new IgniteCheckedException(parent.getMessage(), err); - } - - /** - * Apply continuous query events to listener. - * - * @param ctx Context. - * @param lsnrPtr Listener pointer. - * @param evts Events. - * @throws javax.cache.event.CacheEntryListenerException In case of failure. - */ - public static void applyContinuousQueryEvents(PlatformContext ctx, long lsnrPtr, Iterable evts) - throws CacheEntryListenerException { - assert lsnrPtr != 0; - assert evts != null; - - try (PlatformMemory mem = ctx.memory().allocate()) { - PlatformOutputStream out = mem.output(); - - PortableRawWriterEx writer = ctx.writer(out); - - int cntPos = writer.reserveInt(); - - int cnt = 0; - - for (CacheEntryEvent evt : evts) { - writeCacheEntryEvent(writer, evt); - - cnt++; - } - - writer.writeInt(cntPos, cnt); - - out.synchronize(); - - ctx.gateway().continuousQueryListenerApply(lsnrPtr, mem.pointer()); - } - catch (Exception e) { - throw toCacheEntryListenerException(e); - } - } - - /** - * Evaluate the filter. - * - * @param ctx Context. - * @param filterPtr Native filter pointer. - * @param evt Event. - * @return Result. - * @throws CacheEntryListenerException In case of failure. - */ - public static boolean evaluateContinuousQueryEvent(PlatformContext ctx, long filterPtr, CacheEntryEvent evt) - throws CacheEntryListenerException { - assert filterPtr != 0; - - try (PlatformMemory mem = ctx.memory().allocate()) { - PlatformOutputStream out = mem.output(); - - writeCacheEntryEvent(ctx.writer(out), evt); - - out.synchronize(); - - return ctx.gateway().continuousQueryFilterApply(filterPtr, mem.pointer()) == 1; - } - catch (Exception e) { - throw toCacheEntryListenerException(e); - } - } - - /** - * Convert exception into listener exception. - * - * @param e Listener exception. - * @return Exception. - */ - private static CacheEntryListenerException toCacheEntryListenerException(Exception e) { - assert e != null; - - return e instanceof CacheEntryListenerException ? (CacheEntryListenerException)e : e.getMessage() != null ? - new CacheEntryListenerException(e.getMessage(), e) : new CacheEntryListenerException(e); - } - - /** - * Write event to the writer. - * - * @param writer Writer. - * @param evt Event. - */ - private static void writeCacheEntryEvent(PortableRawWriterEx writer, CacheEntryEvent evt) { - writer.writeObjectDetached(evt.getKey()); - writer.writeObjectDetached(evt.getOldValue()); - writer.writeObjectDetached(evt.getValue()); - } - - /** - * Writer error data. - * - * @param err Error. - * @param writer Writer. - */ - public static void writeErrorData(Throwable err, PortableRawWriterEx writer) { - writeErrorData(err, writer, null); - } - - /** - * Write error data. - * @param err Error. - * @param writer Writer. - * @param log Optional logger. - */ - public static void writeErrorData(Throwable err, PortableRawWriterEx writer, @Nullable IgniteLogger log) { - // Write additional data if needed. - if (err instanceof PlatformExtendedException) { - PlatformExtendedException err0 = (PlatformExtendedException)err; - - writer.writeBoolean(true); // Data exists. - - int pos = writer.out().position(); - - try { - writer.writeBoolean(true); // Optimistically assume that we will be able to write it. - err0.writeData(writer); - } - catch (Exception e) { - if (log != null) - U.warn(log, "Failed to write interop exception data: " + e.getMessage(), e); - - writer.out().position(pos); - - writer.writeBoolean(false); // Error occurred. - writer.writeString(e.getClass().getName()); - - String innerMsg; - - try { - innerMsg = e.getMessage(); - } - catch (Exception innerErr) { - innerMsg = "Exception message is not available."; - } - - writer.writeString(innerMsg); - } - } - else - writer.writeBoolean(false); - } - - /** - * Get GridGain platform processor. - * - * @param grid Ignite instance. - * @return Platform processor. - */ - public static PlatformProcessor platformProcessor(Ignite grid) { - GridKernalContext ctx = ((IgniteKernal) grid).context(); - - return ctx.platform(); - } - - /** - * Gets interop context for the grid. - * - * @param grid Grid - * @return Context. - */ - public static PlatformContext platformContext(Ignite grid) { - return platformProcessor(grid).context(); - } - - /** - * Reallocate arbitrary memory chunk. - * - * @param memPtr Memory pointer. - * @param cap Capacity. - */ - public static void reallocate(long memPtr, int cap) { - PlatformMemoryUtils.reallocate(memPtr, cap); - } - - /** - * Get error data. - * - * @param err Error. - * @return Error data. - */ - @SuppressWarnings("UnusedDeclaration") - public static byte[] errorData(Throwable err) { - if (err instanceof PlatformExtendedException) { - PlatformContext ctx = ((PlatformExtendedException)err).context(); - - try (PlatformMemory mem = ctx.memory().allocate()) { - // Write error data. - PlatformOutputStream out = mem.output(); - - PortableRawWriterEx writer = ctx.writer(out); - - try { - PlatformUtils.writeErrorData(err, writer, ctx.kernalContext().log(PlatformContext.class)); - } - finally { - out.synchronize(); - } - - // Read error data into separate array. - PlatformInputStream in = mem.input(); - - in.synchronize(); - - int len = in.remaining(); - - assert len > 0; - - byte[] arr = in.array(); - byte[] res = new byte[len]; - - System.arraycopy(arr, 0, res, 0, len); - - return res; - } - } - else - return null; - } - - /** - * Writes invocation result (of a job/service/etc) using a common protocol. - * - * @param writer Writer. - * @param resObj Result. - * @param err Error. - */ - public static void writeInvocationResult(PortableRawWriterEx writer, Object resObj, Exception err) - { - if (err == null) { - writer.writeBoolean(true); - writer.writeObject(resObj); - } - else { - writer.writeBoolean(false); - - PlatformNativeException nativeErr = null; - - if (err instanceof IgniteCheckedException) - nativeErr = ((IgniteCheckedException)err).getCause(PlatformNativeException.class); - else if (err instanceof IgniteException) - nativeErr = ((IgniteException)err).getCause(PlatformNativeException.class); - - if (nativeErr == null) { - writer.writeBoolean(false); - writer.writeString(err.getClass().getName()); - writer.writeString(err.getMessage()); - } - else { - writer.writeBoolean(true); - writer.writeObject(nativeErr.cause()); - } - } - } - - /** - * Reads invocation result (of a job/service/etc) using a common protocol. - * - * @param ctx Platform context. - * @param reader Reader. - * @return Result. - * @throws IgniteCheckedException When invocation result is an error. - */ - public static Object readInvocationResult(PlatformContext ctx, PortableRawReaderEx reader) - throws IgniteCheckedException { - // 1. Read success flag. - boolean success = reader.readBoolean(); - - if (success) - // 2. Return result as is. - return reader.readObjectDetached(); - else { - // 3. Read whether exception is in form of object or string. - boolean hasException = reader.readBoolean(); - - if (hasException) { - // 4. Full exception. - Object nativeErr = reader.readObjectDetached(); - - assert nativeErr != null; - - throw ctx.createNativeException(nativeErr); - } - else { - // 5. Native exception was not serializable, we have only message. - String errMsg = reader.readString(); - - assert errMsg != null; - - throw new IgniteCheckedException(errMsg); - } - } - } - - /** - * Write .Net configuration to the stream. - * - * @param writer Writer. - * @param cfg Configuration. - */ - public static void writeDotNetConfiguration(PortableRawWriterEx writer, PlatformDotNetConfiguration cfg) { - // 1. Write assemblies. - writeNullableCollection(writer, cfg.getAssemblies()); - - PlatformDotNetPortableConfiguration portableCfg = cfg.getPortableConfiguration(); - - if (portableCfg != null) { - writer.writeBoolean(true); - - writeNullableCollection(writer, portableCfg.getTypesConfiguration(), - new PlatformWriterClosure() { - @Override public void write(PortableRawWriterEx writer, PlatformDotNetPortableTypeConfiguration typ) { - writer.writeString(typ.getAssemblyName()); - writer.writeString(typ.getTypeName()); - writer.writeString(typ.getNameMapper()); - writer.writeString(typ.getIdMapper()); - writer.writeString(typ.getSerializer()); - writer.writeString(typ.getAffinityKeyFieldName()); - writer.writeObject(typ.getMetadataEnabled()); - writer.writeObject(typ.getKeepDeserialized()); - } - }); - - writeNullableCollection(writer, portableCfg.getTypes()); - writer.writeString(portableCfg.getDefaultNameMapper()); - writer.writeString(portableCfg.getDefaultIdMapper()); - writer.writeString(portableCfg.getDefaultSerializer()); - writer.writeBoolean(portableCfg.isDefaultMetadataEnabled()); - writer.writeBoolean(portableCfg.isDefaultKeepDeserialized()); - } - else - writer.writeBoolean(false); - } - - /** - * Private constructor. - */ - private PlatformUtils() { - // No-op. - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterBiClosure.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterBiClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterBiClosure.java deleted file mode 100644 index 6b04ad3..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterBiClosure.java +++ /dev/null @@ -1,34 +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.platform.utils; - -import org.apache.ignite.internal.portable.PortableRawWriterEx; - -/** - * Interop writer bi-closure. - */ -public interface PlatformWriterBiClosure { - /** - * Write values. - * - * @param writer Writer. - * @param val1 Value 1. - * @param val2 Value 2. - */ - public void write(PortableRawWriterEx writer, T1 val1, T2 val2); -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterClosure.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterClosure.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterClosure.java deleted file mode 100644 index a67d70a..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformWriterClosure.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.processors.platform.utils; - -import org.apache.ignite.internal.portable.PortableRawWriterEx; - -/** - * Interop writer closure. - */ -public interface PlatformWriterClosure { - /** - * Write value. - * - * @param writer Writer. - * @param val Value. - */ - public void write(PortableRawWriterEx writer, T val); -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/cpp/PlatformCppConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/cpp/PlatformCppConfiguration.java b/modules/platform/src/main/java/org/apache/ignite/platform/cpp/PlatformCppConfiguration.java deleted file mode 100644 index 18f8a43..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/cpp/PlatformCppConfiguration.java +++ /dev/null @@ -1,47 +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.platform.cpp; - -import org.apache.ignite.configuration.PlatformConfiguration; -import org.apache.ignite.internal.util.typedef.internal.S; - -/** - * Platform CPP configuration. - */ -public class PlatformCppConfiguration implements PlatformConfiguration { - /** - * Default constructor. - */ - public PlatformCppConfiguration() { - // No-op. - } - - /** - * Copying constructor. - * - * @param cfg Configuration to copy. - */ - public PlatformCppConfiguration(PlatformConfiguration cfg) { - // No-op. - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(PlatformConfiguration.class, this); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java b/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java deleted file mode 100644 index 6d745a7..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java +++ /dev/null @@ -1,22 +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. - */ - -/** - * - * Contains C++ platform-related classes. - */ -package org.apache.ignite.platform.cpp; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetCacheStoreFactory.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetCacheStoreFactory.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetCacheStoreFactory.java deleted file mode 100644 index 97f0dce..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetCacheStoreFactory.java +++ /dev/null @@ -1,139 +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.platform.dotnet; - -import org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore; - -import javax.cache.configuration.Factory; -import java.util.Map; - -/** - * Wrapper for .NET cache store implementations. - *

- * This wrapper should be used if you have an implementation of - * {@code GridGain.Cache.IGridCacheStore} interface in .NET and - * would like to configure it a persistence storage for your cache. - * To do tis you will need to configure the wrapper via - * {@link org.apache.ignite.configuration.CacheConfiguration#setCacheStoreFactory(javax.cache.configuration.Factory)} property - * and provide assembly name and class name of your .NET store - * implementation (both properties are mandatory): - *

- * <bean class="org.apache.ignite.cache.CacheConfiguration">
- *     ...
- *     <property name="cacheStoreFactory">
- *         <bean class="org.gridgain.grid.interop.dotnet.InteropDotNetCacheStoreFactory">
- *             <property name="assemblyName" value="MyAssembly"/>
- *             <property name="className" value="MyApp.MyCacheStore"/>
- *         </bean>
- *     </property>
- *     ...
- * </bean>
- * 
- * If properly configured, this wrapper will instantiate an instance - * of your cache store in .NET and delegate all calls to that instance. - * To create an instance, assembly name and class name are passed to - * System.Activator.CreateInstance(String, String) - * method in .NET during node startup. Refer to its documentation for - * details. - */ -public class PlatformDotNetCacheStoreFactory implements Factory { - /** */ - private static final long serialVersionUID = 0L; - - /** .Net assembly name. */ - private String assemblyName; - - /** .Net class name. */ - private String clsName; - - /** Properties. */ - private Map props; - - /** Instance. */ - private transient PlatformDotNetCacheStore instance; - - /** - * Gets .NET assembly name. - * - * @return .NET assembly name. - */ - public String getAssemblyName() { - return assemblyName; - } - - /** - * Set .NET assembly name. - * - * @param assemblyName .NET assembly name. - */ - public void setAssemblyName(String assemblyName) { - this.assemblyName = assemblyName; - } - - /** - * Gets .NET class name. - * - * @return .NET class name. - */ - public String getClassName() { - return clsName; - } - - /** - * Sets .NET class name. - * - * @param clsName .NET class name. - */ - public void setClassName(String clsName) { - this.clsName = clsName; - } - - /** - * Get properties. - * - * @return Properties. - */ - public Map getProperties() { - return props; - } - - /** - * Set properties. - * - * @param props Properties. - */ - public void setProperties(Map props) { - this.props = props; - } - - /** {@inheritDoc} */ - @SuppressWarnings("unchecked") - @Override public PlatformDotNetCacheStore create() { - synchronized (this) { - if (instance == null) { - instance = new PlatformDotNetCacheStore(); - - instance.setAssemblyName(assemblyName); - instance.setClassName(clsName); - instance.setProperties(props); - } - - return instance; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java deleted file mode 100644 index 0550bab..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java +++ /dev/null @@ -1,97 +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.platform.dotnet; - -import org.apache.ignite.configuration.PlatformConfiguration; -import org.apache.ignite.internal.util.typedef.internal.S; - -import java.util.ArrayList; -import java.util.List; - -/** - * Mirror of .Net class Configuration.cs - */ -public class PlatformDotNetConfiguration implements PlatformConfiguration { - /** */ - private PlatformDotNetPortableConfiguration portableCfg; - - /** */ - private List assemblies; - - /** - * Default constructor. - */ - public PlatformDotNetConfiguration() { - // No-op. - } - - /** - * Copy constructor. - * - * @param cfg Configuration to copy. - */ - public PlatformDotNetConfiguration(PlatformDotNetConfiguration cfg) { - if (cfg.getPortableConfiguration() != null) - portableCfg = new PlatformDotNetPortableConfiguration(cfg.getPortableConfiguration()); - - if (cfg.getAssemblies() != null) - assemblies = new ArrayList<>(cfg.getAssemblies()); - } - - /** - * @return Configuration. - */ - public PlatformDotNetPortableConfiguration getPortableConfiguration() { - return portableCfg; - } - - /** - * @param portableCfg Configuration. - */ - public void setPortableConfiguration(PlatformDotNetPortableConfiguration portableCfg) { - this.portableCfg = portableCfg; - } - - /** - * @return Assemblies. - */ - public List getAssemblies() { - return assemblies; - } - - /** - * - * @param assemblies Assemblies. - */ - public void setAssemblies(List assemblies) { - this.assemblies = assemblies; - } - - /** - * @return Configuration copy. - */ - @SuppressWarnings("UnusedDeclaration") - private PlatformDotNetConfiguration copy() { - return new PlatformDotNetConfiguration(this); - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(PlatformDotNetConfiguration.class, this); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetLifecycleBean.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetLifecycleBean.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetLifecycleBean.java deleted file mode 100644 index 8e4b590..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetLifecycleBean.java +++ /dev/null @@ -1,109 +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.platform.dotnet; - -import org.apache.ignite.internal.processors.platform.lifecycle.PlatformLifecycleBean; -import org.apache.ignite.lifecycle.LifecycleBean; - -import java.util.Map; - -/** - * Lifecycle bean implementation which can be used to configure .Net lifecycle beans in Java Spring configuration. - */ -public class PlatformDotNetLifecycleBean extends PlatformLifecycleBean implements LifecycleBean { - /** Assembly name. */ - private String assemblyName; - - /** Class name. */ - private String clsName; - - /** Properties. */ - private Map props; - - /** - * Constructor. - */ - public PlatformDotNetLifecycleBean() { - // No-op. - } - - /** - * Constructor. - * - * @param assemblyName Assembly name. - * @param clsName Class name. - */ - public PlatformDotNetLifecycleBean(String assemblyName, String clsName) { - this.assemblyName = assemblyName; - this.clsName = clsName; - } - - /** - * Get assembly name. - * - * @return Assembly name. - */ - public String getAssemblyName() { - return assemblyName; - } - - /** - * Set assembly name. - * - * @param assemblyName Assembly name. - */ - public void setAssemblyName(String assemblyName) { - this.assemblyName = assemblyName; - } - - /** - * Get class name. - * - * @return Class name. - */ - public String getClassName() { - return clsName; - } - - /** - * Set class name. - * - * @param clsName Class name. - */ - public void setClassName(String clsName) { - this.clsName = clsName; - } - - /** - * Get properties. - * - * @return Properties. - */ - public Map getProperties() { - return props; - } - - /** - * Set properties. - * - * @param props Properties. - */ - public void setProperties(Map props) { - this.props = props; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java deleted file mode 100644 index dd7b988..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java +++ /dev/null @@ -1,196 +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.platform.dotnet; - -import org.apache.ignite.internal.util.typedef.internal.S; - -import java.util.ArrayList; -import java.util.Collection; - -/** - * Mirror of .Net class PortableConfiguration.cs - */ -public class PlatformDotNetPortableConfiguration { - /** Type cfgs. */ - private Collection typesCfg; - - /** Types. */ - private Collection types; - - /** Default name mapper. */ - private String dfltNameMapper; - - /** Default id mapper. */ - private String dfltIdMapper; - - /** Default serializer. */ - private String dfltSerializer; - - /** Default metadata enabled. */ - private boolean dfltMetadataEnabled = true; - - /** Whether to cache deserialized value in IGridPortableObject */ - private boolean dfltKeepDeserialized = true; - - /** - * Default constructor. - */ - public PlatformDotNetPortableConfiguration() { - // No-op. - } - - /** - * Copy constructor. - * @param cfg configuration to copy. - */ - public PlatformDotNetPortableConfiguration(PlatformDotNetPortableConfiguration cfg) { - if (cfg.getTypesConfiguration() != null) { - typesCfg = new ArrayList<>(); - - for (PlatformDotNetPortableTypeConfiguration typeCfg : cfg.getTypesConfiguration()) - typesCfg.add(new PlatformDotNetPortableTypeConfiguration(typeCfg)); - } - - if (cfg.getTypes() != null) - types = new ArrayList<>(cfg.getTypes()); - - dfltNameMapper = cfg.getDefaultNameMapper(); - dfltIdMapper = cfg.getDefaultIdMapper(); - dfltSerializer = cfg.getDefaultSerializer(); - dfltMetadataEnabled = cfg.isDefaultMetadataEnabled(); - dfltKeepDeserialized = cfg.isDefaultKeepDeserialized(); - } - - /** - * @return Type cfgs. - */ - public Collection getTypesConfiguration() { - return typesCfg; - } - - /** - * @param typesCfg New type cfgs. - */ - public void setTypesConfiguration(Collection typesCfg) { - this.typesCfg = typesCfg; - } - - /** - * @return Types. - */ - public Collection getTypes() { - return types; - } - - /** - * @param types New types. - */ - public void setTypes(Collection types) { - this.types = types; - } - - /** - * @return Default name mapper. - */ - public String getDefaultNameMapper() { - return dfltNameMapper; - } - - /** - * @param dfltNameMapper New default name mapper. - */ - public void setDefaultNameMapper(String dfltNameMapper) { - this.dfltNameMapper = dfltNameMapper; - } - - /** - * @return Default id mapper. - */ - public String getDefaultIdMapper() { - return dfltIdMapper; - } - - /** - * @param dfltIdMapper New default id mapper. - */ - public void setDefaultIdMapper(String dfltIdMapper) { - this.dfltIdMapper = dfltIdMapper; - } - - /** - * @return Default serializer. - */ - public String getDefaultSerializer() { - return dfltSerializer; - } - - /** - * @param dfltSerializer New default serializer. - */ - public void setDefaultSerializer(String dfltSerializer) { - this.dfltSerializer = dfltSerializer; - } - - /** - * Gets default metadata enabled flag. See {@link #setDefaultMetadataEnabled(boolean)} for more information. - * - * @return Default metadata enabled flag. - */ - public boolean isDefaultMetadataEnabled() { - return dfltMetadataEnabled; - } - - /** - * Sets default metadata enabled flag. When set to {@code true} all portable types will save it's metadata to - * cluster. - *

- * Can be overridden for particular type using - * {@link PlatformDotNetPortableTypeConfiguration#setMetadataEnabled(Boolean)}. - * - * @param dfltMetadataEnabled Default metadata enabled flag. - */ - public void setDefaultMetadataEnabled(boolean dfltMetadataEnabled) { - this.dfltMetadataEnabled = dfltMetadataEnabled; - } - - /** - * Gets default keep deserialized flag. See {@link #setDefaultKeepDeserialized(boolean)} for more information. - * - * @return Flag indicates whether to cache deserialized value in IGridPortableObject. - */ - public boolean isDefaultKeepDeserialized() { - return dfltKeepDeserialized; - } - - /** - * Sets default keep deserialized flag. - *

- * Can be overridden for particular type using - * {@link PlatformDotNetPortableTypeConfiguration#setKeepDeserialized(Boolean)}. - * - * @param keepDeserialized Keep deserialized flag. - */ - public void setDefaultKeepDeserialized(boolean keepDeserialized) { - this.dfltKeepDeserialized = keepDeserialized; - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(PlatformDotNetPortableConfiguration.class, this); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java deleted file mode 100644 index b04d2a7..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java +++ /dev/null @@ -1,214 +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.platform.dotnet; - -import org.apache.ignite.internal.util.typedef.internal.S; -import org.jetbrains.annotations.Nullable; - -/** - * Mirror of .Net class GridDotNetPortableTypeConfiguration.cs - */ -public class PlatformDotNetPortableTypeConfiguration { - /** Assembly name. */ - private String assemblyName; - - /** Type name. */ - private String typeName; - - /** Name mapper. */ - private String nameMapper; - - /** Id mapper. */ - private String idMapper; - - /** Serializer. */ - private String serializer; - - /** Affinity key field name. */ - private String affinityKeyFieldName; - - /** Metadata enabled. */ - private Boolean metadataEnabled; - - /** Whether to cache deserialized value in IGridPortableObject. */ - private Boolean keepDeserialized; - - /** - * Default constructor. - */ - public PlatformDotNetPortableTypeConfiguration() { - // No-op. - } - - /** - * Copy constructor. - * @param cfg configuration to copy. - */ - public PlatformDotNetPortableTypeConfiguration(PlatformDotNetPortableTypeConfiguration cfg) { - assemblyName = cfg.getAssemblyName(); - typeName = cfg.getTypeName(); - nameMapper = cfg.getNameMapper(); - idMapper = cfg.getIdMapper(); - serializer = cfg.getSerializer(); - affinityKeyFieldName = cfg.getAffinityKeyFieldName(); - metadataEnabled = cfg.getMetadataEnabled(); - keepDeserialized = cfg.isKeepDeserialized(); - } - - /** - * @return Assembly name. - */ - public String getAssemblyName() { - return assemblyName; - } - - /** - * @param assemblyName New assembly name. - */ - public void setAssemblyName(String assemblyName) { - this.assemblyName = assemblyName; - } - - /** - * @return Type name. - */ - public String getTypeName() { - return typeName; - } - - /** - * @param typeName New type name. - */ - public void setTypeName(String typeName) { - this.typeName = typeName; - } - - /** - * @return Name mapper. - */ - public String getNameMapper() { - return nameMapper; - } - - /** - * @param nameMapper New name mapper. - */ - public void setNameMapper(String nameMapper) { - this.nameMapper = nameMapper; - } - - /** - * @return Id mapper. - */ - public String getIdMapper() { - return idMapper; - } - - /** - * @param idMapper New id mapper. - */ - public void setIdMapper(String idMapper) { - this.idMapper = idMapper; - } - - /** - * @return Serializer. - */ - public String getSerializer() { - return serializer; - } - - /** - * @param serializer New serializer. - */ - public void setSerializer(String serializer) { - this.serializer = serializer; - } - - /** - * Gets metadata enabled flag. See {@link #setMetadataEnabled(Boolean)} for more information. - * - * @return Metadata enabled flag. - */ - public Boolean getMetadataEnabled() { - return metadataEnabled; - } - - /** - * Sets metadata enabled flag. - *

- * When set to {@code null} default value taken from - * {@link PlatformDotNetPortableConfiguration#isDefaultMetadataEnabled()} will be used. - * - * @param metadataEnabled New metadata enabled. - */ - public void setMetadataEnabled(Boolean metadataEnabled) { - this.metadataEnabled = metadataEnabled; - } - - /** - * @return Affinity key field name. - */ - public String getAffinityKeyFieldName() { - return affinityKeyFieldName; - } - - /** - * @param affinityKeyFieldName Affinity key field name. - */ - public void setAffinityKeyFieldName(String affinityKeyFieldName) { - this.affinityKeyFieldName = affinityKeyFieldName; - } - - /** - * Gets keep deserialized flag. - * - * @return Flag indicates whether to cache deserialized value in IGridPortableObject. - * @deprecated Use {@link #getKeepDeserialized()} instead. - */ - @Deprecated - @Nullable public Boolean isKeepDeserialized() { - return keepDeserialized; - } - - /** - * Gets keep deserialized flag. See {@link #setKeepDeserialized(Boolean)} for more information. - * - * @return Flag indicates whether to cache deserialized value in IGridPortableObject. - */ - @Nullable public Boolean getKeepDeserialized() { - return keepDeserialized; - } - - /** - * Sets keep deserialized flag. - *

- * When set to {@code null} default value taken from - * {@link PlatformDotNetPortableConfiguration#isDefaultKeepDeserialized()} will be used. - * - * @param keepDeserialized Keep deserialized flag. - */ - public void setKeepDeserialized(@Nullable Boolean keepDeserialized) { - this.keepDeserialized = keepDeserialized; - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(PlatformDotNetPortableTypeConfiguration.class, this); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java deleted file mode 100644 index 0765e01..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java +++ /dev/null @@ -1,22 +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. - */ - -/** - * - * Contains .Net platform-related classes. - */ -package org.apache.ignite.platform.dotnet; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java b/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java deleted file mode 100644 index ac89b58..0000000 --- a/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java +++ /dev/null @@ -1,22 +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. - */ - -/** - * - * Contains platform-related classes. - */ -package org.apache.ignite.platform; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeBroadcastTask.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeBroadcastTask.java b/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeBroadcastTask.java deleted file mode 100644 index c721e16..0000000 --- a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeBroadcastTask.java +++ /dev/null @@ -1,73 +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.platform; - -import org.apache.ignite.Ignite; -import org.apache.ignite.cluster.ClusterNode; -import org.apache.ignite.compute.ComputeJob; -import org.apache.ignite.compute.ComputeJobAdapter; -import org.apache.ignite.compute.ComputeJobResult; -import org.apache.ignite.compute.ComputeTaskAdapter; -import org.apache.ignite.resources.IgniteInstanceResource; -import org.jetbrains.annotations.Nullable; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -/** - * Task collecting IDs of all nodes where it was executed. - */ -public class PlatformComputeBroadcastTask extends ComputeTaskAdapter> { - /** {@inheritDoc} */ - @Nullable @Override public Map map(List subgrid, @Nullable Object arg) { - Map jobs = new HashMap<>(); - - for (ClusterNode node : subgrid) - jobs.put(new BroadcastJob(), node); - - return jobs; - } - - /** {@inheritDoc} */ - @Nullable @Override public Collection reduce(List results) { - List ids = new ArrayList<>(); - - for (ComputeJobResult res : results) - ids.add((UUID)res.getData()); - - return ids; - } - - /** - * Job. - */ - private static class BroadcastJob extends ComputeJobAdapter { - /** */ - @IgniteInstanceResource - private Ignite ignite; - - /** {@inheritDoc} */ - @Nullable @Override public Object execute() { - return ignite.cluster().localNode().id(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeDecimalTask.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeDecimalTask.java b/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeDecimalTask.java deleted file mode 100644 index a14e481..0000000 --- a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeDecimalTask.java +++ /dev/null @@ -1,106 +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.platform; - -import org.apache.ignite.IgniteException; -import org.apache.ignite.cluster.ClusterNode; -import org.apache.ignite.compute.ComputeJob; -import org.apache.ignite.compute.ComputeJobAdapter; -import org.apache.ignite.compute.ComputeJobResult; -import org.apache.ignite.compute.ComputeTaskAdapter; -import org.apache.ignite.internal.util.typedef.F; -import org.jetbrains.annotations.Nullable; - -import java.io.Externalizable; -import java.io.IOException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.math.BigDecimal; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -@SuppressWarnings({"ConstantConditions", "UnusedDeclaration"}) -public class PlatformComputeDecimalTask extends ComputeTaskAdapter { - /** {@inheritDoc} */ - @Nullable @Override public Map map(List subgrid, @Nullable Object[] arg) { - return Collections.singletonMap(new DecimalJob((BigDecimal)arg[0], (String)arg[1]), F.first(subgrid)); - } - - /** {@inheritDoc} */ - @SuppressWarnings("ThrowableResultOfMethodCallIgnored") - @Nullable @Override public BigDecimal reduce(List results) { - ComputeJobResult res = results.get(0); - - if (res.getException() != null) - throw res.getException(); - else - return results.get(0).getData(); - } - - /** - * Job. - */ - private static class DecimalJob extends ComputeJobAdapter implements Externalizable { - /** Value. */ - private BigDecimal val; - - /** Value as string. */ - private String valStr; - - /** - * Constructor. - */ - public DecimalJob() { - // No-op. - } - - /** - * Constructor. - * - * @param val Value. - * @param valStr Value as string. - */ - private DecimalJob(BigDecimal val, String valStr) { - this.val = val; - this.valStr = valStr; - } - - /** {@inheritDoc} */ - @Nullable @Override public Object execute() { - BigDecimal exp = new BigDecimal(valStr.replace(',', '.')); - - if (val != null && !exp.equals(val)) - throw new IgniteException("Actual=" + val); - - return exp; - } - - /** {@inheritDoc} */ - @Override public void writeExternal(ObjectOutput out) throws IOException { - out.writeObject(val); - out.writeObject(valStr); - } - - /** {@inheritDoc} */ - @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { - val = (BigDecimal)in.readObject(); - valStr = (String)in.readObject(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java b/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java deleted file mode 100644 index f64ca7d..0000000 --- a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEchoTask.java +++ /dev/null @@ -1,188 +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.platform; - -import org.apache.ignite.IgniteException; -import org.apache.ignite.cluster.ClusterNode; -import org.apache.ignite.compute.ComputeJob; -import org.apache.ignite.compute.ComputeJobAdapter; -import org.apache.ignite.compute.ComputeJobResult; -import org.apache.ignite.compute.ComputeTaskAdapter; -import org.apache.ignite.internal.util.typedef.F; -import org.jetbrains.annotations.Nullable; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * Test task producing result without any arguments. - */ -public class PlatformComputeEchoTask extends ComputeTaskAdapter { - /** Type: NULL. */ - private static final int TYPE_NULL = 0; - - /** Type: byte. */ - private static final int TYPE_BYTE = 1; - - /** Type: bool. */ - private static final int TYPE_BOOL = 2; - - /** Type: short. */ - private static final int TYPE_SHORT = 3; - - /** Type: char. */ - private static final int TYPE_CHAR = 4; - - /** Type: int. */ - private static final int TYPE_INT = 5; - - /** Type: long. */ - private static final int TYPE_LONG = 6; - - /** Type: float. */ - private static final int TYPE_FLOAT = 7; - - /** Type: double. */ - private static final int TYPE_DOUBLE = 8; - - /** Type: array. */ - private static final int TYPE_ARRAY = 9; - - /** Type: collection. */ - private static final int TYPE_COLLECTION = 10; - - /** Type: map. */ - private static final int TYPE_MAP = 11; - - /** Type: portable object which exists in all platforms. */ - private static final int TYPE_PORTABLE = 12; - - /** Type: portable object which exists only in Java. */ - private static final int TYPE_PORTABLE_JAVA = 13; - - /** Type: object array. */ - private static final int TYPE_OBJ_ARRAY = 14; - - /** Type: portable object array. */ - private static final int TYPE_PORTABLE_ARRAY = 15; - - /** Type: enum. */ - private static final int TYPE_ENUM = 16; - - /** Type: enum array. */ - private static final int TYPE_ENUM_ARRAY = 17; - - /** {@inheritDoc} */ - @Nullable @Override public Map map(List subgrid, - @Nullable Integer arg) { - return Collections.singletonMap(new EchoJob(arg), F.first(subgrid)); - } - - /** {@inheritDoc} */ - @Nullable @Override public Object reduce(List results) { - return results.get(0).getData(); - } - - /** - * Job. - */ - private static class EchoJob extends ComputeJobAdapter { - /** Type. */ - private Integer type; - - /** - * Constructor. - * - * @param type Result type. - */ - public EchoJob(Integer type) { - this.type = type; - } - - /** {@inheritDoc} */ - @Nullable @Override public Object execute() { - switch (type) { - case TYPE_NULL: - return null; - - case TYPE_BYTE: - return (byte)1; - - case TYPE_BOOL: - return true; - - case TYPE_SHORT: - return (short)1; - - case TYPE_CHAR: - return (char)1; - - case TYPE_INT: - return 1; - - case TYPE_LONG: - return (long)1; - - case TYPE_FLOAT: - return (float)1; - - case TYPE_DOUBLE: - return (double)1; - - case TYPE_ARRAY: - return new int[] { 1 }; - - case TYPE_COLLECTION: - return Collections.singletonList(1); - - case TYPE_MAP: - return Collections.singletonMap(1, 1); - - case TYPE_PORTABLE: - return new PlatformComputePortable(1); - - case TYPE_PORTABLE_JAVA: - return new PlatformComputeJavaPortable(1); - - case TYPE_OBJ_ARRAY: - return new String[] { "foo", "bar", "baz" }; - - case TYPE_PORTABLE_ARRAY: - return new PlatformComputePortable[] { - new PlatformComputePortable(1), - new PlatformComputePortable(2), - new PlatformComputePortable(3) - }; - - case TYPE_ENUM: - return PlatformComputeEnum.BAR; - - case TYPE_ENUM_ARRAY: - return new PlatformComputeEnum[] { - PlatformComputeEnum.BAR, - PlatformComputeEnum.BAZ, - PlatformComputeEnum.FOO - }; - - default: - throw new IgniteException("Unknown type: " + type); - } - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEnum.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEnum.java b/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEnum.java deleted file mode 100644 index 7fc0623..0000000 --- a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeEnum.java +++ /dev/null @@ -1,28 +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.platform; - -/** - * Test enum. - */ -public enum PlatformComputeEnum -{ - FOO, - BAR, - BAZ -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java b/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java deleted file mode 100644 index 7a940c4..0000000 --- a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputeJavaPortable.java +++ /dev/null @@ -1,39 +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.platform; - -/** - * Portable object defined only in Java. - */ -public class PlatformComputeJavaPortable extends PlatformComputePortable { - /** - * Constructor. - */ - public PlatformComputeJavaPortable() { - // No-op. - } - - /** - * Constructor. - * - * @param field Field. - */ - public PlatformComputeJavaPortable(int field) { - super(field); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/8045c820/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java b/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java deleted file mode 100644 index f31f093..0000000 --- a/modules/platform/src/test/java/org/apache/ignite/platform/PlatformComputePortable.java +++ /dev/null @@ -1,42 +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.platform; - -/** - * Portable object for task tests. - */ -public class PlatformComputePortable { - /** Field. */ - public int field; - - /** - * Constructor. - */ - public PlatformComputePortable() { - // No-op. - } - - /** - * Constructor, - * - * @param field Field. - */ - public PlatformComputePortable(int field) { - this.field = field; - } -} \ No newline at end of file