ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [13/50] [abbrv] incubator-ignite git commit: ignite-51
Date Wed, 11 Mar 2015 10:21:55 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7bbc80a6/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
deleted file mode 100644
index 812cbb2..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
+++ /dev/null
@@ -1,92 +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.portable.os;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.client.marshaller.*;
-import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.internal.processors.portable.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.jetbrains.annotations.*;
-
-import java.nio.*;
-
-/**
- * No-op implementation of {@link GridPortableProcessor}.
- */
-public class GridOsPortableProcessor extends IgniteCacheObjectProcessorAdapter {
-    /**
-     * @param ctx Kernal context.
-     */
-    public GridOsPortableProcessor(GridKernalContext ctx) {
-        super(ctx);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void onCacheProcessorStarted() {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public int typeId(String typeName) {
-        return 0;
-    }
-
-
-    /** {@inheritDoc} */
-    @Override public Object unwrapTemporary(GridCacheContext ctx, Object obj) throws IgniteException
{
-        return obj;
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public Object marshalToPortable(@Nullable Object obj) throws IgniteException
{
-        return obj;
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public GridClientMarshaller portableMarshaller() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isPortable(GridClientMarshaller marsh) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isPortableObject(Object obj) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int typeId(Object obj) {
-        return 0;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Object field(Object obj, String fieldName) {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasField(Object obj, String fieldName) {
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7bbc80a6/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/package.html
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/package.html
b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/package.html
deleted file mode 100644
index 11de122..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/package.html
+++ /dev/null
@@ -1,24 +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.
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<body>
-    <!-- Package description. -->
-    No-op implementation of portable processor.
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7bbc80a6/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index f503161..acb60dd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -291,12 +291,12 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                 String typeName = rslvr.resolveTypeName(key, val);
 
                 if (typeName != null)
-                    id = new TypeId(space, ctx.portable().typeId(typeName));
+                    id = new TypeId(space, ctx.cacheObjects().typeId(typeName));
             }
 
             if (id == null) {
-                if (ctx.portable().isPortableObject(val)) {
-                    int typeId = ctx.portable().typeId(val);
+                if (ctx.cacheObjects().isPortableObject(val)) {
+                    int typeId = ctx.cacheObjects().typeId(val);
 
                     String typeName = portableName(typeId);
 
@@ -328,8 +328,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                         d.keyClass(keyCls);
                         d.valueClass(valCls);
 
-                        if (ctx.portable().isPortableObject(key)) {
-                            int typeId = ctx.portable().typeId(key);
+                        if (ctx.cacheObjects().isPortableObject(key)) {
+                            int typeId = ctx.cacheObjects().typeId(key);
 
                             String typeName = portableName(typeId);
 
@@ -349,8 +349,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                                 processClassMeta(true, d.keyCls, keyMeta, d);
                         }
 
-                        if (ctx.portable().isPortableObject(val)) {
-                            int typeId = ctx.portable().typeId(val);
+                        if (ctx.cacheObjects().isPortableObject(val)) {
+                            int typeId = ctx.cacheObjects().typeId(val);
 
                             String typeName = portableName(typeId);
 
@@ -652,7 +652,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
                 if (qryCfg != null && ccfg.getTypeMetadata() != null) {
                     for (CacheTypeMetadata meta : ccfg.getTypeMetadata())
-                        portableIds.put(ctx.portable().typeId(meta.getValueType()), meta.getValueType());
+                        portableIds.put(ctx.cacheObjects().typeId(meta.getValueType()), meta.getValueType());
                 }
             }
 
@@ -678,7 +678,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
                 if (qryCfg != null && ccfg.getTypeMetadata() != null) {
                     for (CacheTypeMetadata meta : ccfg.getTypeMetadata())
-                        declaredTypesById.put(new TypeId(ccfg.getName(), ctx.portable().typeId(meta.getValueType())),
meta);
+                        declaredTypesById.put(new TypeId(ccfg.getName(), ctx.cacheObjects().typeId(meta.getValueType())),
meta);
                 }
             }
 
@@ -1385,11 +1385,11 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             if (obj == null)
                 return null;
 
-            if (!ctx.portable().isPortableObject(obj))
+            if (!ctx.cacheObjects().isPortableObject(obj))
                 throw new IgniteCheckedException("Non-portable object received as a result
of property extraction " +
                     "[parent=" + parent + ", propName=" + propName + ", obj=" + obj + ']');
 
-            return ctx.portable().field(obj, propName);
+            return ctx.cacheObjects().field(obj, propName);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7bbc80a6/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
index 78b6bd1..46dbea4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
@@ -257,7 +257,7 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter
{
                                     try {
                                         taskRestRes.setFinished(true);
                                         taskRestRes.setResult(req.portableMode() ?
-                                            ctx.portable().marshalToPortable(desc.result())
: desc.result());
+                                            ctx.cacheObjects().marshalToPortable(desc.result())
: desc.result());
 
                                         res.setResponse(taskRestRes);
                                         fut.onDone(res);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7bbc80a6/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
index 771e27f..a0f7264 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
@@ -87,7 +87,7 @@ public class GridTcpRestProtocol extends GridRestProtocolAdapter {
      * @return Whether portable marshaller is used.
      */
     boolean portableMode(GridNioSession ses) {
-        return ctx.portable().isPortable(marshaller(ses));
+        return ctx.cacheObjects().isPortable(marshaller(ses));
     }
 
     /** {@inheritDoc} */
@@ -159,7 +159,7 @@ public class GridTcpRestProtocol extends GridRestProtocolAdapter {
 
         marshMap.put(GridClientOptimizedMarshaller.ID, new GridClientOptimizedMarshaller());
         marshMap.put(GridClientJdkMarshaller.ID, new GridClientJdkMarshaller());
-        marshMap.put((byte)0, ctx.portable().portableMarshaller());
+        marshMap.put((byte)0, ctx.cacheObjects().portableMarshaller());
 
         lsnr.marshallers(marshMap);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7bbc80a6/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index 644644e..0af44e1 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -57,7 +57,6 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K,
V> {
             defaultCacheConfiguration(),
             new GridCacheEventManager(),
             new GridCacheSwapManager(false),
-            new IgniteCacheOsSerializationManager<K, V>(),
             new GridCacheStoreManager(null,
                 new IdentityHashMap<CacheStore, ThreadLocal>(),
                 null,


Mime
View raw message