You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/01/13 16:17:54 UTC

incubator-ignite git commit: # IGNITE-45 fix notes found on review.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 5800a7566 -> 7b5d5f441


# IGNITE-45 fix notes found on review.


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

Branch: refs/heads/ignite-45
Commit: 7b5d5f44186f2a076ae4130fc1d17cbc4a0ce936
Parents: 5800a75
Author: sevdokimov <se...@gridgain.com>
Authored: Tue Jan 13 18:17:38 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Tue Jan 13 18:17:38 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/IgniteCacheMXBean.java    |  22 ++--
 .../org/apache/ignite/IgniteCacheManager.java   |  70 +++--------
 .../apache/ignite/IgniteCachingProvider.java    |  25 ++--
 .../ignite/tck/TCKMBeanServerBuilder.java       | 124 -------------------
 .../grid/kernal/tck/TCKMBeanServerBuilder.java  | 118 ++++++++++++++++++
 5 files changed, 166 insertions(+), 193 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b5d5f44/modules/core/src/main/java/org/apache/ignite/IgniteCacheMXBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCacheMXBean.java b/modules/core/src/main/java/org/apache/ignite/IgniteCacheMXBean.java
index 0200717..26cace6 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCacheMXBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCacheMXBean.java
@@ -1,10 +1,18 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+/*
+ * 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;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b5d5f44/modules/core/src/main/java/org/apache/ignite/IgniteCacheManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCacheManager.java b/modules/core/src/main/java/org/apache/ignite/IgniteCacheManager.java
index 376c982..fa4530b 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCacheManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCacheManager.java
@@ -1,10 +1,18 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+/*
+ * 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;
@@ -361,52 +369,4 @@ public class IgniteCacheManager implements CacheManager {
 
         throw new IllegalArgumentException();
     }
-
-//    /**
-//     *
-//     */
-//    private static class Future<T> {
-//        /** */
-//        private volatile T res;
-//
-//        /** */
-//        private volatile Throwable e;
-//
-//        public T get() throws CacheException {
-//            if (res == null && e == null) {
-//                synchronized (this) {
-//                    try {
-//                        while (res == null && e == null)
-//                            wait();
-//                    }
-//                    catch (InterruptedException e) {
-//                        Thread.currentThread().interrupt();
-//
-//                        throw new RuntimeException(e);
-//                    }
-//                }
-//            }
-//
-//            if (res != null)
-//                return res;
-//
-//            assert e != null;
-//
-//            throw new CacheException(e);
-//        }
-//
-//        public synchronized void setException(Throwable e) {
-//            this.e = e;
-//
-//            notifyAll();
-//        }
-//
-//        public synchronized void setCacheManager(T res) {
-//            assert res != null;
-//
-//            this.res = res;
-//
-//            notifyAll();
-//        }
-//    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b5d5f44/modules/core/src/main/java/org/apache/ignite/IgniteCachingProvider.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCachingProvider.java b/modules/core/src/main/java/org/apache/ignite/IgniteCachingProvider.java
index ecc0560..ea97cb0 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCachingProvider.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCachingProvider.java
@@ -1,10 +1,18 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+/*
+ * 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;
@@ -26,6 +34,9 @@ public class IgniteCachingProvider implements CachingProvider {
     /** */
     private static final URI DEFAULT_URI;
 
