sprint-1 - MXBean renaming.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c9b1dfb3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c9b1dfb3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c9b1dfb3 Branch: refs/heads/sprint-1 Commit: c9b1dfb31b4237ab4849e95b3cbeb72a30dbf431 Parents: 5674cdd Author: Dmitiry Setrakyan <[email protected]> Authored: Thu Feb 5 20:00:34 2015 -0800 Committer: Dmitiry Setrakyan <[email protected]> Committed: Thu Feb 5 20:00:34 2015 -0800 ---------------------------------------------------------------------- .../spi/checkpoint/s3/S3CheckpointSpiMBean.java | 12 +- .../fifo/CacheFifoEvictionPolicyMBean.java | 10 +- ...CacheGgfsPerBlockLruEvictionPolicyMBean.java | 18 +-- .../lru/CacheLruEvictionPolicyMBean.java | 10 +- .../random/CacheRandomEvictionPolicyMBean.java | 6 +- .../client/router/GridTcpRouterMBean.java | 16 +- .../apache/ignite/internal/IgniteKernal.java | 4 +- .../internal/IgniteThreadPoolMXBeanAdapter.java | 129 ---------------- .../internal/ThreadPoolMXBeanAdapter.java | 129 ++++++++++++++++ .../internal/mxbean/IgniteStandardMXBean.java | 10 +- .../ignite/mxbean/CacheMetricsMXBean.java | 110 +++++++------- .../mxbean/ClusterLocalNodeMetricsMXBean.java | 108 ++++++------- .../org/apache/ignite/mxbean/IgniteMXBean.java | 94 ++++++------ .../ignite/mxbean/IgniteMXBeanDescription.java | 34 ----- .../IgniteMXBeanParametersDescriptions.java | 34 ----- .../mxbean/IgniteMXBeanParametersNames.java | 34 ----- .../ignite/mxbean/IgniteThreadPoolMXBean.java | 152 ------------------- .../apache/ignite/mxbean/IgnitionMXBean.java | 34 ++--- .../apache/ignite/mxbean/MXBeanDescription.java | 34 +++++ .../mxbean/MXBeanParametersDescriptions.java | 34 +++++ .../ignite/mxbean/MXBeanParametersNames.java | 34 +++++ .../apache/ignite/mxbean/ThreadPoolMXBean.java | 152 +++++++++++++++++++ .../ignite/spi/IgniteSpiManagementMBean.java | 14 +- .../noop/NoopAuthenticationSpiMBean.java | 2 +- .../cache/CacheCheckpointSpiMBean.java | 4 +- .../checkpoint/jdbc/JdbcCheckpointSpiMBean.java | 24 +-- .../sharedfs/SharedFsCheckpointSpiMBean.java | 6 +- .../fifoqueue/FifoQueueCollisionSpiMBean.java | 18 +-- .../JobStealingCollisionSpiMBean.java | 36 ++--- .../PriorityQueueCollisionSpiMBean.java | 34 ++--- .../tcp/TcpCommunicationSpiMBean.java | 58 +++---- .../local/LocalDeploymentSpiMBean.java | 2 +- .../tcp/TcpClientDiscoverySpiMBean.java | 34 ++--- .../spi/discovery/tcp/TcpDiscoverySpiMBean.java | 62 ++++---- .../memory/MemoryEventStorageSpiMBean.java | 10 +- .../failover/always/AlwaysFailoverSpiMBean.java | 6 +- .../JobStealingFailoverSpiMBean.java | 8 +- .../failover/never/NeverFailoverSpiMBean.java | 2 +- .../adaptive/AdaptiveLoadBalancingSpiMBean.java | 4 +- .../RoundRobinLoadBalancingSpiMBean.java | 4 +- .../WeightedRandomLoadBalancingSpiMBean.java | 6 +- .../noop/NoopSecureSessionSpiMBean.java | 2 +- .../swapspace/file/FileSwapSpaceSpiMBean.java | 12 +- .../apache/ignite/streamer/StreamerMBean.java | 34 ++--- .../ignite/streamer/StreamerStageMBean.java | 24 +-- .../ignite/streamer/StreamerWindowMBean.java | 10 +- .../index/StreamerIndexProviderMBean.java | 12 +- .../ignite/util/mbeans/GridMBeanSelfTest.java | 38 ++--- .../deployment/uri/UriDeploymentSpiMBean.java | 8 +- 49 files changed, 836 insertions(+), 836 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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 index 7a06688..528e60f 100644 --- 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 @@ -23,37 +23,37 @@ import org.apache.ignite.spi.*; /** * Management bean for {@link S3CheckpointSpi}. */ -@IgniteMXBeanDescription("MBean that provides access to S3 checkpoint SPI configuration.") +@MXBeanDescription("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.") + @MXBeanDescription("S3 bucket name.") public String getBucketName(); /** * @return S3 access key. */ - @IgniteMXBeanDescription("S3 access key.") + @MXBeanDescription("S3 access key.") public String getAccessKey(); /** * @return HTTP proxy host. */ - @IgniteMXBeanDescription("HTTP proxy host.") + @MXBeanDescription("HTTP proxy host.") public String getProxyHost(); /** * @return HTTP proxy port */ - @IgniteMXBeanDescription("HTTP proxy port.") + @MXBeanDescription("HTTP proxy port.") public int getProxyPort(); /** * @return HTTP proxy user name. */ - @IgniteMXBeanDescription("HTTP proxy user name.") + @MXBeanDescription("HTTP proxy user name.") public String getProxyUsername(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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 index 1dd5f18..62d5ee7 100644 --- 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 @@ -22,14 +22,14 @@ import org.apache.ignite.mxbean.*; /** * MBean for {@code FIFO} eviction policy. */ -@IgniteMXBeanDescription("MBean for FIFO cache eviction policy.") +@MXBeanDescription("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.") + @MXBeanDescription("Name of metadata attribute used to store eviction policy data.") public String getMetaAttributeName(); /** @@ -37,7 +37,7 @@ public interface CacheFifoEvictionPolicyMBean { * * @return Maximum allowed cache size. */ - @IgniteMXBeanDescription("Maximum allowed cache size.") + @MXBeanDescription("Maximum allowed cache size.") public int getMaxSize(); /** @@ -45,7 +45,7 @@ public interface CacheFifoEvictionPolicyMBean { * * @param max Maximum allowed cache size. */ - @IgniteMXBeanDescription("Set maximum allowed cache size.") + @MXBeanDescription("Set maximum allowed cache size.") public void setMaxSize(int max); /** @@ -53,6 +53,6 @@ public interface CacheFifoEvictionPolicyMBean { * * @return Current queue size. */ - @IgniteMXBeanDescription("Current FIFO queue size.") + @MXBeanDescription("Current FIFO queue size.") public int getCurrentSize(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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 index 6065da1..f59bec8 100644 --- 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 @@ -25,14 +25,14 @@ import java.util.*; /** * MBean for {@code GGFS per-block LRU} eviction policy. */ -@IgniteMXBeanDescription("MBean for GGFS per-block LRU cache eviction policy.") +@MXBeanDescription("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.") + @MXBeanDescription("Maximum allowed size of all blocks in bytes.") public long getMaxSize(); /** @@ -40,7 +40,7 @@ public interface CacheGgfsPerBlockLruEvictionPolicyMBean { * * @param maxSize Maximum allowed size of data in all blocks in bytes. */ - @IgniteMXBeanDescription("Sets aximum allowed size of data in all blocks in bytes.") + @MXBeanDescription("Sets aximum allowed size of data in all blocks in bytes.") public void setMaxSize(long maxSize); /** @@ -48,7 +48,7 @@ public interface CacheGgfsPerBlockLruEvictionPolicyMBean { * * @return Maximum allowed amount of blocks. */ - @IgniteMXBeanDescription("Maximum allowed amount of blocks.") + @MXBeanDescription("Maximum allowed amount of blocks.") public int getMaxBlocks(); /** @@ -56,7 +56,7 @@ public interface CacheGgfsPerBlockLruEvictionPolicyMBean { * * @param maxBlocks Maximum allowed amount of blocks. */ - @IgniteMXBeanDescription("Sets maximum allowed amount of blocks.") + @MXBeanDescription("Sets maximum allowed amount of blocks.") public void setMaxBlocks(int maxBlocks); /** @@ -64,7 +64,7 @@ public interface CacheGgfsPerBlockLruEvictionPolicyMBean { * * @return Collection of regex for paths whose blocks must not be evicted. */ - @IgniteMXBeanDescription("Collection of regex for paths whose blocks must not be evicted.") + @MXBeanDescription("Collection of regex for paths whose blocks must not be evicted.") @Nullable public Collection<String> getExcludePaths(); /** @@ -72,7 +72,7 @@ public interface CacheGgfsPerBlockLruEvictionPolicyMBean { * * @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.") + @MXBeanDescription("Sets collection of regex for paths whose blocks must not be evicted.") public void setExcludePaths(@Nullable Collection<String> excludePaths); /** @@ -80,7 +80,7 @@ public interface CacheGgfsPerBlockLruEvictionPolicyMBean { * * @return Current size of data in all blocks. */ - @IgniteMXBeanDescription("Current size of data in all blocks.") + @MXBeanDescription("Current size of data in all blocks.") public long getCurrentSize(); /** @@ -88,6 +88,6 @@ public interface CacheGgfsPerBlockLruEvictionPolicyMBean { * * @return Current amount of blocks. */ - @IgniteMXBeanDescription("Current amount of blocks.") + @MXBeanDescription("Current amount of blocks.") public int getCurrentBlocks(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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 index 199a8c7..22f39cc 100644 --- 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 @@ -22,14 +22,14 @@ import org.apache.ignite.mxbean.*; /** * MBean for {@code LRU} eviction policy. */ -@IgniteMXBeanDescription("MBean for LRU cache eviction policy.") +@MXBeanDescription("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.") + @MXBeanDescription("Name of metadata attribute used to store eviction policy data.") public String getMetaAttributeName(); /** @@ -37,7 +37,7 @@ public interface CacheLruEvictionPolicyMBean { * * @return Maximum allowed cache size. */ - @IgniteMXBeanDescription("Maximum allowed cache size.") + @MXBeanDescription("Maximum allowed cache size.") public int getMaxSize(); /** @@ -45,7 +45,7 @@ public interface CacheLruEvictionPolicyMBean { * * @param max Maximum allowed cache size. */ - @IgniteMXBeanDescription("Sets maximum allowed cache size.") + @MXBeanDescription("Sets maximum allowed cache size.") public void setMaxSize(int max); /** @@ -53,6 +53,6 @@ public interface CacheLruEvictionPolicyMBean { * * @return Current queue size. */ - @IgniteMXBeanDescription("Current queue size.") + @MXBeanDescription("Current queue size.") public int getCurrentSize(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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 index a1d1137..4ef7696 100644 --- 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 @@ -22,14 +22,14 @@ import org.apache.ignite.mxbean.*; /** * MBean for {@code random} eviction policy. */ -@IgniteMXBeanDescription("MBean for random cache eviction policy.") +@MXBeanDescription("MBean for random cache eviction policy.") public interface CacheRandomEvictionPolicyMBean { /** * Gets maximum allowed cache size. * * @return Maximum allowed cache size. */ - @IgniteMXBeanDescription("Maximum allowed cache size.") + @MXBeanDescription("Maximum allowed cache size.") public int getMaxSize(); /** @@ -37,6 +37,6 @@ public interface CacheRandomEvictionPolicyMBean { * * @param max Maximum allowed cache size. */ - @IgniteMXBeanDescription("Sets maximum allowed cache size.") + @MXBeanDescription("Sets maximum allowed cache size.") public void setMaxSize(int max); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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 index 2185bdd..3e75e90 100644 --- 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 @@ -24,14 +24,14 @@ import java.util.*; /** * MBean interface for TCP router. */ -@IgniteMXBeanDescription("MBean for TCP router.") +@MXBeanDescription("MBean for TCP router.") public interface GridTcpRouterMBean { /** * Gets host for TCP binary protocol server. * * @return TCP host. */ - @IgniteMXBeanDescription("Host for TCP binary protocol server.") + @MXBeanDescription("Host for TCP binary protocol server.") public String getHost(); /** @@ -39,7 +39,7 @@ public interface GridTcpRouterMBean { * * @return TCP port. */ - @IgniteMXBeanDescription("Port for TCP binary protocol server.") + @MXBeanDescription("Port for TCP binary protocol server.") public int getPort(); /** @@ -48,7 +48,7 @@ public interface GridTcpRouterMBean { * * @return Whether or not client authentication is required. */ - @IgniteMXBeanDescription("Flag indicating whether or not SSL is enabled for incoming connections.") + @MXBeanDescription("Flag indicating whether or not SSL is enabled for incoming connections.") public boolean isSslEnabled(); /** @@ -57,7 +57,7 @@ public interface GridTcpRouterMBean { * * @return Whether or not client authentication is required. */ - @IgniteMXBeanDescription("Flag indicating whether or not remote clients are required to have a valid SSL certificate.") + @MXBeanDescription("Flag indicating whether or not remote clients are required to have a valid SSL certificate.") public boolean isSslClientAuth(); /** @@ -65,7 +65,7 @@ public interface GridTcpRouterMBean { * * @return List of server addresses. */ - @IgniteMXBeanDescription("Gets list of server addresses where router's embedded client should connect.") + @MXBeanDescription("Gets list of server addresses where router's embedded client should connect.") public Collection<String> getServers(); /** @@ -74,7 +74,7 @@ public interface GridTcpRouterMBean { * * @return Number of messages received by this router. */ - @IgniteMXBeanDescription("Number of messages received by this router.") + @MXBeanDescription("Number of messages received by this router.") public long getReceivedCount(); /** @@ -83,6 +83,6 @@ public interface GridTcpRouterMBean { * * @return Number of responses returned by this router. */ - @IgniteMXBeanDescription("Number of responses returned by this router.") + @MXBeanDescription("Number of responses returned by this router.") public long getSendCount(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java index 24b9086..9731032 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java @@ -1508,8 +1508,8 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit cfg.getGridName(), "Thread Pools", name, - new IgniteThreadPoolMXBeanAdapter(exec), - IgniteThreadPoolMXBean.class); + new ThreadPoolMXBeanAdapter(exec), + ThreadPoolMXBean.class); if (log.isDebugEnabled()) log.debug("Registered executor service MBean: " + res); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/modules/core/src/main/java/org/apache/ignite/internal/IgniteThreadPoolMXBeanAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteThreadPoolMXBeanAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteThreadPoolMXBeanAdapter.java deleted file mode 100644 index 35ccbb1..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteThreadPoolMXBeanAdapter.java +++ /dev/null @@ -1,129 +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; - -import org.apache.ignite.internal.util.typedef.internal.*; -import org.apache.ignite.mxbean.*; - -import java.util.concurrent.*; - -/** - * Adapter for {@link IgniteThreadPoolMXBean} which delegates all method calls to the underlying - * {@link ExecutorService} instance. - */ -public class IgniteThreadPoolMXBeanAdapter implements IgniteThreadPoolMXBean { - /** */ - private final ExecutorService exec; - - /** - * Creates adapter. - * - * @param exec Executor service - */ - public IgniteThreadPoolMXBeanAdapter(ExecutorService exec) { - assert exec != null; - - this.exec = exec; - } - - /** {@inheritDoc} */ - @Override public int getActiveCount() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getActiveCount() : -1; - } - - /** {@inheritDoc} */ - @Override public long getCompletedTaskCount() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getCompletedTaskCount() : -1; - } - - /** {@inheritDoc} */ - @Override public int getCorePoolSize() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getCorePoolSize() : -1; - } - - /** {@inheritDoc} */ - @Override public int getLargestPoolSize() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getLargestPoolSize() : -1; - } - - /** {@inheritDoc} */ - @Override public int getMaximumPoolSize() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getMaximumPoolSize() : -1; - } - - /** {@inheritDoc} */ - @Override public int getPoolSize() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getPoolSize() : -1; - } - - /** {@inheritDoc} */ - @Override public long getTaskCount() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getTaskCount() : -1; - } - - /** {@inheritDoc} */ - @Override public int getQueueSize() { - return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getQueue().size() : -1; - } - - /** {@inheritDoc} */ - @Override public long getKeepAliveTime() { - return exec instanceof ThreadPoolExecutor ? - ((ThreadPoolExecutor)exec).getKeepAliveTime(TimeUnit.MILLISECONDS) : -1; - } - - /** {@inheritDoc} */ - @Override public boolean isShutdown() { - return exec.isShutdown(); - } - - /** {@inheritDoc} */ - @Override public boolean isTerminated() { - return exec.isTerminated(); - } - - /** {@inheritDoc} */ - @Override public boolean isTerminating() { - return exec instanceof ThreadPoolExecutor && ((ThreadPoolExecutor) exec).isTerminating(); - } - - /** {@inheritDoc} */ - @Override public String getRejectedExecutionHandlerClass() { - if (!(exec instanceof ThreadPoolExecutor)) - return ""; - - RejectedExecutionHandler hnd = ((ThreadPoolExecutor)exec).getRejectedExecutionHandler(); - - return hnd == null ? "" : hnd.getClass().getName(); - } - - /** {@inheritDoc} */ - @Override public String getThreadFactoryClass() { - if (!(exec instanceof ThreadPoolExecutor)) - return ""; - - ThreadFactory factory = ((ThreadPoolExecutor)exec).getThreadFactory(); - - return factory == null ? "" : factory.getClass().getName(); - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(IgniteThreadPoolMXBeanAdapter.class, this, super.toString()); - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/modules/core/src/main/java/org/apache/ignite/internal/ThreadPoolMXBeanAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/ThreadPoolMXBeanAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/ThreadPoolMXBeanAdapter.java new file mode 100644 index 0000000..0de13e6 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/ThreadPoolMXBeanAdapter.java @@ -0,0 +1,129 @@ +/* + * 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; + +import org.apache.ignite.internal.util.typedef.internal.*; +import org.apache.ignite.mxbean.*; + +import java.util.concurrent.*; + +/** + * Adapter for {@link org.apache.ignite.mxbean.ThreadPoolMXBean} which delegates all method calls to the underlying + * {@link ExecutorService} instance. + */ +public class ThreadPoolMXBeanAdapter implements ThreadPoolMXBean { + /** */ + private final ExecutorService exec; + + /** + * Creates adapter. + * + * @param exec Executor service + */ + public ThreadPoolMXBeanAdapter(ExecutorService exec) { + assert exec != null; + + this.exec = exec; + } + + /** {@inheritDoc} */ + @Override public int getActiveCount() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getActiveCount() : -1; + } + + /** {@inheritDoc} */ + @Override public long getCompletedTaskCount() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getCompletedTaskCount() : -1; + } + + /** {@inheritDoc} */ + @Override public int getCorePoolSize() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getCorePoolSize() : -1; + } + + /** {@inheritDoc} */ + @Override public int getLargestPoolSize() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getLargestPoolSize() : -1; + } + + /** {@inheritDoc} */ + @Override public int getMaximumPoolSize() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getMaximumPoolSize() : -1; + } + + /** {@inheritDoc} */ + @Override public int getPoolSize() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getPoolSize() : -1; + } + + /** {@inheritDoc} */ + @Override public long getTaskCount() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getTaskCount() : -1; + } + + /** {@inheritDoc} */ + @Override public int getQueueSize() { + return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getQueue().size() : -1; + } + + /** {@inheritDoc} */ + @Override public long getKeepAliveTime() { + return exec instanceof ThreadPoolExecutor ? + ((ThreadPoolExecutor)exec).getKeepAliveTime(TimeUnit.MILLISECONDS) : -1; + } + + /** {@inheritDoc} */ + @Override public boolean isShutdown() { + return exec.isShutdown(); + } + + /** {@inheritDoc} */ + @Override public boolean isTerminated() { + return exec.isTerminated(); + } + + /** {@inheritDoc} */ + @Override public boolean isTerminating() { + return exec instanceof ThreadPoolExecutor && ((ThreadPoolExecutor) exec).isTerminating(); + } + + /** {@inheritDoc} */ + @Override public String getRejectedExecutionHandlerClass() { + if (!(exec instanceof ThreadPoolExecutor)) + return ""; + + RejectedExecutionHandler hnd = ((ThreadPoolExecutor)exec).getRejectedExecutionHandler(); + + return hnd == null ? "" : hnd.getClass().getName(); + } + + /** {@inheritDoc} */ + @Override public String getThreadFactoryClass() { + if (!(exec instanceof ThreadPoolExecutor)) + return ""; + + ThreadFactory factory = ((ThreadPoolExecutor)exec).getThreadFactory(); + + return factory == null ? "" : factory.getClass().getName(); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(ThreadPoolMXBeanAdapter.class, this, super.toString()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java b/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java index 59bb9e2..77810e1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java @@ -82,7 +82,7 @@ public class IgniteStandardMXBean extends StandardMBean { Method mtd = findMethod(getMBeanInterface(), methodName, new Class[]{}); if (mtd != null) { - IgniteMXBeanDescription desc = mtd.getAnnotation(IgniteMXBeanDescription.class); + MXBeanDescription desc = mtd.getAnnotation(MXBeanDescription.class); if (desc != null) { str = desc.value(); @@ -110,7 +110,7 @@ public class IgniteStandardMXBean extends StandardMBean { String str = super.getDescription(info); // Return either default one or given by annotation. - IgniteMXBeanDescription desc = U.getAnnotation(getMBeanInterface(), IgniteMXBeanDescription.class); + MXBeanDescription desc = U.getAnnotation(getMBeanInterface(), MXBeanDescription.class); if (desc != null) { str = desc.value(); @@ -133,7 +133,7 @@ public class IgniteStandardMXBean extends StandardMBean { try { Method m = getMethod(info); - IgniteMXBeanDescription desc = m.getAnnotation(IgniteMXBeanDescription.class); + MXBeanDescription desc = m.getAnnotation(MXBeanDescription.class); if (desc != null) { str = desc.value(); @@ -160,7 +160,7 @@ public class IgniteStandardMXBean extends StandardMBean { try { Method m = getMethod(op); - IgniteMXBeanParametersDescriptions decsAnn = m.getAnnotation(IgniteMXBeanParametersDescriptions.class); + MXBeanParametersDescriptions decsAnn = m.getAnnotation(MXBeanParametersDescriptions.class); if (decsAnn != null) { assert decsAnn.value() != null; @@ -190,7 +190,7 @@ public class IgniteStandardMXBean extends StandardMBean { try { Method m = getMethod(op); - IgniteMXBeanParametersNames namesAnn = m.getAnnotation(IgniteMXBeanParametersNames.class); + MXBeanParametersNames namesAnn = m.getAnnotation(MXBeanParametersNames.class); if (namesAnn != null) { assert namesAnn.value() != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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..2ad07b5 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,221 +25,221 @@ import javax.cache.management.*; /** * This interface defines JMX view on {@link IgniteCache}. */ -@IgniteMXBeanDescription("MBean that provides access to cache descriptor.") +@MXBeanDescription("MBean that provides access to cache descriptor.") public interface CacheMetricsMXBean extends CacheStatisticsMXBean, CacheMXBean, CacheMetrics { /** {@inheritDoc} */ - @IgniteMXBeanDescription("Clear statistics.") + @MXBeanDescription("Clear statistics.") public void clear(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of hits.") + @MXBeanDescription("Number of hits.") public long getCacheHits(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Percentage of successful hits.") + @MXBeanDescription("Percentage of successful hits.") public float getCacheHitPercentage(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of misses.") + @MXBeanDescription("Number of misses.") public long getCacheMisses(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Percentage of accesses that failed to find anything.") + @MXBeanDescription("Percentage of accesses that failed to find anything.") public float getCacheMissPercentage(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of gets.") + @MXBeanDescription("Number of gets.") public long getCacheGets(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of puts.") + @MXBeanDescription("Number of puts.") public long getCachePuts(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of removals.") + @MXBeanDescription("Number of removals.") public long getCacheRemovals(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of eviction entries.") + @MXBeanDescription("Number of eviction entries.") public long getCacheEvictions(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time to execute get.") + @MXBeanDescription("Average time to execute get.") public float getAverageGetTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time to execute put.") + @MXBeanDescription("Average time to execute put.") public float getAveragePutTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time to execute remove.") + @MXBeanDescription("Average time to execute remove.") public float getAverageRemoveTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time to commit transaction.") + @MXBeanDescription("Average time to commit transaction.") public float getAverageTxCommitTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time to rollback transaction.") + @MXBeanDescription("Average time to rollback transaction.") public float getAverageTxRollbackTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of transaction commits.") + @MXBeanDescription("Number of transaction commits.") public long getCacheTxCommits(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of transaction rollback.") + @MXBeanDescription("Number of transaction rollback.") public long getCacheTxRollbacks(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Cache name.") + @MXBeanDescription("Cache name.") public String name(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of entries that was swapped to disk.") + @MXBeanDescription("Number of entries that was swapped to disk.") public long getOverflowSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of entries stored in off-heap memory.") + @MXBeanDescription("Number of entries stored in off-heap memory.") public long getOffHeapEntriesCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Memory size allocated in off-heap.") + @MXBeanDescription("Memory size allocated in off-heap.") public long getOffHeapAllocatedSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of non-null values in the cache.") + @MXBeanDescription("Number of non-null values in the cache.") public int getSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of keys in the cache (possibly with null values).") + @MXBeanDescription("Number of keys in the cache (possibly with null values).") public int getKeySize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("True if cache is empty.") + @MXBeanDescription("True if cache is empty.") public boolean isEmpty(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Current size of evict queue.") + @MXBeanDescription("Current size of evict queue.") public int getDhtEvictQueueCurrentSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction per-thread map size.") + @MXBeanDescription("Transaction per-thread map size.") public int getTxThreadMapSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction per-Xid map size.") + @MXBeanDescription("Transaction per-Xid map size.") public int getTxXidMapSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction committed queue size.") + @MXBeanDescription("Transaction committed queue size.") public int getTxCommitQueueSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction prepared queue size.") + @MXBeanDescription("Transaction prepared queue size.") public int getTxPrepareQueueSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction start version counts map size.") + @MXBeanDescription("Transaction start version counts map size.") public int getTxStartVersionCountsSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction committed ID map size.") + @MXBeanDescription("Transaction committed ID map size.") public int getTxCommittedVersionsSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction rolled back ID map size.") + @MXBeanDescription("Transaction rolled back ID map size.") public int getTxRolledbackVersionsSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction DHT per-thread map size.") + @MXBeanDescription("Transaction DHT per-thread map size.") public int getTxDhtThreadMapSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction DHT per-Xid map size.") + @MXBeanDescription("Transaction DHT per-Xid map size.") public int getTxDhtXidMapSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction DHT committed queue size.") + @MXBeanDescription("Transaction DHT committed queue size.") public int getTxDhtCommitQueueSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction DHT prepared queue size.") + @MXBeanDescription("Transaction DHT prepared queue size.") public int getTxDhtPrepareQueueSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction DHT start version counts map size.") + @MXBeanDescription("Transaction DHT start version counts map size.") public int getTxDhtStartVersionCountsSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction DHT committed ID map size.") + @MXBeanDescription("Transaction DHT committed ID map size.") public int getTxDhtCommittedVersionsSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Transaction DHT rolled back ID map size.") + @MXBeanDescription("Transaction DHT rolled back ID map size.") public int getTxDhtRolledbackVersionsSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("True if write-behind is enabled for this cache.") + @MXBeanDescription("True if write-behind is enabled for this cache.") public boolean isWriteBehindEnabled(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Size of internal buffer that triggers flush procedure.") + @MXBeanDescription("Size of internal buffer that triggers flush procedure.") public int getWriteBehindFlushSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Count of flush threads.") + @MXBeanDescription("Count of flush threads.") public int getWriteBehindFlushThreadCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Flush frequency interval in milliseconds.") + @MXBeanDescription("Flush frequency interval in milliseconds.") public long getWriteBehindFlushFrequency(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Maximum size of batch for similar operations.") + @MXBeanDescription("Maximum size of batch for similar operations.") public int getWriteBehindStoreBatchSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Count of cache overflow events since write-behind cache has started.") + @MXBeanDescription("Count of cache overflow events since write-behind cache has started.") public int getWriteBehindTotalCriticalOverflowCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Count of cache overflow events since write-behind cache has started.") + @MXBeanDescription("Count of cache overflow events since write-behind cache has started.") public int getWriteBehindCriticalOverflowCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Count of cache cache entries that are currently in retry state.") + @MXBeanDescription("Count of cache cache entries that are currently in retry state.") public int getWriteBehindErrorRetryCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Count of cache entries that are waiting to be flushed.") + @MXBeanDescription("Count of cache entries that are waiting to be flushed.") public int getWriteBehindBufferSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Key type.") + @MXBeanDescription("Key type.") public String getKeyType(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Value type.") + @MXBeanDescription("Value type.") public String getValueType(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("True if the cache is store by value.") + @MXBeanDescription("True if the cache is store by value.") public boolean isStoreByValue(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("True if statistics collection is enabled.") + @MXBeanDescription("True if statistics collection is enabled.") public boolean isStatisticsEnabled(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("True if management is enabled.") + @MXBeanDescription("True if management is enabled.") public boolean isManagementEnabled(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("True when a cache is in read-through mode.") + @MXBeanDescription("True when a cache is in read-through mode.") public boolean isReadThrough(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("True when a cache is in write-through mode.") + @MXBeanDescription("True when a cache is in write-through mode.") public boolean isWriteThrough(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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..b323160 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,219 +22,219 @@ import org.apache.ignite.cluster.*; /** * MBean for local node metrics. */ -@IgniteMXBeanDescription("MBean that provides access to all local node metrics.") +@MXBeanDescription("MBean that provides access to all local node metrics.") public interface ClusterLocalNodeMetricsMXBean extends ClusterMetrics { /** {@inheritDoc} */ - @IgniteMXBeanDescription("Last update time of this node metrics.") + @MXBeanDescription("Last update time of this node metrics.") public long getLastUpdateTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Maximum number of jobs that ever ran concurrently on this node.") + @MXBeanDescription("Maximum number of jobs that ever ran concurrently on this node.") public int getMaximumActiveJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of currently active jobs concurrently executing on the node.") + @MXBeanDescription("Number of currently active jobs concurrently executing on the node.") public int getCurrentActiveJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average number of active jobs concurrently executing on the node.") + @MXBeanDescription("Average number of active jobs concurrently executing on the node.") public float getAverageActiveJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Maximum number of waiting jobs this node had.") + @MXBeanDescription("Maximum number of waiting jobs this node had.") public int getMaximumWaitingJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of queued jobs currently waiting to be executed.") + @MXBeanDescription("Number of queued jobs currently waiting to be executed.") public int getCurrentWaitingJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average number of waiting jobs this node had queued.") + @MXBeanDescription("Average number of waiting jobs this node had queued.") public float getAverageWaitingJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Maximum number of jobs rejected at once during a single collision resolution operation.") + @MXBeanDescription("Maximum number of jobs rejected at once during a single collision resolution operation.") public int getMaximumRejectedJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of jobs rejected after more recent collision resolution operation.") + @MXBeanDescription("Number of jobs rejected after more recent collision resolution operation.") public int getCurrentRejectedJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average number of jobs this node rejects during collision resolution operations.") + @MXBeanDescription("Average number of jobs this node rejects during collision resolution operations.") public float getAverageRejectedJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription( + @MXBeanDescription( "Total number of jobs this node rejects during collision resolution operations since node startup.") public int getTotalRejectedJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Maximum number of cancelled jobs this node ever had running concurrently.") + @MXBeanDescription("Maximum number of cancelled jobs this node ever had running concurrently.") public int getMaximumCancelledJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Number of cancelled jobs that are still running.") + @MXBeanDescription("Number of cancelled jobs that are still running.") public int getCurrentCancelledJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average number of cancelled jobs this node ever had running concurrently.") + @MXBeanDescription("Average number of cancelled jobs this node ever had running concurrently.") public float getAverageCancelledJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Total number of cancelled jobs since node startup.") + @MXBeanDescription("Total number of cancelled jobs since node startup.") public int getTotalCancelledJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Total number of jobs handled by the node.") + @MXBeanDescription("Total number of jobs handled by the node.") public int getTotalExecutedJobs(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Maximum time a job ever spent waiting in a queue to be executed.") + @MXBeanDescription("Maximum time a job ever spent waiting in a queue to be executed.") public long getMaximumJobWaitTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Current wait time of oldest job.") + @MXBeanDescription("Current wait time of oldest job.") public long getCurrentJobWaitTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time jobs spend waiting in the queue to be executed.") + @MXBeanDescription("Average time jobs spend waiting in the queue to be executed.") public double getAverageJobWaitTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Time it took to execute the longest job on the node.") + @MXBeanDescription("Time it took to execute the longest job on the node.") public long getMaximumJobExecuteTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Longest time a current job has been executing for.") + @MXBeanDescription("Longest time a current job has been executing for.") public long getCurrentJobExecuteTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time a job takes to execute on the node.") + @MXBeanDescription("Average time a job takes to execute on the node.") public double getAverageJobExecuteTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Total number of tasks handled by the node.") + @MXBeanDescription("Total number of tasks handled by the node.") public int getTotalExecutedTasks(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Total time this node spent executing jobs.") + @MXBeanDescription("Total time this node spent executing jobs.") public long getTotalBusyTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Total time this node spent idling (not executing any jobs).") + @MXBeanDescription("Total time this node spent idling (not executing any jobs).") public long getTotalIdleTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Time this node spend idling since executing last job.") + @MXBeanDescription("Time this node spend idling since executing last job.") public long getCurrentIdleTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Percentage of time this node is busy executing jobs vs. idling.") + @MXBeanDescription("Percentage of time this node is busy executing jobs vs. idling.") public float getBusyTimePercentage(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Percentage of time this node is idling vs. executing jobs.") + @MXBeanDescription("Percentage of time this node is idling vs. executing jobs.") public float getIdleTimePercentage(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The number of CPUs available to the Java Virtual Machine.") + @MXBeanDescription("The number of CPUs available to the Java Virtual Machine.") public int getTotalCpus(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The system load average; or a negative value if not available.") + @MXBeanDescription("The system load average; or a negative value if not available.") public double getCurrentCpuLoad(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average of CPU load values over all metrics kept in the history.") + @MXBeanDescription("Average of CPU load values over all metrics kept in the history.") public double getAverageCpuLoad(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Average time spent in CG since the last update.") + @MXBeanDescription("Average time spent in CG since the last update.") public double getCurrentGcCpuLoad(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The initial size of memory in bytes; -1 if undefined.") + @MXBeanDescription("The initial size of memory in bytes; -1 if undefined.") public long getHeapMemoryInitialized(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Current heap size that is used for object allocation.") + @MXBeanDescription("Current heap size that is used for object allocation.") public long getHeapMemoryUsed(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The amount of committed memory in bytes.") + @MXBeanDescription("The amount of committed memory in bytes.") public long getHeapMemoryCommitted(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The maximum amount of memory in bytes; -1 if undefined.") + @MXBeanDescription("The maximum amount of memory in bytes; -1 if undefined.") public long getHeapMemoryMaximum(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The initial size of memory in bytes; -1 if undefined.") + @MXBeanDescription("The initial size of memory in bytes; -1 if undefined.") public long getNonHeapMemoryInitialized(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Current non-heap memory size that is used by Java VM.") + @MXBeanDescription("Current non-heap memory size that is used by Java VM.") public long getNonHeapMemoryUsed(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Amount of non-heap memory in bytes that is committed for the JVM to use.") + @MXBeanDescription("Amount of non-heap memory in bytes that is committed for the JVM to use.") public long getNonHeapMemoryCommitted(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Maximum amount of non-heap memory in bytes that can " + + @MXBeanDescription("Maximum amount of non-heap memory in bytes that can " + "be used for memory management. -1 if undefined.") public long getNonHeapMemoryMaximum(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Uptime of the JVM in milliseconds.") + @MXBeanDescription("Uptime of the JVM in milliseconds.") public long getUpTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Start time of the JVM in milliseconds.") + @MXBeanDescription("Start time of the JVM in milliseconds.") public long getStartTime(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Current number of live threads.") + @MXBeanDescription("Current number of live threads.") public int getCurrentThreadCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The peak live thread count.") + @MXBeanDescription("The peak live thread count.") public int getMaximumThreadCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("The total number of threads started.") + @MXBeanDescription("The total number of threads started.") public long getTotalStartedThreadCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Current number of live daemon threads.") + @MXBeanDescription("Current number of live daemon threads.") public int getCurrentDaemonThreadCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Last data version.") + @MXBeanDescription("Last data version.") public long getLastDataVersion(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Sent messages count.") + @MXBeanDescription("Sent messages count.") public int getSentMessagesCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Sent bytes count.") + @MXBeanDescription("Sent bytes count.") public long getSentBytesCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Received messages count.") + @MXBeanDescription("Received messages count.") public int getReceivedMessagesCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Received bytes count.") + @MXBeanDescription("Received bytes count.") public long getReceivedBytesCount(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Outbound messages queue size.") + @MXBeanDescription("Outbound messages queue size.") public int getOutboundMessagesQueueSize(); /** {@inheritDoc} */ - @IgniteMXBeanDescription("Start time of the grid node in milliseconds.") + @MXBeanDescription("Start time of the grid node in milliseconds.") public long getNodeStartTime(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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..e35ad3f 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,14 +23,14 @@ import java.util.*; /** * This interface defines JMX view on kernal. */ -@IgniteMXBeanDescription("MBean that provides access to Kernal information.") +@MXBeanDescription("MBean that provides access to Kernal information.") public interface IgniteMXBean { /** * Gets file path of the license. * * @return File path of the license. */ - @IgniteMXBeanDescription("File path of the license.") + @MXBeanDescription("File path of the license.") public String getLicenseFilePath(); /** @@ -38,7 +38,7 @@ public interface IgniteMXBean { * * @return String presentation of the version. */ - @IgniteMXBeanDescription("String presentation of the Ignite version.") + @MXBeanDescription("String presentation of the Ignite version.") public String getFullVersion(); /** @@ -46,7 +46,7 @@ public interface IgniteMXBean { * * @return Copyright statement for GridGain product. */ - @IgniteMXBeanDescription("Copyright statement for GridGain product.") + @MXBeanDescription("Copyright statement for GridGain product.") public String getCopyright(); /** @@ -54,7 +54,7 @@ public interface IgniteMXBean { * * @return String presentation of the kernal start timestamp. */ - @IgniteMXBeanDescription("String presentation of the kernal start timestamp.") + @MXBeanDescription("String presentation of the kernal start timestamp.") public String getStartTimestampFormatted(); /** @@ -62,7 +62,7 @@ public interface IgniteMXBean { * * @return String presentation of up-time for the kernal. */ - @IgniteMXBeanDescription("String presentation of up-time for the kernal.") + @MXBeanDescription("String presentation of up-time for the kernal.") public String getUpTimeFormatted(); /** @@ -70,7 +70,7 @@ public interface IgniteMXBean { * * @return Start timestamp of the kernal. */ - @IgniteMXBeanDescription("Start timestamp of the kernal.") + @MXBeanDescription("Start timestamp of the kernal.") public long getStartTimestamp(); /** @@ -78,7 +78,7 @@ public interface IgniteMXBean { * * @return Up-time of the kernal. */ - @IgniteMXBeanDescription("Up-time of the kernal.") + @MXBeanDescription("Up-time of the kernal.") public long getUpTime(); /** @@ -90,7 +90,7 @@ public interface IgniteMXBean { * * @return User defined attributes for this node. */ - @IgniteMXBeanDescription("Collection of formatted user-defined attributes added to this node.") + @MXBeanDescription("Collection of formatted user-defined attributes added to this node.") public Collection<String> getUserAttributesFormatted(); /** @@ -98,7 +98,7 @@ public interface IgniteMXBean { * * @return Logger that is used in grid. */ - @IgniteMXBeanDescription("Formatted instance of logger that is in grid.") + @MXBeanDescription("Formatted instance of logger that is in grid.") public String getGridLoggerFormatted(); /** @@ -106,7 +106,7 @@ public interface IgniteMXBean { * * @return Thread pool implementation that is used in grid. */ - @IgniteMXBeanDescription("Formatted instance of fully configured thread pool that is used in grid.") + @MXBeanDescription("Formatted instance of fully configured thread pool that is used in grid.") public String getExecutorServiceFormatted(); /** @@ -114,7 +114,7 @@ public interface IgniteMXBean { * * @return GridGain installation home. */ - @IgniteMXBeanDescription("GridGain installation home folder.") + @MXBeanDescription("GridGain installation home folder.") public String getGridGainHome(); /** @@ -122,7 +122,7 @@ public interface IgniteMXBean { * * @return MBean server instance. */ - @IgniteMXBeanDescription("Formatted instance of MBean server instance.") + @MXBeanDescription("Formatted instance of MBean server instance.") public String getMBeanServerFormatted(); /** @@ -130,7 +130,7 @@ public interface IgniteMXBean { * * @return Unique identifier for this node within grid. */ - @IgniteMXBeanDescription("Unique identifier for this node within grid.") + @MXBeanDescription("Unique identifier for this node within grid.") public UUID getLocalNodeId(); /** @@ -145,7 +145,7 @@ public interface IgniteMXBean { * @return {@code true} if peer class loading is enabled, {@code false} * otherwise. */ - @IgniteMXBeanDescription("Whether or not peer class loading (a.k.a. P2P class loading) is enabled.") + @MXBeanDescription("Whether or not peer class loading (a.k.a. P2P class loading) is enabled.") public boolean isPeerClassLoadingEnabled(); /** @@ -155,7 +155,7 @@ public interface IgniteMXBean { * @return {@code toString()} representation of all lifecycle beans configured * with GridGain. */ - @IgniteMXBeanDescription("String representation of lifecycle beans.") + @MXBeanDescription("String representation of lifecycle beans.") public Collection<String> getLifecycleBeansFormatted(); /** @@ -165,12 +165,12 @@ public interface IgniteMXBean { * @return {@code true} if specified checkpoint was indeed removed, {@code false} * otherwise. */ - @IgniteMXBeanDescription("This method allows manually remove the checkpoint with given key. Return true " + + @MXBeanDescription("This method allows manually remove the checkpoint with given key. Return true " + "if specified checkpoint was indeed removed, false otherwise.") - @IgniteMXBeanParametersNames( + @MXBeanParametersNames( "key" ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( "Checkpoint key to remove." ) public boolean removeCheckpoint(String key); @@ -182,12 +182,12 @@ public interface IgniteMXBean { * details on string formatting. * @return Whether or not node is alive. */ - @IgniteMXBeanDescription("Pings node with given node ID to see whether it is alive. " + + @MXBeanDescription("Pings node with given node ID to see whether it is alive. " + "Returns whether or not node is alive.") - @IgniteMXBeanParametersNames( + @MXBeanParametersNames( "nodeId" ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( "String presentation of node ID. See java.util.UUID class for details." ) public boolean pingNode(String nodeId); @@ -206,11 +206,11 @@ public interface IgniteMXBean { * class name should be used as task's name. * @throws JMException Thrown if undeploy failed. */ - @IgniteMXBeanDescription("Makes the best attempt to undeploy a task from the whole grid.") - @IgniteMXBeanParametersNames( + @MXBeanDescription("Makes the best attempt to undeploy a task from the whole grid.") + @MXBeanParametersNames( "taskName" ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( "Name of the task to undeploy." ) public void undeployTaskFromGrid(String taskName) throws JMException; @@ -224,15 +224,15 @@ public interface IgniteMXBean { * @return Task return value (assumed of {@code java.lang.String} type). * @throws JMException Thrown in case when execution failed. */ - @IgniteMXBeanDescription("A shortcut method that executes given task assuming single " + + @MXBeanDescription("A shortcut method that executes given task assuming single " + "String argument and String return type. Returns Task return value (assumed of String type).") - @IgniteMXBeanParametersNames( + @MXBeanParametersNames( { "taskName", "arg" } ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( { "Name of the task to execute.", "Single task execution argument (can be null)." @@ -246,12 +246,12 @@ public interface IgniteMXBean { * @param host Host name or IP address of the node to ping. * @return Whether or not node is alive. */ - @IgniteMXBeanDescription("Pings node with given host name to see if it is alive. " + + @MXBeanDescription("Pings node with given host name to see if it is alive. " + "Returns whether or not node is alive.") - @IgniteMXBeanParametersNames( + @MXBeanParametersNames( "host" ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( "Host name or IP address of the node to ping." ) public boolean pingNodeByAddress(String host); @@ -261,7 +261,7 @@ public interface IgniteMXBean { * * @return Grid discovery SPI implementation. */ - @IgniteMXBeanDescription("Formatted instance of configured discovery SPI implementation.") + @MXBeanDescription("Formatted instance of configured discovery SPI implementation.") public String getDiscoverySpiFormatted(); /** @@ -269,7 +269,7 @@ public interface IgniteMXBean { * * @return Grid communication SPI implementation. */ - @IgniteMXBeanDescription("Formatted instance of fully configured SPI communication implementation.") + @MXBeanDescription("Formatted instance of fully configured SPI communication implementation.") public String getCommunicationSpiFormatted(); /** @@ -277,7 +277,7 @@ public interface IgniteMXBean { * * @return Grid deployment SPI implementation. */ - @IgniteMXBeanDescription("Formatted instance of fully configured deployment SPI implementation.") + @MXBeanDescription("Formatted instance of fully configured deployment SPI implementation.") public String getDeploymentSpiFormatted(); /** @@ -285,7 +285,7 @@ public interface IgniteMXBean { * * @return Grid checkpoint SPI implementation. */ - @IgniteMXBeanDescription("Formatted instance of configured checkpoint SPI implementation.") + @MXBeanDescription("Formatted instance of configured checkpoint SPI implementation.") public String getCheckpointSpiFormatted(); /** @@ -293,7 +293,7 @@ public interface IgniteMXBean { * * @return Grid collision SPI implementations. */ - @IgniteMXBeanDescription("Formatted instance of configured collision SPI implementations.") + @MXBeanDescription("Formatted instance of configured collision SPI implementations.") public String getCollisionSpiFormatted(); /** @@ -301,7 +301,7 @@ public interface IgniteMXBean { * * @return Grid swapspace SPI implementations. */ - @IgniteMXBeanDescription("Formatted instance of configured swapspace SPI implementations.") + @MXBeanDescription("Formatted instance of configured swapspace SPI implementations.") public String getSwapSpaceSpiFormatted(); /** @@ -309,7 +309,7 @@ public interface IgniteMXBean { * * @return Grid event SPI implementation. */ - @IgniteMXBeanDescription("Formatted instance of fully configured event SPI implementation.") + @MXBeanDescription("Formatted instance of fully configured event SPI implementation.") public String getEventStorageSpiFormatted(); /** @@ -317,7 +317,7 @@ public interface IgniteMXBean { * * @return Grid failover SPI implementations. */ - @IgniteMXBeanDescription("Formatted instance of fully configured failover SPI implementations.") + @MXBeanDescription("Formatted instance of fully configured failover SPI implementations.") public String getFailoverSpiFormatted(); /** @@ -325,7 +325,7 @@ public interface IgniteMXBean { * * @return Grid load balancing SPI implementations. */ - @IgniteMXBeanDescription("Formatted instance of fully configured load balancing SPI implementations.") + @MXBeanDescription("Formatted instance of fully configured load balancing SPI implementations.") public String getLoadBalancingSpiFormatted(); /** @@ -333,7 +333,7 @@ public interface IgniteMXBean { * * @return Grid authentication SPI implementation. */ - @IgniteMXBeanDescription("Formatted instance of fully configured authentication SPI implementation.") + @MXBeanDescription("Formatted instance of fully configured authentication SPI implementation.") public String getAuthenticationSpiFormatted(); /** @@ -341,7 +341,7 @@ public interface IgniteMXBean { * * @return Grid secure session SPI implementation. */ - @IgniteMXBeanDescription("Formatted instance of fully configured secure session SPI implementation.") + @MXBeanDescription("Formatted instance of fully configured secure session SPI implementation.") public String getSecureSessionSpiFormatted(); /** @@ -349,7 +349,7 @@ public interface IgniteMXBean { * * @return OS information. */ - @IgniteMXBeanDescription("OS information.") + @MXBeanDescription("OS information.") public String getOsInformation(); /** @@ -357,7 +357,7 @@ public interface IgniteMXBean { * * @return JDK information. */ - @IgniteMXBeanDescription("JDK information.") + @MXBeanDescription("JDK information.") public String getJdkInformation(); /** @@ -365,7 +365,7 @@ public interface IgniteMXBean { * * @return OS user name. */ - @IgniteMXBeanDescription("OS user name.") + @MXBeanDescription("OS user name.") public String getOsUser(); /** @@ -373,7 +373,7 @@ public interface IgniteMXBean { * * @return VM name. */ - @IgniteMXBeanDescription("VM name.") + @MXBeanDescription("VM name.") public String getVmName(); /** @@ -381,6 +381,6 @@ public interface IgniteMXBean { * * @return Optional kernal instance name. */ - @IgniteMXBeanDescription("Optional kernal instance name.") + @MXBeanDescription("Optional kernal instance name.") public String getInstanceName(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanDescription.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanDescription.java b/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanDescription.java deleted file mode 100644 index 71fc95b..0000000 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanDescription.java +++ /dev/null @@ -1,34 +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.mxbean; - -import java.lang.annotation.*; - -/** - * Provides description for MBean classes and methods. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.METHOD}) -public @interface IgniteMXBeanDescription { - /** - * - * Description for Mbean. - */ - @SuppressWarnings({"JavaDoc"}) public String value(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersDescriptions.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersDescriptions.java b/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersDescriptions.java deleted file mode 100644 index cd5a9e2..0000000 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersDescriptions.java +++ /dev/null @@ -1,34 +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.mxbean; - -import java.lang.annotation.*; - -/** - * Provides MBean method parameters description. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface IgniteMXBeanParametersDescriptions { - /** - * - * Array of descriptions for parameters. - */ - @SuppressWarnings({"JavaDoc"}) public String[] value(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersNames.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersNames.java b/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersNames.java deleted file mode 100644 index f4b18ad..0000000 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBeanParametersNames.java +++ /dev/null @@ -1,34 +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.mxbean; - -import java.lang.annotation.*; - -/** - * Provides MBean method parameters names. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD}) -public @interface IgniteMXBeanParametersNames { - /** - * - * Array of parameter names in MBean. - */ - @SuppressWarnings({"JavaDoc"}) public String[] value(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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 deleted file mode 100644 index 29fa2cf..0000000 --- a/modules/core/src/main/java/org/apache/ignite/mxbean/IgniteThreadPoolMXBean.java +++ /dev/null @@ -1,152 +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.mxbean; - -/** - * MBean that provides access to information about executor service. - */ -@IgniteMXBeanDescription("MBean that provides access to information about executor service.") -public interface IgniteThreadPoolMXBean { - /** - * Returns the approximate number of threads that are actively executing tasks. - * - * @return The number of threads. - */ - @IgniteMXBeanDescription("Approximate number of threads that are actively executing tasks.") - public int getActiveCount(); - - /** - * Returns the approximate total number of tasks that have completed execution. - * Because the states of tasks and threads may change dynamically during - * computation, the returned value is only an approximation, but one that - * does not ever decrease across successive calls. - * - * @return The number of tasks. - */ - @IgniteMXBeanDescription("Approximate total number of tasks that have completed execution.") - public long getCompletedTaskCount(); - - /** - * Returns the core number of threads. - * - * @return The core number of threads. - */ - @IgniteMXBeanDescription("The core number of threads.") - public int getCorePoolSize(); - - /** - * Returns the largest number of threads that have ever - * simultaneously been in the pool. - * - * @return The number of threads. - */ - @IgniteMXBeanDescription("Largest number of threads that have ever simultaneously been in the pool.") - public int getLargestPoolSize(); - - /** - * Returns the maximum allowed number of threads. - * - * @return The maximum allowed number of threads. - */ - @IgniteMXBeanDescription("The maximum allowed number of threads.") - public int getMaximumPoolSize(); - - /** - * Returns the current number of threads in the pool. - * - * @return The number of threads. - */ - @IgniteMXBeanDescription("Current number of threads in the pool.") - public int getPoolSize(); - - /** - * Returns the approximate total number of tasks that have been scheduled - * for execution. Because the states of tasks and threads may change dynamically - * during computation, the returned value is only an approximation, but - * one that does not ever decrease across successive calls. - * - * @return The number of tasks. - */ - @IgniteMXBeanDescription("Approximate total number of tasks that have been scheduled for execution.") - public long getTaskCount(); - - /** - * Gets current size of the execution queue. This queue buffers local - * executions when there are not threads available for processing in the pool. - * - * @return Current size of the execution queue. - */ - @IgniteMXBeanDescription("Current size of the execution queue.") - public int getQueueSize(); - - /** - * Returns the thread keep-alive time, which is the amount of time which threads - * in excess of the core pool size may remain idle before being terminated. - * - * @return Keep alive time. - */ - @IgniteMXBeanDescription("Thread keep-alive time, which is the amount of time which threads in excess of " + - "the core pool size may remain idle before being terminated.") - public long getKeepAliveTime(); - - /** - * Returns {@code true} if this executor has been shut down. - * - * @return {@code True} if this executor has been shut down. - */ - @IgniteMXBeanDescription("True if this executor has been shut down.") - public boolean isShutdown(); - - /** - * Returns {@code true} if all tasks have completed following shut down. Note that - * {@code isTerminated()} is never {@code true} unless either {@code shutdown()} or - * {@code shutdownNow()} was called first. - * - * @return {@code True} if all tasks have completed following shut down. - */ - @IgniteMXBeanDescription("True if all tasks have completed following shut down.") - public boolean isTerminated(); - - /** - * Returns {@code true} if this executor is in the process of terminating after - * {@code shutdown()} or {@code shutdownNow()} but has not completely terminated. - * This method may be useful for debugging. A return of {@code true} reported a - * sufficient period after shutdown may indicate that submitted tasks have ignored - * or suppressed interruption, causing this executor not to properly terminate. - * - * @return {@code True} if terminating but not yet terminated. - */ - @IgniteMXBeanDescription("True if terminating but not yet terminated.") - public boolean isTerminating(); - - /** - * Returns the class name of current rejection handler. - * - * @return Class name of current rejection handler. - */ - @IgniteMXBeanDescription("Class name of current rejection handler.") - public String getRejectedExecutionHandlerClass(); - - /** - * Returns the class name of thread factory used to create new threads. - * - * @return Class name of thread factory used to create new threads. - */ - @IgniteMXBeanDescription("Class name of thread factory used to create new threads.") - public String getThreadFactoryClass(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b1dfb3/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..106c38b 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.") +@MXBeanDescription("MBean that provides access to grid life-cycle operations.") public interface IgnitionMXBean { /** * Gets state of default grid instance. @@ -28,7 +28,7 @@ public interface IgnitionMXBean { * @return State of default grid instance. * @see org.apache.ignite.Ignition#state() */ - @IgniteMXBeanDescription("State of default grid instance.") + @MXBeanDescription("State of default grid instance.") public String getState(); /** @@ -38,11 +38,11 @@ public interface IgnitionMXBean { * @return State of grid instance with given name. * @see org.apache.ignite.Ignition#state(String) */ - @IgniteMXBeanDescription("Gets state for a given grid instance. Returns state of grid instance with given name.") - @IgniteMXBeanParametersNames( + @MXBeanDescription("Gets state for a given grid instance. Returns state of grid instance with given name.") + @MXBeanParametersNames( "name" ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( "Name of grid instance." ) public String getState(String name); @@ -58,12 +58,12 @@ public interface IgnitionMXBean { * {@code false} otherwise (if it was not started). * @see org.apache.ignite.Ignition#stop(boolean) */ - @IgniteMXBeanDescription("Stops default grid instance. Return true if default grid instance was " + + @MXBeanDescription("Stops default grid instance. Return true if default grid instance was " + "indeed stopped, false otherwise (if it was not started).") - @IgniteMXBeanParametersNames( + @MXBeanParametersNames( "cancel" ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( "If true then all jobs currently executing on default grid will be cancelled." ) public boolean stop(boolean cancel); @@ -87,14 +87,14 @@ public interface IgnitionMXBean { * not found). * @see org.apache.ignite.Ignition#stop(String, boolean) */ - @IgniteMXBeanDescription("Stops grid by name. Cancels running jobs if cancel is true. Returns true if named " + + @MXBeanDescription("Stops grid by name. Cancels running jobs if cancel is true. Returns true if named " + "grid instance was indeed found and stopped, false otherwise.") - @IgniteMXBeanParametersNames( + @MXBeanParametersNames( { "name", "cancel" }) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( { "Grid instance name to stop.", "Whether or not running jobs should be cancelled." @@ -117,11 +117,11 @@ public interface IgnitionMXBean { * up to the actual job to exit from execution * @see org.apache.ignite.Ignition#stopAll(boolean) */ - @IgniteMXBeanDescription("Stops all started grids.") - @IgniteMXBeanParametersNames( + @MXBeanDescription("Stops all started grids.") + @MXBeanParametersNames( "cancel" ) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( "If true then all jobs currently executing on all grids will be cancelled." ) public void stopAll(boolean cancel); @@ -135,13 +135,13 @@ public interface IgnitionMXBean { * up to the actual job to exit from execution * @see org.apache.ignite.Ignition#stopAll(boolean) */ - @IgniteMXBeanDescription("Restart JVM.") - @IgniteMXBeanParametersNames( + @MXBeanDescription("Restart JVM.") + @MXBeanParametersNames( { "cancel", "wait" }) - @IgniteMXBeanParametersDescriptions( + @MXBeanParametersDescriptions( { "If true then all jobs currently executing on default grid will be cancelled.", "If true then method will wait for all task being executed until they finish their execution."
