IGNITE-125 Renamed from MBean to MXBean
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/903e698a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/903e698a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/903e698a Branch: refs/heads/ignite-125 Commit: 903e698adee4c84b4b7b8d76e0c967a51dc2b3e3 Parents: d97965b Author: nikolay_tikhonov <ntikho...@gridgain.com> Authored: Wed Jan 28 11:34:51 2015 +0300 Committer: nikolay_tikhonov <ntikho...@gridgain.com> Committed: Wed Jan 28 12:29:06 2015 +0300 ---------------------------------------------------------------------- .../spi/checkpoint/s3/S3CheckpointSpi.java | 6 +- .../spi/checkpoint/s3/S3CheckpointSpiMBean.java | 59 ---- .../checkpoint/s3/S3CheckpointSpiMXBean.java | 59 ++++ .../eviction/fifo/CacheFifoEvictionPolicy.java | 2 +- .../fifo/CacheFifoEvictionPolicyMBean.java | 58 ---- .../fifo/CacheFifoEvictionPolicyMXBean.java | 58 ++++ .../CacheGgfsPerBlockLruEvictionPolicy.java | 2 +- ...CacheGgfsPerBlockLruEvictionPolicyMBean.java | 93 ----- ...acheGgfsPerBlockLruEvictionPolicyMXBean.java | 93 +++++ .../eviction/lru/CacheLruEvictionPolicy.java | 2 +- .../lru/CacheLruEvictionPolicyMBean.java | 58 ---- .../lru/CacheLruEvictionPolicyMXBean.java | 58 ++++ .../random/CacheRandomEvictionPolicy.java | 2 +- .../random/CacheRandomEvictionPolicyMBean.java | 42 --- .../random/CacheRandomEvictionPolicyMXBean.java | 42 +++ .../client/router/GridTcpRouterMBean.java | 88 ----- .../client/router/GridTcpRouterMXBean.java | 88 +++++ .../client/router/impl/GridTcpRouterImpl.java | 16 +- .../org/apache/ignite/internal/GridGainEx.java | 2 +- .../org/apache/ignite/internal/GridKernal.java | 6 +- .../streamer/GridStreamProcessor.java | 22 +- .../streamer/StreamerMBeanAdapter.java | 116 ------- .../processors/streamer/StreamerMXBeanImpl.java | 116 +++++++ .../streamer/StreamerStageMBeanAdapter.java | 101 ------ .../streamer/StreamerStageMXBeanImpl.java | 101 ++++++ .../apache/ignite/internal/util/GridUtils.java | 10 +- .../internal/visor/util/VisorTaskUtils.java | 12 +- .../ignite/mxbean/CacheMetricsMXBean.java | 2 +- .../mxbean/ClusterLocalNodeMetricsMXBean.java | 2 +- .../org/apache/ignite/mxbean/IgniteMXBean.java | 2 +- .../ignite/mxbean/IgniteThreadPoolMXBean.java | 2 +- .../apache/ignite/mxbean/IgnitionMXBean.java | 2 +- .../resources/IgniteMBeanServerResource.java | 65 ---- .../org/apache/ignite/spi/IgniteSpiAdapter.java | 10 +- .../ignite/spi/IgniteSpiManagementMBean.java | 85 ----- .../ignite/spi/IgniteSpiManagementMXBean.java | 85 +++++ .../noop/NoopAuthenticationSpi.java | 6 +- .../noop/NoopAuthenticationSpiMBean.java | 29 -- .../noop/NoopAuthenticationSpiMXBean.java | 29 ++ .../checkpoint/cache/CacheCheckpointSpi.java | 6 +- .../cache/CacheCheckpointSpiMBean.java | 38 -- .../cache/CacheCheckpointSpiMXBean.java | 36 ++ .../spi/checkpoint/jdbc/JdbcCheckpointSpi.java | 2 +- .../checkpoint/jdbc/JdbcCheckpointSpiMBean.java | 117 ------- .../jdbc/JdbcCheckpointSpiMXBean.java | 117 +++++++ .../sharedfs/SharedFsCheckpointSpi.java | 6 +- .../sharedfs/SharedFsCheckpointSpiMBean.java | 47 --- .../sharedfs/SharedFsCheckpointSpiMXBean.java | 47 +++ .../fifoqueue/FifoQueueCollisionSpi.java | 6 +- .../fifoqueue/FifoQueueCollisionSpiMBean.java | 93 ----- .../fifoqueue/FifoQueueCollisionSpiMXBean.java | 93 +++++ .../jobstealing/JobStealingCollisionSpi.java | 6 +- .../JobStealingCollisionSpiMBean.java | 193 ----------- .../JobStealingCollisionSpiMXBean.java | 193 +++++++++++ .../PriorityQueueCollisionSpi.java | 6 +- .../PriorityQueueCollisionSpiMBean.java | 162 --------- .../PriorityQueueCollisionSpiMXBean.java | 162 +++++++++ .../communication/tcp/TcpCommunicationSpi.java | 6 +- .../tcp/TcpCommunicationSpiMBean.java | 282 --------------- .../tcp/TcpCommunicationSpiMXBean.java | 282 +++++++++++++++ .../deployment/local/LocalDeploymentSpi.java | 6 +- .../local/LocalDeploymentSpiMBean.java | 29 -- .../local/LocalDeploymentSpiMXBean.java | 29 ++ .../discovery/tcp/TcpClientDiscoverySpi.java | 6 +- .../tcp/TcpClientDiscoverySpiMBean.java | 164 --------- .../tcp/TcpClientDiscoverySpiMXBean.java | 164 +++++++++ .../spi/discovery/tcp/TcpDiscoverySpi.java | 6 +- .../spi/discovery/tcp/TcpDiscoverySpiMBean.java | 275 --------------- .../discovery/tcp/TcpDiscoverySpiMXBean.java | 275 +++++++++++++++ .../memory/MemoryEventStorageSpi.java | 6 +- .../memory/MemoryEventStorageSpiMBean.java | 65 ---- .../memory/MemoryEventStorageSpiMXBean.java | 65 ++++ .../spi/failover/always/AlwaysFailoverSpi.java | 6 +- .../failover/always/AlwaysFailoverSpiMBean.java | 44 --- .../always/AlwaysFailoverSpiMXBean.java | 44 +++ .../jobstealing/JobStealingFailoverSpi.java | 6 +- .../JobStealingFailoverSpiMBean.java | 54 --- .../JobStealingFailoverSpiMXBean.java | 54 +++ .../spi/failover/never/NeverFailoverSpi.java | 6 +- .../failover/never/NeverFailoverSpiMBean.java | 29 -- .../failover/never/NeverFailoverSpiMXBean.java | 29 ++ .../adaptive/AdaptiveLoadBalancingSpi.java | 6 +- .../adaptive/AdaptiveLoadBalancingSpiMBean.java | 35 -- .../AdaptiveLoadBalancingSpiMXBean.java | 35 ++ .../roundrobin/RoundRobinLoadBalancingSpi.java | 6 +- .../RoundRobinLoadBalancingSpiMBean.java | 45 --- .../RoundRobinLoadBalancingSpiMXBean.java | 45 +++ .../WeightedRandomLoadBalancingSpi.java | 6 +- .../WeightedRandomLoadBalancingSpiMBean.java | 45 --- .../WeightedRandomLoadBalancingSpiMXBean.java | 45 +++ .../noop/NoopSecureSessionSpi.java | 6 +- .../noop/NoopSecureSessionSpiMBean.java | 29 -- .../noop/NoopSecureSessionSpiMXBean.java | 29 ++ .../spi/swapspace/file/FileSwapSpaceSpi.java | 6 +- .../swapspace/file/FileSwapSpaceSpiMBean.java | 67 ---- .../swapspace/file/FileSwapSpaceSpiMXBean.java | 67 ++++ .../apache/ignite/streamer/StreamerMBean.java | 169 --------- .../apache/ignite/streamer/StreamerMXBean.java | 169 +++++++++ .../ignite/streamer/StreamerStageMBean.java | 114 ------ .../ignite/streamer/StreamerStageMXBean.java | 114 ++++++ .../ignite/streamer/StreamerWindowMBean.java | 58 ---- .../ignite/streamer/StreamerWindowMXBean.java | 58 ++++ .../streamer/index/StreamerIndexProvider.java | 2 +- .../index/StreamerIndexProviderMBean.java | 74 ---- .../index/StreamerIndexProviderMXBean.java | 74 ++++ .../streamer/window/StreamerWindowAdapter.java | 2 +- .../testsuites/IgniteUtilSelfTestSuite.java | 2 +- .../ignite/util/mbeans/GridMBeanSelfTest.java | 345 ------------------- .../util/mbeans/IgniteMXBeanSelfTest.java | 345 +++++++++++++++++++ .../processors/query/h2/IgniteH2Indexing.java | 4 +- .../deployment/uri/GridUriDeploymentSpi.java | 6 +- .../uri/GridUriDeploymentSpiMBean.java | 53 --- .../uri/GridUriDeploymentSpiMXBean.java | 53 +++ 113 files changed, 3470 insertions(+), 3537 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java index 8bc0fb7..0519e3a 100644 --- a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java +++ b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpi.java @@ -99,7 +99,7 @@ import java.util.*; * @see org.apache.ignite.spi.checkpoint.CheckpointSpi */ @IgniteSpiMultipleInstancesSupport(true) -public class S3CheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi, S3CheckpointSpiMBean { +public class S3CheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi, S3CheckpointSpiMXBean { /** Logger. */ @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"}) @IgniteLoggerResource @@ -328,7 +328,7 @@ public class S3CheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi, timeoutWrk.start(); - registerMBean(gridName, this, S3CheckpointSpiMBean.class); + registerMXBean(gridName, this, S3CheckpointSpiMXBean.class); // Ack ok start. if (log.isDebugEnabled()) @@ -342,7 +342,7 @@ public class S3CheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi, GridUtils.join(timeoutWrk, log); } - unregisterMBean(); + unregisterMXBean(); // Ack ok stop. if (log.isDebugEnabled()) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMBean.java b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMBean.java deleted file mode 100644 index 7a06688..0000000 --- a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMBean.java +++ /dev/null @@ -1,59 +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.spi.checkpoint.s3; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean for {@link S3CheckpointSpi}. - */ -@IgniteMXBeanDescription("MBean that provides access to S3 checkpoint SPI configuration.") -public interface S3CheckpointSpiMBean extends IgniteSpiManagementMBean { - /** - * Gets S3 bucket name to use. - * - * @return S3 bucket name to use. - */ - @IgniteMXBeanDescription("S3 bucket name.") - public String getBucketName(); - - /** - * @return S3 access key. - */ - @IgniteMXBeanDescription("S3 access key.") - public String getAccessKey(); - - /** - * @return HTTP proxy host. - */ - @IgniteMXBeanDescription("HTTP proxy host.") - public String getProxyHost(); - - /** - * @return HTTP proxy port - */ - @IgniteMXBeanDescription("HTTP proxy port.") - public int getProxyPort(); - - /** - * @return HTTP proxy user name. - */ - @IgniteMXBeanDescription("HTTP proxy user name.") - public String getProxyUsername(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMXBean.java b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMXBean.java new file mode 100644 index 0000000..16604b2 --- /dev/null +++ b/modules/aws/src/main/java/org/apache/ignite/spi/checkpoint/s3/S3CheckpointSpiMXBean.java @@ -0,0 +1,59 @@ +/* + * 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.spi.checkpoint.s3; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +/** + * Management bean for {@link S3CheckpointSpi}. + */ +@IgniteMXBeanDescription("MXBean that provides access to S3 checkpoint SPI configuration.") +public interface S3CheckpointSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets S3 bucket name to use. + * + * @return S3 bucket name to use. + */ + @IgniteMXBeanDescription("S3 bucket name.") + public String getBucketName(); + + /** + * @return S3 access key. + */ + @IgniteMXBeanDescription("S3 access key.") + public String getAccessKey(); + + /** + * @return HTTP proxy host. + */ + @IgniteMXBeanDescription("HTTP proxy host.") + public String getProxyHost(); + + /** + * @return HTTP proxy port + */ + @IgniteMXBeanDescription("HTTP proxy port.") + public int getProxyPort(); + + /** + * @return HTTP proxy user name. + */ + @IgniteMXBeanDescription("HTTP proxy user name.") + public String getProxyUsername(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicy.java index 981fdc3..d7b5c05 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicy.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicy.java @@ -34,7 +34,7 @@ import java.util.*; * maintained by attaching ordering metadata to cache entries. */ public class CacheFifoEvictionPolicy<K, V> implements CacheEvictionPolicy<K, V>, - CacheFifoEvictionPolicyMBean { + CacheFifoEvictionPolicyMXBean { /** Tag. */ private final String meta = UUID.randomUUID().toString(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMBean.java deleted file mode 100644 index 1dd5f18..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMBean.java +++ /dev/null @@ -1,58 +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.cache.eviction.fifo; - -import org.apache.ignite.mxbean.*; - -/** - * MBean for {@code FIFO} eviction policy. - */ -@IgniteMXBeanDescription("MBean for FIFO cache eviction policy.") -public interface CacheFifoEvictionPolicyMBean { - /** - * Gets name of metadata attribute used to store eviction policy data. - * - * @return Name of metadata attribute used to store eviction policy data. - */ - @IgniteMXBeanDescription("Name of metadata attribute used to store eviction policy data.") - public String getMetaAttributeName(); - - /** - * Gets maximum allowed cache size. - * - * @return Maximum allowed cache size. - */ - @IgniteMXBeanDescription("Maximum allowed cache size.") - public int getMaxSize(); - - /** - * Sets maximum allowed cache size. - * - * @param max Maximum allowed cache size. - */ - @IgniteMXBeanDescription("Set maximum allowed cache size.") - public void setMaxSize(int max); - - /** - * Gets current queue size. - * - * @return Current queue size. - */ - @IgniteMXBeanDescription("Current FIFO queue size.") - public int getCurrentSize(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMXBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMXBean.java new file mode 100644 index 0000000..61f1573 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/CacheFifoEvictionPolicyMXBean.java @@ -0,0 +1,58 @@ +/* + * 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.cache.eviction.fifo; + +import org.apache.ignite.mxbean.*; + +/** + * MBean for {@code FIFO} eviction policy. + */ +@IgniteMXBeanDescription("MXBean for FIFO cache eviction policy.") +public interface CacheFifoEvictionPolicyMXBean { + /** + * Gets name of metadata attribute used to store eviction policy data. + * + * @return Name of metadata attribute used to store eviction policy data. + */ + @IgniteMXBeanDescription("Name of metadata attribute used to store eviction policy data.") + public String getMetaAttributeName(); + + /** + * Gets maximum allowed cache size. + * + * @return Maximum allowed cache size. + */ + @IgniteMXBeanDescription("Maximum allowed cache size.") + public int getMaxSize(); + + /** + * Sets maximum allowed cache size. + * + * @param max Maximum allowed cache size. + */ + @IgniteMXBeanDescription("Set maximum allowed cache size.") + public void setMaxSize(int max); + + /** + * Gets current queue size. + * + * @return Current queue size. + */ + @IgniteMXBeanDescription("Current FIFO queue size.") + public int getCurrentSize(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicy.java index f1d5cdf..1c7fadb 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicy.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicy.java @@ -34,7 +34,7 @@ import java.util.regex.*; * GGFS eviction policy which evicts particular blocks. */ public class CacheGgfsPerBlockLruEvictionPolicy implements CacheEvictionPolicy<GridGgfsBlockKey, byte[]>, - CacheGgfsPerBlockLruEvictionPolicyMBean { + CacheGgfsPerBlockLruEvictionPolicyMXBean { /** Meta denoting node in the queue. */ public static final String META_NODE = "ggfs_node"; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMBean.java deleted file mode 100644 index 6065da1..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMBean.java +++ /dev/null @@ -1,93 +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.cache.eviction.ggfs; - -import org.apache.ignite.mxbean.*; -import org.jetbrains.annotations.*; - -import java.util.*; - -/** - * MBean for {@code GGFS per-block LRU} eviction policy. - */ -@IgniteMXBeanDescription("MBean for GGFS per-block LRU cache eviction policy.") -public interface CacheGgfsPerBlockLruEvictionPolicyMBean { - /** - * Gets maximum allowed size of all blocks in bytes. - * - * @return Maximum allowed size of all blocks in bytes. - */ - @IgniteMXBeanDescription("Maximum allowed size of all blocks in bytes.") - public long getMaxSize(); - - /** - * Sets maximum allowed size of data in all blocks in bytes. - * - * @param maxSize Maximum allowed size of data in all blocks in bytes. - */ - @IgniteMXBeanDescription("Sets aximum allowed size of data in all blocks in bytes.") - public void setMaxSize(long maxSize); - - /** - * Gets maximum allowed amount of blocks. - * - * @return Maximum allowed amount of blocks. - */ - @IgniteMXBeanDescription("Maximum allowed amount of blocks.") - public int getMaxBlocks(); - - /** - * Sets maximum allowed amount of blocks. - * - * @param maxBlocks Maximum allowed amount of blocks. - */ - @IgniteMXBeanDescription("Sets maximum allowed amount of blocks.") - public void setMaxBlocks(int maxBlocks); - - /** - * Gets collection of regex for paths whose blocks must not be evicted. - * - * @return Collection of regex for paths whose blocks must not be evicted. - */ - @IgniteMXBeanDescription("Collection of regex for paths whose blocks must not be evicted.") - @Nullable public Collection<String> getExcludePaths(); - - /** - * Sets collection of regex for paths whose blocks must not be evicted. - * - * @param excludePaths Collection of regex for paths whose blocks must not be evicted. - */ - @IgniteMXBeanDescription("Sets collection of regex for paths whose blocks must not be evicted.") - public void setExcludePaths(@Nullable Collection<String> excludePaths); - - /** - * Gets current size of data in all blocks. - * - * @return Current size of data in all blocks. - */ - @IgniteMXBeanDescription("Current size of data in all blocks.") - public long getCurrentSize(); - - /** - * Gets current amount of blocks. - * - * @return Current amount of blocks. - */ - @IgniteMXBeanDescription("Current amount of blocks.") - public int getCurrentBlocks(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMXBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMXBean.java new file mode 100644 index 0000000..54476da --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/ggfs/CacheGgfsPerBlockLruEvictionPolicyMXBean.java @@ -0,0 +1,93 @@ +/* + * 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.cache.eviction.ggfs; + +import org.apache.ignite.mxbean.*; +import org.jetbrains.annotations.*; + +import java.util.*; + +/** + * MBean for {@code GGFS per-block LRU} eviction policy. + */ +@IgniteMXBeanDescription("MXBean for GGFS per-block LRU cache eviction policy.") +public interface CacheGgfsPerBlockLruEvictionPolicyMXBean { + /** + * Gets maximum allowed size of all blocks in bytes. + * + * @return Maximum allowed size of all blocks in bytes. + */ + @IgniteMXBeanDescription("Maximum allowed size of all blocks in bytes.") + public long getMaxSize(); + + /** + * Sets maximum allowed size of data in all blocks in bytes. + * + * @param maxSize Maximum allowed size of data in all blocks in bytes. + */ + @IgniteMXBeanDescription("Sets aximum allowed size of data in all blocks in bytes.") + public void setMaxSize(long maxSize); + + /** + * Gets maximum allowed amount of blocks. + * + * @return Maximum allowed amount of blocks. + */ + @IgniteMXBeanDescription("Maximum allowed amount of blocks.") + public int getMaxBlocks(); + + /** + * Sets maximum allowed amount of blocks. + * + * @param maxBlocks Maximum allowed amount of blocks. + */ + @IgniteMXBeanDescription("Sets maximum allowed amount of blocks.") + public void setMaxBlocks(int maxBlocks); + + /** + * Gets collection of regex for paths whose blocks must not be evicted. + * + * @return Collection of regex for paths whose blocks must not be evicted. + */ + @IgniteMXBeanDescription("Collection of regex for paths whose blocks must not be evicted.") + @Nullable public Collection<String> getExcludePaths(); + + /** + * Sets collection of regex for paths whose blocks must not be evicted. + * + * @param excludePaths Collection of regex for paths whose blocks must not be evicted. + */ + @IgniteMXBeanDescription("Sets collection of regex for paths whose blocks must not be evicted.") + public void setExcludePaths(@Nullable Collection<String> excludePaths); + + /** + * Gets current size of data in all blocks. + * + * @return Current size of data in all blocks. + */ + @IgniteMXBeanDescription("Current size of data in all blocks.") + public long getCurrentSize(); + + /** + * Gets current amount of blocks. + * + * @return Current amount of blocks. + */ + @IgniteMXBeanDescription("Current amount of blocks.") + public int getCurrentBlocks(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicy.java index d85fd7a..b897bac 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicy.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicy.java @@ -32,7 +32,7 @@ import java.util.*; * information is maintained by attaching ordering metadata to cache entries. */ public class CacheLruEvictionPolicy<K, V> implements CacheEvictionPolicy<K, V>, - CacheLruEvictionPolicyMBean { + CacheLruEvictionPolicyMXBean { /** Tag. */ private final String meta = UUID.randomUUID().toString(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMBean.java deleted file mode 100644 index 199a8c7..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMBean.java +++ /dev/null @@ -1,58 +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.cache.eviction.lru; - -import org.apache.ignite.mxbean.*; - -/** - * MBean for {@code LRU} eviction policy. - */ -@IgniteMXBeanDescription("MBean for LRU cache eviction policy.") -public interface CacheLruEvictionPolicyMBean { - /** - * Gets name of metadata attribute used to store eviction policy data. - * - * @return Name of metadata attribute used to store eviction policy data. - */ - @IgniteMXBeanDescription("Name of metadata attribute used to store eviction policy data.") - public String getMetaAttributeName(); - - /** - * Gets maximum allowed cache size. - * - * @return Maximum allowed cache size. - */ - @IgniteMXBeanDescription("Maximum allowed cache size.") - public int getMaxSize(); - - /** - * Sets maximum allowed cache size. - * - * @param max Maximum allowed cache size. - */ - @IgniteMXBeanDescription("Sets maximum allowed cache size.") - public void setMaxSize(int max); - - /** - * Gets current queue size. - * - * @return Current queue size. - */ - @IgniteMXBeanDescription("Current queue size.") - public int getCurrentSize(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMXBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMXBean.java new file mode 100644 index 0000000..f919b72 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/CacheLruEvictionPolicyMXBean.java @@ -0,0 +1,58 @@ +/* + * 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.cache.eviction.lru; + +import org.apache.ignite.mxbean.*; + +/** + * MBean for {@code LRU} eviction policy. + */ +@IgniteMXBeanDescription("MXBean for LRU cache eviction policy.") +public interface CacheLruEvictionPolicyMXBean { + /** + * Gets name of metadata attribute used to store eviction policy data. + * + * @return Name of metadata attribute used to store eviction policy data. + */ + @IgniteMXBeanDescription("Name of metadata attribute used to store eviction policy data.") + public String getMetaAttributeName(); + + /** + * Gets maximum allowed cache size. + * + * @return Maximum allowed cache size. + */ + @IgniteMXBeanDescription("Maximum allowed cache size.") + public int getMaxSize(); + + /** + * Sets maximum allowed cache size. + * + * @param max Maximum allowed cache size. + */ + @IgniteMXBeanDescription("Sets maximum allowed cache size.") + public void setMaxSize(int max); + + /** + * Gets current queue size. + * + * @return Current queue size. + */ + @IgniteMXBeanDescription("Current queue size.") + public int getCurrentSize(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicy.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicy.java index afb582c..c5c5fe1 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicy.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicy.java @@ -33,7 +33,7 @@ import org.apache.ignite.internal.util.typedef.internal.*; * key has the same probability of being accessed. */ public class CacheRandomEvictionPolicy<K, V> implements CacheEvictionPolicy<K, V>, - CacheRandomEvictionPolicyMBean { + CacheRandomEvictionPolicyMXBean { /** Maximum size. */ private volatile int max = CacheConfiguration.DFLT_CACHE_SIZE; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMBean.java deleted file mode 100644 index a1d1137..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMBean.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.cache.eviction.random; - -import org.apache.ignite.mxbean.*; - -/** - * MBean for {@code random} eviction policy. - */ -@IgniteMXBeanDescription("MBean for random cache eviction policy.") -public interface CacheRandomEvictionPolicyMBean { - /** - * Gets maximum allowed cache size. - * - * @return Maximum allowed cache size. - */ - @IgniteMXBeanDescription("Maximum allowed cache size.") - public int getMaxSize(); - - /** - * Sets maximum allowed cache size. - * - * @param max Maximum allowed cache size. - */ - @IgniteMXBeanDescription("Sets maximum allowed cache size.") - public void setMaxSize(int max); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMXBean.java b/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMXBean.java new file mode 100644 index 0000000..3805c79 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/random/CacheRandomEvictionPolicyMXBean.java @@ -0,0 +1,42 @@ +/* + * 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.cache.eviction.random; + +import org.apache.ignite.mxbean.*; + +/** + * MBean for {@code random} eviction policy. + */ +@IgniteMXBeanDescription("MXBean for random cache eviction policy.") +public interface CacheRandomEvictionPolicyMXBean { + /** + * Gets maximum allowed cache size. + * + * @return Maximum allowed cache size. + */ + @IgniteMXBeanDescription("Maximum allowed cache size.") + public int getMaxSize(); + + /** + * Sets maximum allowed cache size. + * + * @param max Maximum allowed cache size. + */ + @IgniteMXBeanDescription("Sets maximum allowed cache size.") + public void setMaxSize(int max); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMBean.java b/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMBean.java deleted file mode 100644 index 2185bdd..0000000 --- a/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMBean.java +++ /dev/null @@ -1,88 +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.client.router; - -import org.apache.ignite.mxbean.*; - -import java.util.*; - -/** - * MBean interface for TCP router. - */ -@IgniteMXBeanDescription("MBean for TCP router.") -public interface GridTcpRouterMBean { - /** - * Gets host for TCP binary protocol server. - * - * @return TCP host. - */ - @IgniteMXBeanDescription("Host for TCP binary protocol server.") - public String getHost(); - - /** - * Gets port for TCP binary protocol server. - * - * @return TCP port. - */ - @IgniteMXBeanDescription("Port for TCP binary protocol server.") - public int getPort(); - - /** - * Gets a flag indicating whether or not remote clients will be required to have a valid SSL certificate which - * validity will be verified with trust manager. - * - * @return Whether or not client authentication is required. - */ - @IgniteMXBeanDescription("Flag indicating whether or not SSL is enabled for incoming connections.") - public boolean isSslEnabled(); - - /** - * Gets a flag indicating whether or not remote clients will be required to have a valid SSL certificate which - * validity will be verified with trust manager. - * - * @return Whether or not client authentication is required. - */ - @IgniteMXBeanDescription("Flag indicating whether or not remote clients are required to have a valid SSL certificate.") - public boolean isSslClientAuth(); - - /** - * Gets list of server addresses where router's embedded client should connect. - * - * @return List of server addresses. - */ - @IgniteMXBeanDescription("Gets list of server addresses where router's embedded client should connect.") - public Collection<String> getServers(); - - /** - * Returns number of messages received by this router. - * Note that this parameter has approximate value. - * - * @return Number of messages received by this router. - */ - @IgniteMXBeanDescription("Number of messages received by this router.") - public long getReceivedCount(); - - /** - * Returns number of responses returned by this router. - * Note that this parameter has approximate value. - * - * @return Number of responses returned by this router. - */ - @IgniteMXBeanDescription("Number of responses returned by this router.") - public long getSendCount(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMXBean.java b/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMXBean.java new file mode 100644 index 0000000..bf2e738 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/client/router/GridTcpRouterMXBean.java @@ -0,0 +1,88 @@ +/* + * 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.client.router; + +import org.apache.ignite.mxbean.*; + +import java.util.*; + +/** + * MBean interface for TCP router. + */ +@IgniteMXBeanDescription("MXBean for TCP router.") +public interface GridTcpRouterMXBean { + /** + * Gets host for TCP binary protocol server. + * + * @return TCP host. + */ + @IgniteMXBeanDescription("Host for TCP binary protocol server.") + public String getHost(); + + /** + * Gets port for TCP binary protocol server. + * + * @return TCP port. + */ + @IgniteMXBeanDescription("Port for TCP binary protocol server.") + public int getPort(); + + /** + * Gets a flag indicating whether or not remote clients will be required to have a valid SSL certificate which + * validity will be verified with trust manager. + * + * @return Whether or not client authentication is required. + */ + @IgniteMXBeanDescription("Flag indicating whether or not SSL is enabled for incoming connections.") + public boolean isSslEnabled(); + + /** + * Gets a flag indicating whether or not remote clients will be required to have a valid SSL certificate which + * validity will be verified with trust manager. + * + * @return Whether or not client authentication is required. + */ + @IgniteMXBeanDescription("Flag indicating whether or not remote clients are required to have a valid SSL certificate.") + public boolean isSslClientAuth(); + + /** + * Gets list of server addresses where router's embedded client should connect. + * + * @return List of server addresses. + */ + @IgniteMXBeanDescription("Gets list of server addresses where router's embedded client should connect.") + public Collection<String> getServers(); + + /** + * Returns number of messages received by this router. + * Note that this parameter has approximate value. + * + * @return Number of messages received by this router. + */ + @IgniteMXBeanDescription("Number of messages received by this router.") + public long getReceivedCount(); + + /** + * Returns number of responses returned by this router. + * Note that this parameter has approximate value. + * + * @return Number of responses returned by this router. + */ + @IgniteMXBeanDescription("Number of responses returned by this router.") + public long getSendCount(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/client/router/impl/GridTcpRouterImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/client/router/impl/GridTcpRouterImpl.java b/modules/core/src/main/java/org/apache/ignite/client/router/impl/GridTcpRouterImpl.java index e0539b3..e852402 100644 --- a/modules/core/src/main/java/org/apache/ignite/client/router/impl/GridTcpRouterImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/client/router/impl/GridTcpRouterImpl.java @@ -40,7 +40,7 @@ import java.util.*; /** * Wrapper class for router process. */ -public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, LifecycleAware { +public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMXBean, LifecycleAware { /** */ private static final String ENT_NIO_LSNR_CLS = "org.gridgain.client.router.impl.GridTcpRouterNioListenerEntImpl"; @@ -158,13 +158,13 @@ public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, Lif ", addr=" + hostAddr + ']'); try { - ObjectName objName = U.registerMBean( - ManagementFactory.getPlatformMBeanServer(), - "Router", - "TCP Router " + id, - getClass().getSimpleName(), - this, - GridTcpRouterMBean.class); + ObjectName objName = U.registerMXBean( + ManagementFactory.getPlatformMBeanServer(), + "Router", + "TCP Router " + id, + getClass().getSimpleName(), + this, + GridTcpRouterMXBean.class); if (log.isDebugEnabled()) log.debug("Registered MBean: " + objName); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/GridGainEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridGainEx.java b/modules/core/src/main/java/org/apache/ignite/internal/GridGainEx.java index 553d874..3398d99 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridGainEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridGainEx.java @@ -2246,7 +2246,7 @@ public class GridGainEx { if (!srv.queryMBeans(objName, null).isEmpty()) throw new IgniteCheckedException("MBean was already registered: " + objName); else { - objName = U.registerMBean( + objName = U.registerMXBean( srv, null, "Kernal", http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/GridKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernal.java index fb31087..fd7002c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernal.java @@ -1429,7 +1429,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMXB /** @throws IgniteCheckedException If registration failed. */ private void registerKernalMBean() throws IgniteCheckedException { try { - kernalMBean = U.registerMBean( + kernalMBean = U.registerMXBean( cfg.getMBeanServer(), cfg.getGridName(), "Kernal", @@ -1452,7 +1452,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMXB ClusterLocalNodeMetricsMXBean mbean = new ClusterLocalNodeMetricsMXBeanImpl(ctx.discovery().localNode()); try { - locNodeMBean = U.registerMBean( + locNodeMBean = U.registerMXBean( cfg.getMBeanServer(), cfg.getGridName(), "Kernal", @@ -1495,7 +1495,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMXB assert exec != null; try { - ObjectName res = U.registerMBean( + ObjectName res = U.registerMXBean( cfg.getMBeanServer(), cfg.getGridName(), "Thread Pools", http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamProcessor.java index 5af5d5b..3c49d58 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/GridStreamProcessor.java @@ -72,8 +72,8 @@ public class GridStreamProcessor extends GridProcessorAdapter { for (IgniteStreamerImpl s : map.values()) { try { - mBeans.add(U.registerMBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), "Streamer", - new StreamerMBeanAdapter(s), StreamerMBean.class)); + mBeans.add(U.registerMXBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), "Streamer", + new StreamerMXBeanImpl(s), StreamerMXBean.class)); if (log.isDebugEnabled()) log.debug("Registered MBean for streamer: " + s.name()); @@ -85,9 +85,9 @@ public class GridStreamProcessor extends GridProcessorAdapter { // Add mbeans for stages. for (StreamerStage stage : s.configuration().getStages()) { try { - mBeans.add(U.registerMBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), "Stage-" + stage.name(), - new StreamerStageMBeanAdapter(stage.name(), stage.getClass().getName(), s), - StreamerStageMBean.class)); + mBeans.add(U.registerMXBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), "Stage-" + stage.name(), + new StreamerStageMXBeanImpl(stage.name(), stage.getClass().getName(), s), + StreamerStageMXBean.class)); if (log.isDebugEnabled()) log.debug("Registered MBean for streamer stage [streamer=" + s.name() + @@ -102,11 +102,11 @@ public class GridStreamProcessor extends GridProcessorAdapter { // Add mbeans for windows. for (StreamerWindow win : s.configuration().getWindows()) { try { - if (hasInterface(win.getClass(), StreamerWindowMBean.class)) { - mBeans.add(U.registerMBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), + if (hasInterface(win.getClass(), StreamerWindowMXBean.class)) { + mBeans.add(U.registerMXBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), "Window-" + win.name(), - (StreamerWindowMBean)win, - StreamerWindowMBean.class)); + (StreamerWindowMXBean)win, + StreamerWindowMXBean.class)); if (log.isDebugEnabled()) log.debug("Registered MBean for streamer window [streamer=" + s.name() + @@ -124,9 +124,9 @@ public class GridStreamProcessor extends GridProcessorAdapter { if (idxs != null && idxs.length > 0) { for (StreamerIndexProvider idx : idxs) { try { - mBeans.add(U.registerMBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), + mBeans.add(U.registerMXBean(mBeanSrv, ctx.gridName(), U.maskName(s.name()), "Window-" + win.name() + "-index-" + idx.name(), idx, - StreamerIndexProviderMBean.class)); + StreamerIndexProviderMXBean.class)); if (log.isDebugEnabled()) log.debug("Registered MBean for streamer window index [streamer=" + s.name() + http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMBeanAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMBeanAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMBeanAdapter.java deleted file mode 100644 index 652e0b8..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMBeanAdapter.java +++ /dev/null @@ -1,116 +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.streamer; - -import org.apache.ignite.streamer.*; -import org.jetbrains.annotations.*; - -/** - * Streamer MBean implementation. - */ -public class StreamerMBeanAdapter implements StreamerMBean { - /** Streamer. */ - private IgniteStreamerImpl streamer; - - /** - * @param streamer Streamer. - */ - public StreamerMBeanAdapter(IgniteStreamerImpl streamer) { - this.streamer = streamer; - } - - /** {@inheritDoc} */ - @Nullable @Override public String getName() { - return streamer.name(); - } - - /** {@inheritDoc} */ - @Override public boolean isAtLeastOnce() { - return streamer.atLeastOnce(); - } - - /** {@inheritDoc} */ - @Override public int getStageFutureMapSize() { - return streamer.stageFutureMapSize(); - } - - /** {@inheritDoc} */ - @Override public int getBatchFutureMapSize() { - return streamer.batchFutureMapSize(); - } - - /** {@inheritDoc} */ - @Override public int getStageActiveExecutionCount() { - return streamer.metrics().stageActiveExecutionCount(); - } - - /** {@inheritDoc} */ - @Override public int getStageWaitingExecutionCount() { - return streamer.metrics().stageWaitingExecutionCount(); - } - - /** {@inheritDoc} */ - @Override public long getStageTotalExecutionCount() { - return streamer.metrics().stageTotalExecutionCount(); - } - - /** {@inheritDoc} */ - @Override public long getPipelineMaximumExecutionTime() { - return streamer.metrics().pipelineMaximumExecutionTime(); - } - - /** {@inheritDoc} */ - @Override public long getPipelineMinimumExecutionTime() { - return streamer.metrics().pipelineMinimumExecutionTime(); - } - - /** {@inheritDoc} */ - @Override public long getPipelineAverageExecutionTime() { - return streamer.metrics().pipelineAverageExecutionTime(); - } - - /** {@inheritDoc} */ - @Override public int getPipelineMaximumExecutionNodes() { - return streamer.metrics().pipelineMaximumExecutionNodes(); - } - - /** {@inheritDoc} */ - @Override public int getPipelineMinimumExecutionNodes() { - return streamer.metrics().pipelineMinimumExecutionNodes(); - } - - /** {@inheritDoc} */ - @Override public int getPipelineAverageExecutionNodes() { - return streamer.metrics().pipelineAverageExecutionNodes(); - } - - /** {@inheritDoc} */ - @Override public int getCurrentActiveSessions() { - return streamer.metrics().currentActiveSessions(); - } - - /** {@inheritDoc} */ - @Override public int getMaximumActiveSessions() { - return streamer.metrics().maximumActiveSessions(); - } - - /** {@inheritDoc} */ - @Override public int getFailuresCount() { - return streamer.metrics().failuresCount(); - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMXBeanImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMXBeanImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMXBeanImpl.java new file mode 100644 index 0000000..d940893 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerMXBeanImpl.java @@ -0,0 +1,116 @@ +/* + * 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.streamer; + +import org.apache.ignite.streamer.*; +import org.jetbrains.annotations.*; + +/** + * Streamer MXBean implementation. + */ +public class StreamerMXBeanImpl implements StreamerMXBean { + /** Streamer. */ + private IgniteStreamerImpl streamer; + + /** + * @param streamer Streamer. + */ + public StreamerMXBeanImpl(IgniteStreamerImpl streamer) { + this.streamer = streamer; + } + + /** {@inheritDoc} */ + @Nullable @Override public String getName() { + return streamer.name(); + } + + /** {@inheritDoc} */ + @Override public boolean isAtLeastOnce() { + return streamer.atLeastOnce(); + } + + /** {@inheritDoc} */ + @Override public int getStageFutureMapSize() { + return streamer.stageFutureMapSize(); + } + + /** {@inheritDoc} */ + @Override public int getBatchFutureMapSize() { + return streamer.batchFutureMapSize(); + } + + /** {@inheritDoc} */ + @Override public int getStageActiveExecutionCount() { + return streamer.metrics().stageActiveExecutionCount(); + } + + /** {@inheritDoc} */ + @Override public int getStageWaitingExecutionCount() { + return streamer.metrics().stageWaitingExecutionCount(); + } + + /** {@inheritDoc} */ + @Override public long getStageTotalExecutionCount() { + return streamer.metrics().stageTotalExecutionCount(); + } + + /** {@inheritDoc} */ + @Override public long getPipelineMaximumExecutionTime() { + return streamer.metrics().pipelineMaximumExecutionTime(); + } + + /** {@inheritDoc} */ + @Override public long getPipelineMinimumExecutionTime() { + return streamer.metrics().pipelineMinimumExecutionTime(); + } + + /** {@inheritDoc} */ + @Override public long getPipelineAverageExecutionTime() { + return streamer.metrics().pipelineAverageExecutionTime(); + } + + /** {@inheritDoc} */ + @Override public int getPipelineMaximumExecutionNodes() { + return streamer.metrics().pipelineMaximumExecutionNodes(); + } + + /** {@inheritDoc} */ + @Override public int getPipelineMinimumExecutionNodes() { + return streamer.metrics().pipelineMinimumExecutionNodes(); + } + + /** {@inheritDoc} */ + @Override public int getPipelineAverageExecutionNodes() { + return streamer.metrics().pipelineAverageExecutionNodes(); + } + + /** {@inheritDoc} */ + @Override public int getCurrentActiveSessions() { + return streamer.metrics().currentActiveSessions(); + } + + /** {@inheritDoc} */ + @Override public int getMaximumActiveSessions() { + return streamer.metrics().maximumActiveSessions(); + } + + /** {@inheritDoc} */ + @Override public int getFailuresCount() { + return streamer.metrics().failuresCount(); + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMBeanAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMBeanAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMBeanAdapter.java deleted file mode 100644 index 8c2251b..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMBeanAdapter.java +++ /dev/null @@ -1,101 +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.streamer; - -import org.apache.ignite.streamer.*; - -/** - * Streamer stage MBean adapter. - */ -@SuppressWarnings("ConstantConditions") -public class StreamerStageMBeanAdapter implements StreamerStageMBean { - /** Stage name. */ - private String stageName; - - /** Stage class name. */ - private String stageClsName; - - /** */ - private IgniteStreamerImpl streamer; - - /** - * @param stageName Stage name. - * @param stageClsName Stage class name. - * @param streamer Streamer implementation. - */ - public StreamerStageMBeanAdapter(String stageName, String stageClsName, IgniteStreamerImpl streamer) { - this.stageName = stageName; - this.stageClsName = stageClsName; - this.streamer = streamer; - } - - /** {@inheritDoc} */ - @Override public String getName() { - return stageName; - } - - /** {@inheritDoc} */ - @Override public String getStageClassName() { - return stageClsName; - } - - /** {@inheritDoc} */ - @Override public long getMinimumExecutionTime() { - return streamer.metrics().stageMetrics(stageName).minimumExecutionTime(); - } - - /** {@inheritDoc} */ - @Override public long getMaximumExecutionTime() { - return streamer.metrics().stageMetrics(stageName).maximumExecutionTime(); - } - - /** {@inheritDoc} */ - @Override public long getAverageExecutionTime() { - return streamer.metrics().stageMetrics(stageName).averageExecutionTime(); - } - - /** {@inheritDoc} */ - @Override public long getMinimumWaitingTime() { - return streamer.metrics().stageMetrics(stageName).minimumWaitingTime(); - } - - /** {@inheritDoc} */ - @Override public long getMaximumWaitingTime() { - return streamer.metrics().stageMetrics(stageName).maximumWaitingTime(); - } - - /** {@inheritDoc} */ - @Override public long getAverageWaitingTime() { - return streamer.metrics().stageMetrics(stageName).averageWaitingTime(); - } - - /** {@inheritDoc} */ - @Override public long getTotalExecutionCount() { - return streamer.metrics().stageMetrics(stageName).totalExecutionCount(); - } - - /** {@inheritDoc} */ - @Override public int getFailuresCount() { - return streamer.metrics().stageMetrics(stageName).failuresCount(); - } - - /** {@inheritDoc} */ - @Override public boolean isExecuting() { - return streamer.metrics().stageMetrics(stageName).executing(); - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMXBeanImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMXBeanImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMXBeanImpl.java new file mode 100644 index 0000000..1b0d3f0 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/streamer/StreamerStageMXBeanImpl.java @@ -0,0 +1,101 @@ +/* + * 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.streamer; + +import org.apache.ignite.streamer.*; + +/** + * Streamer stage MXBean adapter. + */ +@SuppressWarnings("ConstantConditions") +public class StreamerStageMXBeanImpl implements StreamerStageMXBean { + /** Stage name. */ + private String stageName; + + /** Stage class name. */ + private String stageClsName; + + /** */ + private IgniteStreamerImpl streamer; + + /** + * @param stageName Stage name. + * @param stageClsName Stage class name. + * @param streamer Streamer implementation. + */ + public StreamerStageMXBeanImpl(String stageName, String stageClsName, IgniteStreamerImpl streamer) { + this.stageName = stageName; + this.stageClsName = stageClsName; + this.streamer = streamer; + } + + /** {@inheritDoc} */ + @Override public String getName() { + return stageName; + } + + /** {@inheritDoc} */ + @Override public String getStageClassName() { + return stageClsName; + } + + /** {@inheritDoc} */ + @Override public long getMinimumExecutionTime() { + return streamer.metrics().stageMetrics(stageName).minimumExecutionTime(); + } + + /** {@inheritDoc} */ + @Override public long getMaximumExecutionTime() { + return streamer.metrics().stageMetrics(stageName).maximumExecutionTime(); + } + + /** {@inheritDoc} */ + @Override public long getAverageExecutionTime() { + return streamer.metrics().stageMetrics(stageName).averageExecutionTime(); + } + + /** {@inheritDoc} */ + @Override public long getMinimumWaitingTime() { + return streamer.metrics().stageMetrics(stageName).minimumWaitingTime(); + } + + /** {@inheritDoc} */ + @Override public long getMaximumWaitingTime() { + return streamer.metrics().stageMetrics(stageName).maximumWaitingTime(); + } + + /** {@inheritDoc} */ + @Override public long getAverageWaitingTime() { + return streamer.metrics().stageMetrics(stageName).averageWaitingTime(); + } + + /** {@inheritDoc} */ + @Override public long getTotalExecutionCount() { + return streamer.metrics().stageMetrics(stageName).totalExecutionCount(); + } + + /** {@inheritDoc} */ + @Override public int getFailuresCount() { + return streamer.metrics().stageMetrics(stageName).failuresCount(); + } + + /** {@inheritDoc} */ + @Override public boolean isExecuting() { + return streamer.metrics().stageMetrics(stageName).executing(); + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java index 499829e..fa8037a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridUtils.java @@ -3919,19 +3919,19 @@ public abstract class GridUtils { } /** - * Registers MBean with the server. + * Registers MXBean with the server. * - * @param <T> Type of mbean. + * @param <T> Type of mxbean. * @param mbeanSrv MBean server. * @param gridName Grid name. * @param grp Name of the group. - * @param name Name of mbean. + * @param name Name of mxbean. * @param impl MBean implementation. * @param itf MBean interface. * @return JMX object name. * @throws JMException If MBean creation failed. */ - public static <T> ObjectName registerMBean(MBeanServer mbeanSrv, @Nullable String gridName, @Nullable String grp, + public static <T> ObjectName registerMXBean(MBeanServer mbeanSrv, @Nullable String gridName, @Nullable String grp, String name, T impl, @Nullable Class<T> itf) throws JMException { assert mbeanSrv != null; assert name != null; @@ -3955,7 +3955,7 @@ public abstract class GridUtils { * @return JMX object name. * @throws JMException If MBean creation failed. */ - public static <T> ObjectName registerMBean(MBeanServer mbeanSrv, ObjectName name, T impl, Class<T> itf) + public static <T> ObjectName registerMXBean(MBeanServer mbeanSrv, ObjectName name, T impl, Class<T> itf) throws JMException { assert mbeanSrv != null; assert name != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java index 0b6b479..bdd72dd 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java @@ -635,14 +635,14 @@ public class VisorTaskUtils { * @return Extracted max size. */ public static Integer evictionPolicyMaxSize(CacheEvictionPolicy policy) { - if (policy instanceof CacheLruEvictionPolicyMBean) - return ((CacheLruEvictionPolicyMBean)policy).getMaxSize(); + if (policy instanceof CacheLruEvictionPolicyMXBean) + return ((CacheLruEvictionPolicyMXBean)policy).getMaxSize(); - if (policy instanceof CacheRandomEvictionPolicyMBean) - return ((CacheRandomEvictionPolicyMBean)policy).getMaxSize(); + if (policy instanceof CacheRandomEvictionPolicyMXBean) + return ((CacheRandomEvictionPolicyMXBean)policy).getMaxSize(); - if (policy instanceof CacheFifoEvictionPolicyMBean) - return ((CacheFifoEvictionPolicyMBean)policy).getMaxSize(); + if (policy instanceof CacheFifoEvictionPolicyMXBean) + return ((CacheFifoEvictionPolicyMXBean)policy).getMaxSize(); return null; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java index 25ac61c..60fdc82 100644 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/CacheMetricsMXBean.java @@ -25,7 +25,7 @@ import javax.cache.management.*; /** * This interface defines JMX view on {@link IgniteCache}. */ -@IgniteMXBeanDescription("MBean that provides access to cache descriptor.") +@IgniteMXBeanDescription("MXBean that provides access to cache descriptor.") public interface CacheMetricsMXBean extends CacheStatisticsMXBean, CacheMXBean, CacheMetrics { /** {@inheritDoc} */ @IgniteMXBeanDescription("Clear statistics.") http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java index 281f4e8..b70538d 100644 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java @@ -22,7 +22,7 @@ import org.apache.ignite.cluster.*; /** * MBean for local node metrics. */ -@IgniteMXBeanDescription("MBean that provides access to all local node metrics.") +@IgniteMXBeanDescription("MXBean that provides access to all local node metrics.") public interface ClusterLocalNodeMetricsMXBean extends ClusterMetrics { /** {@inheritDoc} */ @IgniteMXBeanDescription("Last update time of this node metrics.") http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java index 17a89da..963f195 100644 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java @@ -23,7 +23,7 @@ import java.util.*; /** * This interface defines JMX view on kernal. */ -@IgniteMXBeanDescription("MBean that provides access to Kernal information.") +@IgniteMXBeanDescription("MXBean that provides access to Kernal information.") public interface IgniteMXBean { /** * Gets file path of the license. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteThreadPoolMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteThreadPoolMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteThreadPoolMXBean.java index 29fa2cf..dc73aae 100644 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteThreadPoolMXBean.java +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteThreadPoolMXBean.java @@ -20,7 +20,7 @@ package org.apache.ignite.mxbean; /** * MBean that provides access to information about executor service. */ -@IgniteMXBeanDescription("MBean that provides access to information about executor service.") +@IgniteMXBeanDescription("MXBean that provides access to information about executor service.") public interface IgniteThreadPoolMXBean { /** * Returns the approximate number of threads that are actively executing tasks. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/mxbean/IgnitionMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/IgnitionMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/IgnitionMXBean.java index 21fad4c..fadb5b8 100644 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/IgnitionMXBean.java +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/IgnitionMXBean.java @@ -20,7 +20,7 @@ package org.apache.ignite.mxbean; /** * This interface defines JMX view on {@link org.apache.ignite.Ignition}. */ -@IgniteMXBeanDescription("MBean that provides access to grid life-cycle operations.") +@IgniteMXBeanDescription("MXBean that provides access to grid life-cycle operations.") public interface IgnitionMXBean { /** * Gets state of default grid instance. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java deleted file mode 100644 index e6c7d83..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java +++ /dev/null @@ -1,65 +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.resources; - -import javax.management.*; -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of {@link MBeanServer} resource. MBean server - * is provided to grid via {@link org.apache.ignite.configuration.IgniteConfiguration}. - * <p> - * MBean server can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeTask}</li> - * <li>{@link org.apache.ignite.compute.ComputeJob}</li> - * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> - * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> - * </ul> - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteMBeanServerResource - * private MBeanServer mbeanSrv; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private MBeanSever mbeanSrv; - * ... - * @IgniteMBeanServerResource - * public void setMBeanServer(MBeanServer mbeanSrv) { - * this.mbeanSrv = mbeanSrv; - * } - * ... - * } - * </pre> - * <p> - * See {@link org.apache.ignite.configuration.IgniteConfiguration#getMBeanServer()} for Grid configuration details. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteMBeanServerResource { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/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 aef2490..42d3fee 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 @@ -45,7 +45,7 @@ import static org.apache.ignite.events.IgniteEventType.*; /** * This class provides convenient adapter for SPI implementations. */ -public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagementMBean { +public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagementMXBean { /** */ private ObjectName spiMBean; @@ -313,7 +313,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement * @param <T> Type of the MBean * @throws IgniteSpiException If registration failed. */ - protected final <T extends IgniteSpiManagementMBean> void registerMBean(String gridName, T impl, Class<T> mbeanItf) + protected final <T extends IgniteSpiManagementMXBean> void registerMXBean(String gridName, T impl, Class<T> mbeanItf) throws IgniteSpiException { MBeanServer jmx = ignite.configuration().getMBeanServer(); @@ -321,7 +321,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement assert jmx != null; try { - spiMBean = U.registerMBean(jmx, gridName, "SPIs", getName(), impl, mbeanItf); + spiMBean = U.registerMXBean(jmx, gridName, "SPIs", getName(), impl, mbeanItf); if (log.isDebugEnabled()) log.debug("Registered SPI MBean: " + spiMBean); @@ -332,11 +332,11 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement } /** - * Unregisters MBean. + * Unregisters MXBean. * * @throws IgniteSpiException If bean could not be unregistered. */ - protected final void unregisterMBean() throws IgniteSpiException { + protected final void unregisterMXBean() throws IgniteSpiException { // Unregister SPI MBean. if (spiMBean != null) { MBeanServer jmx = ignite.configuration().getMBeanServer();