ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [08/50] incubator-ignite git commit: IGNITE-61 - Direct marshalling
Date Tue, 10 Feb 2015 11:17:07 GMT
IGNITE-61 - Direct marshalling


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8c4d06f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8c4d06f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8c4d06f5

Branch: refs/heads/ignite-82
Commit: 8c4d06f5285965871aa1b20bb0761a14ef627be4
Parents: db3d26a
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Sun Feb 8 18:01:29 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Sun Feb 8 18:01:29 2015 -0800

----------------------------------------------------------------------
 .../internal/managers/GridManagerAdapter.java   | 29 ++----------
 .../communication/MessageCallback.java          | 48 --------------------
 .../org/apache/ignite/spi/IgniteSpiAdapter.java | 21 ++-------
 .../org/apache/ignite/spi/IgniteSpiContext.java | 21 ---------
 .../testframework/GridSpiTestContext.java       | 11 -----
 5 files changed, 10 insertions(+), 120 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c4d06f5/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index 117fbe9..f321386 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -22,22 +22,21 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.managers.communication.*;
+import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.plugin.security.*;
 import org.apache.ignite.spi.*;
-import org.apache.ignite.internal.managers.communication.*;
-import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.spi.swapspace.*;
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
 import javax.cache.expiry.*;
 import java.io.*;
-import java.nio.*;
 import java.util.*;
 
 import static java.util.Arrays.*;
@@ -500,24 +499,6 @@ public abstract class GridManagerAdapter<T extends IgniteSpi> implements
GridMan
                         return null;
                     }
 
-                    @Override public boolean writeDelta(UUID nodeId, Object msg, ByteBuffer
buf) {
-                        for (MessageCallback patcher : ctx.plugins().extensions(MessageCallback.class))
{
-                            if (!patcher.onSend(nodeId, msg, buf))
-                                return false;
-                        }
-
-                        return true;
-                    }
-
-                    @Override public boolean readDelta(UUID nodeId, Class<?> msgCls,
ByteBuffer buf) {
-                        for (MessageCallback patcher : ctx.plugins().extensions(MessageCallback.class))
{
-                            if (!patcher.onReceive(nodeId, msgCls, buf))
-                                return false;
-                        }
-
-                        return true;
-                    }
-
                     @Override public Collection<GridSecuritySubject> authenticatedSubjects()
{
                         return ctx.grid().security().authenticatedSubjects();
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c4d06f5/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCallback.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCallback.java
b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCallback.java
deleted file mode 100644
index c347858..0000000
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageCallback.java
+++ /dev/null
@@ -1,48 +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.plugin.extensions.communication;
-
-import org.apache.ignite.plugin.*;
-
-import java.nio.*;
-import java.util.*;
-
-/**
- * Allows to patch message before sending or after reading.
- */
-public interface MessageCallback extends Extension {
-    /**
-     * Writes delta for provided node and message type.
-     *
-     * @param nodeId Node ID.
-     * @param msg Message type.
-     * @param buf Buffer to write to.
-     * @return Whether delta was fully written.
-     */
-    public boolean onSend(UUID nodeId, Object msg, ByteBuffer buf);
-
-    /**
-     * Reads delta for provided node and message type.
-     *
-     * @param nodeId Node ID.
-     * @param msgCls Message type.
-     * @param buf Buffer to read from.
-     * @return Whether delta was fully read.
-     */
-    public boolean onReceive(UUID nodeId, Class<?> msgCls, ByteBuffer buf);
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c4d06f5/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
index 6ea655a..7a731e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
@@ -21,21 +21,20 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.plugin.extensions.communication.*;
-import org.apache.ignite.resources.*;
-import org.apache.ignite.spi.authentication.*;
 import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.managers.eventstorage.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.plugin.security.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.authentication.*;
 import org.apache.ignite.spi.securesession.*;
 import org.apache.ignite.spi.swapspace.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
 import javax.management.*;
 import java.io.*;
-import java.nio.*;
 import java.text.*;
 import java.util.*;
 
@@ -699,16 +698,6 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
         }
 
         /** {@inheritDoc} */
-        @Override public boolean writeDelta(UUID nodeId, Object msg, ByteBuffer buf) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean readDelta(UUID nodeId, Class<?> msgCls, ByteBuffer
buf) {
-            return false;
-        }
-
-        /** {@inheritDoc} */
         @Override public Collection<GridSecuritySubject> authenticatedSubjects() {
             return Collections.emptyList();
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c4d06f5/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
index ce4c0c7..7f7e25e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java
@@ -29,7 +29,6 @@ import org.jetbrains.annotations.*;
 
 import javax.cache.*;
 import java.io.*;
-import java.nio.*;
 import java.util.*;
 
 /**
@@ -349,26 +348,6 @@ public interface IgniteSpiContext {
     @Nullable public IgniteSpiNodeValidationResult validateNode(ClusterNode node);
 
     /**
-     * Writes delta for provided node and message type.
-     *
-     * @param nodeId Node ID.
-     * @param msg Message.
-     * @param buf Buffer to write to.
-     * @return Whether delta was fully written.
-     */
-    public boolean writeDelta(UUID nodeId, Object msg, ByteBuffer buf);
-
-    /**
-     * Reads delta for provided node and message type.
-     *
-     * @param nodeId Node ID.
-     * @param msgCls Message type.
-     * @param buf Buffer to read from.
-     * @return Whether delta was fully read.
-     */
-    public boolean readDelta(UUID nodeId, Class<?> msgCls, ByteBuffer buf);
-
-    /**
      * Gets collection of authenticated subjects together with their permissions.
      *
      * @return Collection of authenticated subjects.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c4d06f5/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
index bfcfe2f..d91ed13 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
@@ -33,7 +33,6 @@ import org.apache.ignite.spi.swapspace.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
-import java.nio.*;
 import java.util.*;
 import java.util.concurrent.*;
 
@@ -491,16 +490,6 @@ public class GridSpiTestContext implements IgniteSpiContext {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean writeDelta(UUID nodeId, Object msg, ByteBuffer buf) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readDelta(UUID nodeId, Class<?> msgCls, ByteBuffer buf)
{
-        return false;
-    }
-
-    /** {@inheritDoc} */
     @Override public Collection<GridSecuritySubject> authenticatedSubjects() {
         return Collections.emptyList();
     }


Mime
View raw message