+    /**
+     *
+     */
     static {
         URI uri = null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b5d5f44/modules/core/src/main/java/org/apache/ignite/tck/TCKMBeanServerBuilder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/tck/TCKMBeanServerBuilder.java b/modules/core/src/main/java/org/apache/ignite/tck/TCKMBeanServerBuilder.java
deleted file mode 100644
index 8123504..0000000
--- a/modules/core/src/main/java/org/apache/ignite/tck/TCKMBeanServerBuilder.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.apache.ignite.tck;
-
-import com.sun.jmx.mbeanserver.*;
-
-import javax.management.*;
-
-/**
- *
- */
-public class TCKMBeanServerBuilder extends MBeanServerBuilder {
-    /** {@inheritDoc} */
-    @Override public MBeanServer newMBeanServer(String dfltDomain, MBeanServer outer, MBeanServerDelegate delegate) {
-        MBeanServerDelegate decoratingDelegate = new ServerDelegate(delegate);
-        return JmxMBeanServer.newMBeanServer(dfltDomain, outer,
-            decoratingDelegate, false);
-    }
-
-    /**
-     *
-     */
-    private static class ServerDelegate extends MBeanServerDelegate {
-        /** */
-        private final MBeanServerDelegate delegate;
-
-        /**
-         * Constructor
-         *
-         * @param delegate the provided delegate
-         */
-        ServerDelegate(MBeanServerDelegate delegate) {
-            this.delegate = delegate;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String getSpecificationName() {
-            return delegate.getSpecificationName();
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public String getSpecificationVersion() {
-            return delegate.getSpecificationVersion();
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public String getSpecificationVendor() {
-            return delegate.getSpecificationVendor();
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public String getImplementationName() {
-            return delegate.getImplementationName();
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public String getImplementationVersion() {
-            return delegate.getImplementationVersion();
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public String getImplementationVendor() {
-            return delegate.getImplementationVendor();
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public MBeanNotificationInfo[] getNotificationInfo() {
-            return delegate.getNotificationInfo();
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public synchronized void addNotificationListener(NotificationListener listener,
-                                                         NotificationFilter filter,
-                                                         Object handback) throws
-            IllegalArgumentException {
-            delegate.addNotificationListener(listener, filter, handback);
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public synchronized void removeNotificationListener(NotificationListener
-                                                                listener,
-                                                            NotificationFilter
-                                                                filter,
-                                                            Object handback) throws
-            ListenerNotFoundException {
-            delegate.removeNotificationListener(listener, filter, handback);
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public synchronized void removeNotificationListener(NotificationListener
-                                                                listener) throws
-            ListenerNotFoundException {
-            delegate.removeNotificationListener(listener);
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public void sendNotification(Notification notification) {
-            delegate.sendNotification(notification);
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        public synchronized String getMBeanServerId() {
-            return System.getProperty("org.jsr107.tck.management.agentId");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b5d5f44/modules/core/src/main/java/org/gridgain/grid/kernal/tck/TCKMBeanServerBuilder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/tck/TCKMBeanServerBuilder.java b/modules/core/src/main/java/org/gridgain/grid/kernal/tck/TCKMBeanServerBuilder.java
new file mode 100644
index 0000000..fe5e495
--- /dev/null
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/tck/TCKMBeanServerBuilder.java
@@ -0,0 +1,118 @@
+/*
+ * 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.gridgain.grid.kernal.tck;
+
+import com.sun.jmx.mbeanserver.*;
+
+import javax.management.*;
+
+/**
+ * This class is needed for JCache TCK tests.
+ */
+public class TCKMBeanServerBuilder extends MBeanServerBuilder {
+    /** {@inheritDoc} */
+    @Override public MBeanServer newMBeanServer(String dfltDomain, MBeanServer outer, MBeanServerDelegate delegate) {
+        MBeanServerDelegate decoratingDelegate = new ServerDelegate(delegate);
+        return JmxMBeanServer.newMBeanServer(dfltDomain, outer,
+            decoratingDelegate, false);
+    }
+
+    /**
+     *
+     */
+    private static class ServerDelegate extends MBeanServerDelegate {
+        /** */
+        private final MBeanServerDelegate delegate;
+
+        /**
+         * Constructor
+         *
+         * @param delegate the provided delegate
+         */
+        ServerDelegate(MBeanServerDelegate delegate) {
+            this.delegate = delegate;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String getSpecificationName() {
+            return delegate.getSpecificationName();
+        }
+
+        /** {@inheritDoc} */
+        @Override public String getSpecificationVersion() {
+            return delegate.getSpecificationVersion();
+        }
+
+        /** {@inheritDoc} */
+        @Override public String getSpecificationVendor() {
+            return delegate.getSpecificationVendor();
+        }
+
+        /** {@inheritDoc} */
+        @Override public String getImplementationName() {
+            return delegate.getImplementationName();
+        }
+
+        /** {@inheritDoc} */
+        @Override public String getImplementationVersion() {
+            return delegate.getImplementationVersion();
+        }
+
+        /** {@inheritDoc} */
+        @Override public String getImplementationVendor() {
+            return delegate.getImplementationVendor();
+        }
+
+        /** {@inheritDoc} */
+        @Override public MBeanNotificationInfo[] getNotificationInfo() {
+            return delegate.getNotificationInfo();
+        }
+
+        /** {@inheritDoc} */
+        @Override public synchronized void addNotificationListener(NotificationListener lsnr,
+            NotificationFilter filter,
+            Object handback) throws
+            IllegalArgumentException {
+            delegate.addNotificationListener(lsnr, filter, handback);
+        }
+
+        /** {@inheritDoc} */
+        @Override public synchronized void removeNotificationListener(NotificationListener lsnr,
+            NotificationFilter filter,
+            Object handback) throws
+            ListenerNotFoundException {
+            delegate.removeNotificationListener(lsnr, filter, handback);
+        }
+
+        /** {@inheritDoc} */
+        @Override public synchronized void removeNotificationListener(NotificationListener lsnr)
+            throws ListenerNotFoundException {
+            delegate.removeNotificationListener(lsnr);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void sendNotification(Notification notification) {
+            delegate.sendNotification(notification);
+        }
+
+        /** {@inheritDoc} */
+        @Override public synchronized String getMBeanServerId() {
+            return System.getProperty("org.jsr107.tck.management.agentId");
+        }
+    }
+}