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 2F24417FF7 for ; Wed, 14 Jan 2015 12:24:39 +0000 (UTC) Received: (qmail 71236 invoked by uid 500); 14 Jan 2015 12:24:40 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 71206 invoked by uid 500); 14 Jan 2015 12:24:40 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 71196 invoked by uid 99); 14 Jan 2015 12:24:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jan 2015 12:24:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 14 Jan 2015 12:24:17 +0000 Received: (qmail 70210 invoked by uid 99); 14 Jan 2015 12:24:14 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jan 2015 12:24:14 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0638BA41350; Wed, 14 Jan 2015 12:24:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Wed, 14 Jan 2015 12:24:17 -0000 Message-Id: <01cf5f52ba7446a28081bd840558a4b6@git.apache.org> In-Reply-To: <7ff24009c45a405cb5da88fe5bb4d4a2@git.apache.org> References: <7ff24009c45a405cb5da88fe5bb4d4a2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/10] incubator-ignite git commit: # IGNITE-45 fix notes found on review. X-Virus-Checked: Checked by ClamAV on apache.org # 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-42 Commit: 7b5d5f44186f2a076ae4130fc1d17cbc4a0ce936 Parents: 5800a75 Author: sevdokimov Authored: Tue Jan 13 18:17:38 2015 +0300 Committer: sevdokimov 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 { -// /** */ -// 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"); + } + } +}