http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java deleted file mode 100644 index d7af479..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java +++ /dev/null @@ -1,282 +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.communication.tcp; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * MBean provide access to TCP-based communication SPI. - */ -@IgniteMXBeanDescription("MBean provide access to TCP-based communication SPI.") -public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean { - /** - * Gets local host address for socket binding. - * Beside loopback address physical node could have - * several other ones, but only one is assigned to grid node. - * - * @return Grid node IP address. - */ - @IgniteMXBeanDescription("Grid node IP address.") - public String getLocalAddress(); - - /** - * Gets local port for socket binding. - * - * @return Port number. - */ - @IgniteMXBeanDescription("Port number.") - public int getLocalPort(); - - /** - * Gets local port for shared memory communication. - * - * @return Port number. - */ - @IgniteMXBeanDescription("Shared memory endpoint port number.") - public int getSharedMemoryPort(); - - /** - * Gets maximum number of local ports tried if all previously - * tried ports are occupied. - * - * @return Local port range. - */ - @IgniteMXBeanDescription("Local port range.") - public int getLocalPortRange(); - - /** - * Gets maximum idle connection time upon which idle connections - * will be closed. - * - * @return Maximum idle connection time. - */ - @IgniteMXBeanDescription("Maximum idle connection time.") - public long getIdleConnectionTimeout(); - - /** - * Gets flag that indicates whether direct or heap allocated buffer is used. - * - * @return Flag that indicates whether direct or heap allocated buffer is used. - */ - @IgniteMXBeanDescription("Flag that indicates whether direct or heap allocated buffer is used.") - public boolean isDirectBuffer(); - - /** - * Gets count of selectors used in TCP server. Default value equals to the - * number of CPUs available in the system. - * - * @return Count of selectors in TCP server. - */ - @IgniteMXBeanDescription("Count of selectors used in TCP server.") - public int getSelectorsCount(); - - /** - * Gets sent messages count. - * - * @return Sent messages count. - */ - @IgniteMXBeanDescription("Sent messages count.") - public int getSentMessagesCount(); - - /** - * Gets sent bytes count. - * - * @return Sent bytes count. - */ - @IgniteMXBeanDescription("Sent bytes count.") - public long getSentBytesCount(); - - /** - * Gets received messages count. - * - * @return Received messages count. - */ - @IgniteMXBeanDescription("Received messages count.") - public int getReceivedMessagesCount(); - - /** - * Gets received bytes count. - * - * @return Received bytes count. - */ - @IgniteMXBeanDescription("Received bytes count.") - public long getReceivedBytesCount(); - - /** - * Gets outbound messages queue size. - * - * @return Outbound messages queue size. - */ - @IgniteMXBeanDescription("Outbound messages queue size.") - public int getOutboundMessagesQueueSize(); - - /** - * Gets connect timeout used when establishing connection - * with remote nodes. - * - * @return Connect timeout. - */ - @IgniteMXBeanDescription("Connect timeout.") - public long getConnectTimeout(); - - /** - * Gets maximum connect timeout. - * - * @return Maximum connect timeout. - */ - @IgniteMXBeanDescription("Maximum connect timeout.") - public long getMaxConnectTimeout(); - - /** - * Gets maximum number of reconnect attempts used when establishing connection - * with remote nodes. - * - * @return Reconnects count. - */ - @IgniteMXBeanDescription("Reconnect count on connection failure.") - public int getReconnectCount(); - - /** - * Gets value for {@code TCP_NODELAY} socket option. - * - * @return {@code True} if TCP delay is disabled. - */ - @IgniteMXBeanDescription("TCP_NODELAY socket option value.") - public boolean isTcpNoDelay(); - - /** - * Gets connection buffer flush frequency. - * <p> - * Client connections to other nodes in topology use buffered output. - * This frequency defines how often system will advice to flush - * connection buffer. - * - * @return Flush frequency. - */ - @IgniteMXBeanDescription("Connection buffer flush frequency.") - public long getConnectionBufferFlushFrequency(); - - /** - * Sets connection buffer flush frequency. - * <p> - * Client connections to other nodes in topology use buffered output. - * This frequency defines how often system will advice to flush - * connection buffer. - * <p> - * If not provided, default value is {@link TcpCommunicationSpi#DFLT_CONN_BUF_FLUSH_FREQ}. - * <p> - * This property is used only if {@link #getConnectionBufferSize()} is greater than {@code 0}. - * - * @param connBufFlushFreq Flush frequency. - * @see #getConnectionBufferSize() - */ - @IgniteMXBeanDescription("Sets connection buffer flush frequency.") - public void setConnectionBufferFlushFrequency(long connBufFlushFreq); - - /** - * Gets connection buffer size. - * <p> - * If set to {@code 0} connection buffer is disabled. - * - * @return Connection buffer size. - */ - @IgniteMXBeanDescription("Connection buffer size.") - public int getConnectionBufferSize(); - - /** - * Gets flag defining whether direct send buffer should be used. - * - * @return {@code True} if direct buffers should be used. - */ - @IgniteMXBeanDescription("Direct send buffer.") - public boolean isDirectSendBuffer(); - - /** - * Gets receive buffer size for sockets created or accepted by this SPI. - * <p> - * If not provided, default is {@link TcpCommunicationSpi#DFLT_SOCK_BUF_SIZE}. - * - * @return Socket receive buffer size. - */ - @IgniteMXBeanDescription("Socket receive buffer.") - public int getSocketReceiveBuffer(); - - /** - * Gets send buffer size for sockets created or accepted by this SPI. - * <p> - * If not provided, default is {@link TcpCommunicationSpi#DFLT_SOCK_BUF_SIZE}. - * - * @return Socket send buffer size. - */ - @IgniteMXBeanDescription("Socket send buffer.") - public int getSocketSendBuffer(); - - /** - * Gets message queue limit for incoming and outgoing messages. - * - * @return Send queue size limit. - */ - @IgniteMXBeanDescription("Message queue size limit.") - public int getMessageQueueLimit(); - - /** - * Gets the minimum number of messages for this SPI, that are buffered - * prior to sending. - * - * @return Minimum buffered message count. - */ - @IgniteMXBeanDescription("Minimum buffered message count.") - public int getMinimumBufferedMessageCount(); - - /** - * Gets the buffer size ratio for this SPI. As messages are sent, - * the buffer size is adjusted using this ratio. - * - * @return Buffer size ratio. - */ - @IgniteMXBeanDescription("Buffer size ratio.") - public double getBufferSizeRatio(); - - /** - * Gets socket write timeout for TCP connections. If message can not be written to - * socket within this time then connection is closed and reconnect is attempted. - * - * @return Socket write timeout for TCP connections. - */ - @IgniteMXBeanDescription("Socket write timeout.") - public long getSocketWriteTimeout(); - - /** - * Gets number of received messages per connection to node after which acknowledgment message is sent. - * - * @return Number of received messages after which acknowledgment is sent. - */ - @IgniteMXBeanDescription("Number of received messages after which acknowledgment is sent.") - public int getAckSendThreshold(); - - /** - * Gets maximum number of stored unacknowledged messages per connection to node. - * If number of unacknowledged messages exceeds this number then connection to node is - * closed and reconnect is attempted. - * - * @return Maximum number of unacknowledged messages. - */ - @IgniteMXBeanDescription("Maximum number of unacknowledged messages.") - public int getUnacknowledgedMessagesBufferSize(); -}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMXBean.java new file mode 100644 index 0000000..0449370 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMXBean.java @@ -0,0 +1,282 @@ +/* + * 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.communication.tcp; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +/** + * MBean provide access to TCP-based communication SPI. + */ +@IgniteMXBeanDescription("MXBean provide access to TCP-based communication SPI.") +public interface TcpCommunicationSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets local host address for socket binding. + * Beside loopback address physical node could have + * several other ones, but only one is assigned to grid node. + * + * @return Grid node IP address. + */ + @IgniteMXBeanDescription("Grid node IP address.") + public String getLocalAddress(); + + /** + * Gets local port for socket binding. + * + * @return Port number. + */ + @IgniteMXBeanDescription("Port number.") + public int getLocalPort(); + + /** + * Gets local port for shared memory communication. + * + * @return Port number. + */ + @IgniteMXBeanDescription("Shared memory endpoint port number.") + public int getSharedMemoryPort(); + + /** + * Gets maximum number of local ports tried if all previously + * tried ports are occupied. + * + * @return Local port range. + */ + @IgniteMXBeanDescription("Local port range.") + public int getLocalPortRange(); + + /** + * Gets maximum idle connection time upon which idle connections + * will be closed. + * + * @return Maximum idle connection time. + */ + @IgniteMXBeanDescription("Maximum idle connection time.") + public long getIdleConnectionTimeout(); + + /** + * Gets flag that indicates whether direct or heap allocated buffer is used. + * + * @return Flag that indicates whether direct or heap allocated buffer is used. + */ + @IgniteMXBeanDescription("Flag that indicates whether direct or heap allocated buffer is used.") + public boolean isDirectBuffer(); + + /** + * Gets count of selectors used in TCP server. Default value equals to the + * number of CPUs available in the system. + * + * @return Count of selectors in TCP server. + */ + @IgniteMXBeanDescription("Count of selectors used in TCP server.") + public int getSelectorsCount(); + + /** + * Gets sent messages count. + * + * @return Sent messages count. + */ + @IgniteMXBeanDescription("Sent messages count.") + public int getSentMessagesCount(); + + /** + * Gets sent bytes count. + * + * @return Sent bytes count. + */ + @IgniteMXBeanDescription("Sent bytes count.") + public long getSentBytesCount(); + + /** + * Gets received messages count. + * + * @return Received messages count. + */ + @IgniteMXBeanDescription("Received messages count.") + public int getReceivedMessagesCount(); + + /** + * Gets received bytes count. + * + * @return Received bytes count. + */ + @IgniteMXBeanDescription("Received bytes count.") + public long getReceivedBytesCount(); + + /** + * Gets outbound messages queue size. + * + * @return Outbound messages queue size. + */ + @IgniteMXBeanDescription("Outbound messages queue size.") + public int getOutboundMessagesQueueSize(); + + /** + * Gets connect timeout used when establishing connection + * with remote nodes. + * + * @return Connect timeout. + */ + @IgniteMXBeanDescription("Connect timeout.") + public long getConnectTimeout(); + + /** + * Gets maximum connect timeout. + * + * @return Maximum connect timeout. + */ + @IgniteMXBeanDescription("Maximum connect timeout.") + public long getMaxConnectTimeout(); + + /** + * Gets maximum number of reconnect attempts used when establishing connection + * with remote nodes. + * + * @return Reconnects count. + */ + @IgniteMXBeanDescription("Reconnect count on connection failure.") + public int getReconnectCount(); + + /** + * Gets value for {@code TCP_NODELAY} socket option. + * + * @return {@code True} if TCP delay is disabled. + */ + @IgniteMXBeanDescription("TCP_NODELAY socket option value.") + public boolean isTcpNoDelay(); + + /** + * Gets connection buffer flush frequency. + * <p> + * Client connections to other nodes in topology use buffered output. + * This frequency defines how often system will advice to flush + * connection buffer. + * + * @return Flush frequency. + */ + @IgniteMXBeanDescription("Connection buffer flush frequency.") + public long getConnectionBufferFlushFrequency(); + + /** + * Sets connection buffer flush frequency. + * <p> + * Client connections to other nodes in topology use buffered output. + * This frequency defines how often system will advice to flush + * connection buffer. + * <p> + * If not provided, default value is {@link TcpCommunicationSpi#DFLT_CONN_BUF_FLUSH_FREQ}. + * <p> + * This property is used only if {@link #getConnectionBufferSize()} is greater than {@code 0}. + * + * @param connBufFlushFreq Flush frequency. + * @see #getConnectionBufferSize() + */ + @IgniteMXBeanDescription("Sets connection buffer flush frequency.") + public void setConnectionBufferFlushFrequency(long connBufFlushFreq); + + /** + * Gets connection buffer size. + * <p> + * If set to {@code 0} connection buffer is disabled. + * + * @return Connection buffer size. + */ + @IgniteMXBeanDescription("Connection buffer size.") + public int getConnectionBufferSize(); + + /** + * Gets flag defining whether direct send buffer should be used. + * + * @return {@code True} if direct buffers should be used. + */ + @IgniteMXBeanDescription("Direct send buffer.") + public boolean isDirectSendBuffer(); + + /** + * Gets receive buffer size for sockets created or accepted by this SPI. + * <p> + * If not provided, default is {@link TcpCommunicationSpi#DFLT_SOCK_BUF_SIZE}. + * + * @return Socket receive buffer size. + */ + @IgniteMXBeanDescription("Socket receive buffer.") + public int getSocketReceiveBuffer(); + + /** + * Gets send buffer size for sockets created or accepted by this SPI. + * <p> + * If not provided, default is {@link TcpCommunicationSpi#DFLT_SOCK_BUF_SIZE}. + * + * @return Socket send buffer size. + */ + @IgniteMXBeanDescription("Socket send buffer.") + public int getSocketSendBuffer(); + + /** + * Gets message queue limit for incoming and outgoing messages. + * + * @return Send queue size limit. + */ + @IgniteMXBeanDescription("Message queue size limit.") + public int getMessageQueueLimit(); + + /** + * Gets the minimum number of messages for this SPI, that are buffered + * prior to sending. + * + * @return Minimum buffered message count. + */ + @IgniteMXBeanDescription("Minimum buffered message count.") + public int getMinimumBufferedMessageCount(); + + /** + * Gets the buffer size ratio for this SPI. As messages are sent, + * the buffer size is adjusted using this ratio. + * + * @return Buffer size ratio. + */ + @IgniteMXBeanDescription("Buffer size ratio.") + public double getBufferSizeRatio(); + + /** + * Gets socket write timeout for TCP connections. If message can not be written to + * socket within this time then connection is closed and reconnect is attempted. + * + * @return Socket write timeout for TCP connections. + */ + @IgniteMXBeanDescription("Socket write timeout.") + public long getSocketWriteTimeout(); + + /** + * Gets number of received messages per connection to node after which acknowledgment message is sent. + * + * @return Number of received messages after which acknowledgment is sent. + */ + @IgniteMXBeanDescription("Number of received messages after which acknowledgment is sent.") + public int getAckSendThreshold(); + + /** + * Gets maximum number of stored unacknowledged messages per connection to node. + * If number of unacknowledged messages exceeds this number then connection to node is + * closed and reconnect is attempted. + * + * @return Maximum number of unacknowledged messages. + */ + @IgniteMXBeanDescription("Maximum number of unacknowledged messages.") + public int getUnacknowledgedMessagesBufferSize(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java index 89f7cbc..7895f7c 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java @@ -54,7 +54,7 @@ import java.util.concurrent.*; @IgniteSpiMultipleInstancesSupport(true) @IgniteSpiConsistencyChecked(optional = false) @IgnoreIfPeerClassLoadingDisabled -public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi, LocalDeploymentSpiMBean { +public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi, LocalDeploymentSpiMXBean { /** */ @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"}) @IgniteLoggerResource @@ -72,7 +72,7 @@ public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSp // Start SPI start stopwatch. startStopwatch(); - registerMBean(gridName, this, LocalDeploymentSpiMBean.class); + registerMXBean(gridName, this, LocalDeploymentSpiMXBean.class); if (log.isDebugEnabled()) log.debug(startInfo()); @@ -80,7 +80,7 @@ public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSp /** {@inheritDoc} */ @Override public void spiStop() throws IgniteSpiException { - unregisterMBean(); + unregisterMXBean(); for (ClassLoader ldr : ldrRsrcs.descendingKeySet()) onClassLoaderReleased(ldr); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMBean.java deleted file mode 100644 index faf00e3..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMBean.java +++ /dev/null @@ -1,29 +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.deployment.local; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management MBean for {@link LocalDeploymentSpi} SPI. - */ -@IgniteMXBeanDescription("MBean that provides access to local deployment SPI configuration.") -public interface LocalDeploymentSpiMBean extends IgniteSpiManagementMBean { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMXBean.java new file mode 100644 index 0000000..cd186b0 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpiMXBean.java @@ -0,0 +1,29 @@ +/* + * 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.deployment.local; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +/** + * Management MXBean for {@link LocalDeploymentSpi} SPI. + */ +@IgniteMXBeanDescription("MXBean that provides access to local deployment SPI configuration.") +public interface LocalDeploymentSpiMXBean extends IgniteSpiManagementMXBean { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java index 5fc0dd8..31ee607 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java @@ -54,7 +54,7 @@ import static org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryHeartbeat @IgniteSpiMultipleInstancesSupport(true) @DiscoverySpiOrderSupport(true) @DiscoverySpiHistorySupport(true) -public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpClientDiscoverySpiMBean { +public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpClientDiscoverySpiMXBean { /** Default disconnect check interval. */ public static final long DFLT_DISCONNECT_CHECK_INT = 2000; @@ -227,7 +227,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp if (hbFreq < 2000) U.warn(log, "Heartbeat frequency is too high (at least 2000 ms recommended): " + hbFreq); - registerMBean(gridName, this, TcpClientDiscoverySpiMBean.class); + registerMXBean(gridName, this, TcpClientDiscoverySpiMXBean.class); try { locHost = U.resolveLocalHost(locAddr); @@ -320,7 +320,7 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements Tcp U.interrupt(sockTimeoutWorker); U.join(sockTimeoutWorker, log); - unregisterMBean(); + unregisterMXBean(); if (log.isDebugEnabled()) log.debug(stopInfo()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMBean.java deleted file mode 100644 index f9c00d9..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMBean.java +++ /dev/null @@ -1,164 +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.discovery.tcp; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -import java.util.*; - -/** - * Management bean for {@link TcpClientDiscoverySpi}. - */ -public interface TcpClientDiscoverySpiMBean extends IgniteSpiManagementMBean { - /** - * Gets disconnect check interval. - * - * @return Disconnect check interval. - */ - @IgniteMXBeanDescription("Disconnect check interval.") - public long getDisconnectCheckInterval(); - - /** - * Gets socket timeout. - * - * @return Socket timeout. - */ - @IgniteMXBeanDescription("Socket timeout.") - public long getSocketTimeout(); - - /** - * Gets message acknowledgement timeout. - * - * @return Message acknowledgement timeout. - */ - @IgniteMXBeanDescription("Message acknowledgement timeout.") - public long getAckTimeout(); - - /** - * Gets network timeout. - * - * @return Network timeout. - */ - @IgniteMXBeanDescription("Network timeout.") - public long getNetworkTimeout(); - - /** - * Gets thread priority. All threads within SPI will be started with it. - * - * @return Thread priority. - */ - @IgniteMXBeanDescription("Threads priority.") - public int getThreadPriority(); - - /** - * Gets delay between heartbeat messages sent by coordinator. - * - * @return Time period in milliseconds. - */ - @IgniteMXBeanDescription("Heartbeat frequency.") - public long getHeartbeatFrequency(); - - /** - * Gets {@link org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder} (string representation). - * - * @return IPFinder (string representation). - */ - @IgniteMXBeanDescription("IP Finder.") - public String getIpFinderFormatted(); - - /** - * Gets message worker queue current size. - * - * @return Message worker queue current size. - */ - @IgniteMXBeanDescription("Message worker queue current size.") - public int getMessageWorkerQueueSize(); - - /** - * Gets joined nodes count. - * - * @return Nodes joined count. - */ - @IgniteMXBeanDescription("Nodes joined count.") - public long getNodesJoined(); - - /** - * Gets left nodes count. - * - * @return Left nodes count. - */ - @IgniteMXBeanDescription("Nodes left count.") - public long getNodesLeft(); - - /** - * Gets failed nodes count. - * - * @return Failed nodes count. - */ - @IgniteMXBeanDescription("Nodes failed count.") - public long getNodesFailed(); - - /** - * Gets avg message processing time. - * - * @return Avg message processing time. - */ - @IgniteMXBeanDescription("Avg message processing time.") - public long getAvgMessageProcessingTime(); - - /** - * Gets max message processing time. - * - * @return Max message processing time. - */ - @IgniteMXBeanDescription("Max message processing time.") - public long getMaxMessageProcessingTime(); - - /** - * Gets total received messages count. - * - * @return Total received messages count. - */ - @IgniteMXBeanDescription("Total received messages count.") - public int getTotalReceivedMessages(); - - /** - * Gets received messages counts (grouped by type). - * - * @return Map containing message types and respective counts. - */ - @IgniteMXBeanDescription("Received messages by type.") - public Map<String, Integer> getReceivedMessages(); - - /** - * Gets total processed messages count. - * - * @return Total processed messages count. - */ - @IgniteMXBeanDescription("Total processed messages count.") - public int getTotalProcessedMessages(); - - /** - * Gets processed messages counts (grouped by type). - * - * @return Map containing message types and respective counts. - */ - @IgniteMXBeanDescription("Received messages by type.") - public Map<String, Integer> getProcessedMessages(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMXBean.java new file mode 100644 index 0000000..2fe2525 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMXBean.java @@ -0,0 +1,164 @@ +/* + * 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.discovery.tcp; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +import java.util.*; + +/** + * Management bean for {@link TcpClientDiscoverySpi}. + */ +public interface TcpClientDiscoverySpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets disconnect check interval. + * + * @return Disconnect check interval. + */ + @IgniteMXBeanDescription("Disconnect check interval.") + public long getDisconnectCheckInterval(); + + /** + * Gets socket timeout. + * + * @return Socket timeout. + */ + @IgniteMXBeanDescription("Socket timeout.") + public long getSocketTimeout(); + + /** + * Gets message acknowledgement timeout. + * + * @return Message acknowledgement timeout. + */ + @IgniteMXBeanDescription("Message acknowledgement timeout.") + public long getAckTimeout(); + + /** + * Gets network timeout. + * + * @return Network timeout. + */ + @IgniteMXBeanDescription("Network timeout.") + public long getNetworkTimeout(); + + /** + * Gets thread priority. All threads within SPI will be started with it. + * + * @return Thread priority. + */ + @IgniteMXBeanDescription("Threads priority.") + public int getThreadPriority(); + + /** + * Gets delay between heartbeat messages sent by coordinator. + * + * @return Time period in milliseconds. + */ + @IgniteMXBeanDescription("Heartbeat frequency.") + public long getHeartbeatFrequency(); + + /** + * Gets {@link org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder} (string representation). + * + * @return IPFinder (string representation). + */ + @IgniteMXBeanDescription("IP Finder.") + public String getIpFinderFormatted(); + + /** + * Gets message worker queue current size. + * + * @return Message worker queue current size. + */ + @IgniteMXBeanDescription("Message worker queue current size.") + public int getMessageWorkerQueueSize(); + + /** + * Gets joined nodes count. + * + * @return Nodes joined count. + */ + @IgniteMXBeanDescription("Nodes joined count.") + public long getNodesJoined(); + + /** + * Gets left nodes count. + * + * @return Left nodes count. + */ + @IgniteMXBeanDescription("Nodes left count.") + public long getNodesLeft(); + + /** + * Gets failed nodes count. + * + * @return Failed nodes count. + */ + @IgniteMXBeanDescription("Nodes failed count.") + public long getNodesFailed(); + + /** + * Gets avg message processing time. + * + * @return Avg message processing time. + */ + @IgniteMXBeanDescription("Avg message processing time.") + public long getAvgMessageProcessingTime(); + + /** + * Gets max message processing time. + * + * @return Max message processing time. + */ + @IgniteMXBeanDescription("Max message processing time.") + public long getMaxMessageProcessingTime(); + + /** + * Gets total received messages count. + * + * @return Total received messages count. + */ + @IgniteMXBeanDescription("Total received messages count.") + public int getTotalReceivedMessages(); + + /** + * Gets received messages counts (grouped by type). + * + * @return Map containing message types and respective counts. + */ + @IgniteMXBeanDescription("Received messages by type.") + public Map<String, Integer> getReceivedMessages(); + + /** + * Gets total processed messages count. + * + * @return Total processed messages count. + */ + @IgniteMXBeanDescription("Total processed messages count.") + public int getTotalProcessedMessages(); + + /** + * Gets processed messages counts (grouped by type). + * + * @return Map containing message types and respective counts. + */ + @IgniteMXBeanDescription("Received messages by type.") + public Map<String, Integer> getProcessedMessages(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java index 9568472..ecf209b 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java @@ -141,7 +141,7 @@ import static org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusChe @IgniteSpiMultipleInstancesSupport(true) @DiscoverySpiOrderSupport(true) @DiscoverySpiHistorySupport(true) -public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscoverySpiMBean { +public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscoverySpiMXBean { /** Default local port range (value is <tt>100</tt>). */ public static final int DFLT_PORT_RANGE = 100; @@ -860,7 +860,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov if (hbFreq < 2000) U.warn(log, "Heartbeat frequency is too high (at least 2000 ms recommended): " + hbFreq); - registerMBean(ignite.name(), this, TcpDiscoverySpiMBean.class); + registerMXBean(ignite.name(), this, TcpDiscoverySpiMXBean.class); if (ipFinder instanceof TcpDiscoveryMulticastIpFinder) { TcpDiscoveryMulticastIpFinder mcastIpFinder = ((TcpDiscoveryMulticastIpFinder)ipFinder); @@ -999,7 +999,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov if (!disconnect) { // This is final stop. - unregisterMBean(); + unregisterMXBean(); if (log.isDebugEnabled()) log.debug(stopInfo()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java deleted file mode 100644 index 7b2fa84..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java +++ /dev/null @@ -1,275 +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.discovery.tcp; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; -import org.jetbrains.annotations.*; - -import java.util.*; - -/** - * Management bean for {@link TcpDiscoverySpi}. - */ -public interface TcpDiscoverySpiMBean extends IgniteSpiManagementMBean { - /** - * Gets delay between heartbeat messages sent by coordinator. - * - * @return Time period in milliseconds. - */ - @IgniteMXBeanDescription("Heartbeat frequency.") - public long getHeartbeatFrequency(); - - /** - * Gets current SPI state. - * - * @return Current SPI state. - */ - @IgniteMXBeanDescription("SPI state.") - public String getSpiState(); - - /** - * Gets {@link org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder} (string representation). - * - * @return IPFinder (string representation). - */ - @IgniteMXBeanDescription("IP Finder.") - public String getIpFinderFormatted(); - - /** - * Gets number of connection attempts. - * - * @return Number of connection attempts. - */ - @IgniteMXBeanDescription("Reconnect count.") - public int getReconnectCount(); - - /** - * Gets network timeout. - * - * @return Network timeout. - */ - @IgniteMXBeanDescription("Network timeout.") - public long getNetworkTimeout(); - - /** - * Gets local TCP port SPI listens to. - * - * @return Local port range. - */ - @IgniteMXBeanDescription("Local TCP port.") - public int getLocalPort(); - - /** - * Gets local TCP port range. - * - * @return Local port range. - */ - @IgniteMXBeanDescription("Local TCP port range.") - public int getLocalPortRange(); - - /** - * Gets max heartbeats count node can miss without initiating status check. - * - * @return Max missed heartbeats. - */ - @IgniteMXBeanDescription("Max missed heartbeats.") - public int getMaxMissedHeartbeats(); - - /** - * Gets max heartbeats count node can miss without failing client node. - * - * @return Max missed client heartbeats. - */ - @IgniteMXBeanDescription("Max missed client heartbeats.") - public int getMaxMissedClientHeartbeats(); - - /** - * Gets thread priority. All threads within SPI will be started with it. - * - * @return Thread priority. - */ - @IgniteMXBeanDescription("Threads priority.") - public int getThreadPriority(); - - /** - * Gets IP finder clean frequency. - * - * @return IP finder clean frequency. - */ - @IgniteMXBeanDescription("IP finder clean frequency.") - public long getIpFinderCleanFrequency(); - - /** - * Gets statistics print frequency. - * - * @return Statistics print frequency in milliseconds. - */ - @IgniteMXBeanDescription("Statistics print frequency.") - public long getStatisticsPrintFrequency(); - - /** - * Gets message worker queue current size. - * - * @return Message worker queue current size. - */ - @IgniteMXBeanDescription("Message worker queue current size.") - public int getMessageWorkerQueueSize(); - - /** - * Gets joined nodes count. - * - * @return Nodes joined count. - */ - @IgniteMXBeanDescription("Nodes joined count.") - public long getNodesJoined(); - - /** - * Gets left nodes count. - * - * @return Left nodes count. - */ - @IgniteMXBeanDescription("Nodes left count.") - public long getNodesLeft(); - - /** - * Gets failed nodes count. - * - * @return Failed nodes count. - */ - @IgniteMXBeanDescription("Nodes failed count.") - public long getNodesFailed(); - - /** - * Gets pending messages registered count. - * - * @return Pending messages registered count. - */ - @IgniteMXBeanDescription("Pending messages registered.") - public long getPendingMessagesRegistered(); - - /** - * Gets pending messages discarded count. - * - * @return Pending messages registered count. - */ - @IgniteMXBeanDescription("Pending messages discarded.") - public long getPendingMessagesDiscarded(); - - /** - * Gets avg message processing time. - * - * @return Avg message processing time. - */ - @IgniteMXBeanDescription("Avg message processing time.") - public long getAvgMessageProcessingTime(); - - /** - * Gets max message processing time. - * - * @return Max message processing time. - */ - @IgniteMXBeanDescription("Max message processing time.") - public long getMaxMessageProcessingTime(); - - /** - * Gets total received messages count. - * - * @return Total received messages count. - */ - @IgniteMXBeanDescription("Total received messages count.") - public int getTotalReceivedMessages(); - - /** - * Gets received messages counts (grouped by type). - * - * @return Map containing message types and respective counts. - */ - @IgniteMXBeanDescription("Received messages by type.") - public Map<String, Integer> getReceivedMessages(); - - /** - * Gets total processed messages count. - * - * @return Total processed messages count. - */ - @IgniteMXBeanDescription("Total processed messages count.") - public int getTotalProcessedMessages(); - - /** - * Gets processed messages counts (grouped by type). - * - * @return Map containing message types and respective counts. - */ - @IgniteMXBeanDescription("Received messages by type.") - public Map<String, Integer> getProcessedMessages(); - - /** - * Gets time local node has been coordinator since. - * - * @return Time local node is coordinator since. - */ - @IgniteMXBeanDescription("Local node is coordinator since.") - public long getCoordinatorSinceTimestamp(); - - /** - * Gets current coordinator. - * - * @return Gets current coordinator. - */ - @IgniteMXBeanDescription("Coordinator node ID.") - @Nullable public UUID getCoordinator(); - - /** - * Gets message acknowledgement timeout. - * - * @return Message acknowledgement timeout. - */ - @IgniteMXBeanDescription("Message acknowledgement timeout.") - public long getAckTimeout(); - - /** - * Gets maximum message acknowledgement timeout. - * - * @return Maximum message acknowledgement timeout. - */ - @IgniteMXBeanDescription("Maximum message acknowledgement timeout.") - public long getMaxAckTimeout(); - - /** - * Gets socket timeout. - * - * @return Socket timeout. - */ - @IgniteMXBeanDescription("Socket timeout.") - public long getSocketTimeout(); - - /** - * Gets join timeout. - * - * @return Join timeout. - */ - @IgniteMXBeanDescription("Join timeout.") - public long getJoinTimeout(); - - /** - * Dumps debug info using configured logger. - */ - @IgniteMXBeanDescription("Dump debug info.") - public void dumpDebugInfo(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMXBean.java new file mode 100644 index 0000000..946521e --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMXBean.java @@ -0,0 +1,275 @@ +/* + * 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.discovery.tcp; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; +import org.jetbrains.annotations.*; + +import java.util.*; + +/** + * Management bean for {@link TcpDiscoverySpi}. + */ +public interface TcpDiscoverySpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets delay between heartbeat messages sent by coordinator. + * + * @return Time period in milliseconds. + */ + @IgniteMXBeanDescription("Heartbeat frequency.") + public long getHeartbeatFrequency(); + + /** + * Gets current SPI state. + * + * @return Current SPI state. + */ + @IgniteMXBeanDescription("SPI state.") + public String getSpiState(); + + /** + * Gets {@link org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder} (string representation). + * + * @return IPFinder (string representation). + */ + @IgniteMXBeanDescription("IP Finder.") + public String getIpFinderFormatted(); + + /** + * Gets number of connection attempts. + * + * @return Number of connection attempts. + */ + @IgniteMXBeanDescription("Reconnect count.") + public int getReconnectCount(); + + /** + * Gets network timeout. + * + * @return Network timeout. + */ + @IgniteMXBeanDescription("Network timeout.") + public long getNetworkTimeout(); + + /** + * Gets local TCP port SPI listens to. + * + * @return Local port range. + */ + @IgniteMXBeanDescription("Local TCP port.") + public int getLocalPort(); + + /** + * Gets local TCP port range. + * + * @return Local port range. + */ + @IgniteMXBeanDescription("Local TCP port range.") + public int getLocalPortRange(); + + /** + * Gets max heartbeats count node can miss without initiating status check. + * + * @return Max missed heartbeats. + */ + @IgniteMXBeanDescription("Max missed heartbeats.") + public int getMaxMissedHeartbeats(); + + /** + * Gets max heartbeats count node can miss without failing client node. + * + * @return Max missed client heartbeats. + */ + @IgniteMXBeanDescription("Max missed client heartbeats.") + public int getMaxMissedClientHeartbeats(); + + /** + * Gets thread priority. All threads within SPI will be started with it. + * + * @return Thread priority. + */ + @IgniteMXBeanDescription("Threads priority.") + public int getThreadPriority(); + + /** + * Gets IP finder clean frequency. + * + * @return IP finder clean frequency. + */ + @IgniteMXBeanDescription("IP finder clean frequency.") + public long getIpFinderCleanFrequency(); + + /** + * Gets statistics print frequency. + * + * @return Statistics print frequency in milliseconds. + */ + @IgniteMXBeanDescription("Statistics print frequency.") + public long getStatisticsPrintFrequency(); + + /** + * Gets message worker queue current size. + * + * @return Message worker queue current size. + */ + @IgniteMXBeanDescription("Message worker queue current size.") + public int getMessageWorkerQueueSize(); + + /** + * Gets joined nodes count. + * + * @return Nodes joined count. + */ + @IgniteMXBeanDescription("Nodes joined count.") + public long getNodesJoined(); + + /** + * Gets left nodes count. + * + * @return Left nodes count. + */ + @IgniteMXBeanDescription("Nodes left count.") + public long getNodesLeft(); + + /** + * Gets failed nodes count. + * + * @return Failed nodes count. + */ + @IgniteMXBeanDescription("Nodes failed count.") + public long getNodesFailed(); + + /** + * Gets pending messages registered count. + * + * @return Pending messages registered count. + */ + @IgniteMXBeanDescription("Pending messages registered.") + public long getPendingMessagesRegistered(); + + /** + * Gets pending messages discarded count. + * + * @return Pending messages registered count. + */ + @IgniteMXBeanDescription("Pending messages discarded.") + public long getPendingMessagesDiscarded(); + + /** + * Gets avg message processing time. + * + * @return Avg message processing time. + */ + @IgniteMXBeanDescription("Avg message processing time.") + public long getAvgMessageProcessingTime(); + + /** + * Gets max message processing time. + * + * @return Max message processing time. + */ + @IgniteMXBeanDescription("Max message processing time.") + public long getMaxMessageProcessingTime(); + + /** + * Gets total received messages count. + * + * @return Total received messages count. + */ + @IgniteMXBeanDescription("Total received messages count.") + public int getTotalReceivedMessages(); + + /** + * Gets received messages counts (grouped by type). + * + * @return Map containing message types and respective counts. + */ + @IgniteMXBeanDescription("Received messages by type.") + public Map<String, Integer> getReceivedMessages(); + + /** + * Gets total processed messages count. + * + * @return Total processed messages count. + */ + @IgniteMXBeanDescription("Total processed messages count.") + public int getTotalProcessedMessages(); + + /** + * Gets processed messages counts (grouped by type). + * + * @return Map containing message types and respective counts. + */ + @IgniteMXBeanDescription("Received messages by type.") + public Map<String, Integer> getProcessedMessages(); + + /** + * Gets time local node has been coordinator since. + * + * @return Time local node is coordinator since. + */ + @IgniteMXBeanDescription("Local node is coordinator since.") + public long getCoordinatorSinceTimestamp(); + + /** + * Gets current coordinator. + * + * @return Gets current coordinator. + */ + @IgniteMXBeanDescription("Coordinator node ID.") + @Nullable public UUID getCoordinator(); + + /** + * Gets message acknowledgement timeout. + * + * @return Message acknowledgement timeout. + */ + @IgniteMXBeanDescription("Message acknowledgement timeout.") + public long getAckTimeout(); + + /** + * Gets maximum message acknowledgement timeout. + * + * @return Maximum message acknowledgement timeout. + */ + @IgniteMXBeanDescription("Maximum message acknowledgement timeout.") + public long getMaxAckTimeout(); + + /** + * Gets socket timeout. + * + * @return Socket timeout. + */ + @IgniteMXBeanDescription("Socket timeout.") + public long getSocketTimeout(); + + /** + * Gets join timeout. + * + * @return Join timeout. + */ + @IgniteMXBeanDescription("Join timeout.") + public long getJoinTimeout(); + + /** + * Dumps debug info using configured logger. + */ + @IgniteMXBeanDescription("Dump debug info.") + public void dumpDebugInfo(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java index 6a70f5b..7726633 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java @@ -91,7 +91,7 @@ import static org.apache.ignite.events.IgniteEventType.*; */ @IgniteSpiMultipleInstancesSupport(true) public class MemoryEventStorageSpi extends IgniteSpiAdapter implements EventStorageSpi, - MemoryEventStorageSpiMBean { + MemoryEventStorageSpiMXBean { /** Default event time to live value in milliseconds (value is {@link Long#MAX_VALUE}). */ public static final long DFLT_EXPIRE_AGE_MS = Long.MAX_VALUE; @@ -147,7 +147,7 @@ public class MemoryEventStorageSpi extends IgniteSpiAdapter implements EventStor log.debug(configInfo("expireCnt", expireCnt)); } - registerMBean(gridName, this, MemoryEventStorageSpiMBean.class); + registerMXBean(gridName, this, MemoryEventStorageSpiMXBean.class); // Ack ok start. if (log.isDebugEnabled()) @@ -156,7 +156,7 @@ public class MemoryEventStorageSpi extends IgniteSpiAdapter implements EventStor /** {@inheritDoc} */ @Override public void spiStop() throws IgniteSpiException { - unregisterMBean(); + unregisterMXBean(); // Reset events. evts.clear(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMBean.java deleted file mode 100644 index 72e90e9..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMBean.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.spi.eventstorage.memory; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean for {@link MemoryEventStorageSpi}. - * Beside properties defined for every SPI bean this one gives access to: - * <ul> - * <li>Event expiration time (see {@link #getExpireAgeMs()})</li> - * <li>Maximum queue size (see {@link #getExpireCount()})</li> - * <li>Method that removes all items from queue (see {@link #clearAll()})</li> - * </ul> - */ -@IgniteMXBeanDescription("MBean that provides access to memory event storage SPI configuration.") -public interface MemoryEventStorageSpiMBean extends IgniteSpiManagementMBean { - /** - * Gets event time-to-live value. Implementation must guarantee - * that event would not be accessible if its lifetime exceeds this value. - * - * @return Event time-to-live. - */ - @IgniteMXBeanDescription("Event time-to-live value.") - public long getExpireAgeMs(); - - /** - * Gets maximum event queue size. New incoming events will oust - * oldest ones if queue size exceeds this limit. - * - * @return Maximum event queue size. - */ - @IgniteMXBeanDescription("Maximum event queue size.") - public long getExpireCount(); - - /** - * Gets current queue size of the event queue. - * - * @return Current queue size of the event queue. - */ - @IgniteMXBeanDescription("Current event queue size.") - public long getQueueSize(); - - /** - * Removes all events from the event queue. - */ - @IgniteMXBeanDescription("Removes all events from the event queue.") - public void clearAll(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMXBean.java new file mode 100644 index 0000000..bf14670 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpiMXBean.java @@ -0,0 +1,65 @@ +/* + * 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.eventstorage.memory; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +/** + * Management bean for {@link MemoryEventStorageSpi}. + * Beside properties defined for every SPI bean this one gives access to: + * <ul> + * <li>Event expiration time (see {@link #getExpireAgeMs()})</li> + * <li>Maximum queue size (see {@link #getExpireCount()})</li> + * <li>Method that removes all items from queue (see {@link #clearAll()})</li> + * </ul> + */ +@IgniteMXBeanDescription("MXBean that provides access to memory event storage SPI configuration.") +public interface MemoryEventStorageSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets event time-to-live value. Implementation must guarantee + * that event would not be accessible if its lifetime exceeds this value. + * + * @return Event time-to-live. + */ + @IgniteMXBeanDescription("Event time-to-live value.") + public long getExpireAgeMs(); + + /** + * Gets maximum event queue size. New incoming events will oust + * oldest ones if queue size exceeds this limit. + * + * @return Maximum event queue size. + */ + @IgniteMXBeanDescription("Maximum event queue size.") + public long getExpireCount(); + + /** + * Gets current queue size of the event queue. + * + * @return Current queue size of the event queue. + */ + @IgniteMXBeanDescription("Current event queue size.") + public long getQueueSize(); + + /** + * Removes all events from the event queue. + */ + @IgniteMXBeanDescription("Removes all events from the event queue.") + public void clearAll(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java index 0a360be..3dc122b 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java @@ -81,7 +81,7 @@ import java.util.*; */ @IgniteSpiMultipleInstancesSupport(true) @IgniteSpiConsistencyChecked(optional = true) -public class AlwaysFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, AlwaysFailoverSpiMBean { +public class AlwaysFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, AlwaysFailoverSpiMXBean { /** Maximum number of attempts to execute a failed job on another node (default is {@code 5}). */ public static final int DFLT_MAX_FAILOVER_ATTEMPTS = 5; @@ -141,7 +141,7 @@ public class AlwaysFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, if (log.isDebugEnabled()) log.debug(configInfo("maximumFailoverAttempts", maxFailoverAttempts)); - registerMBean(gridName, this, AlwaysFailoverSpiMBean.class); + registerMXBean(gridName, this, AlwaysFailoverSpiMXBean.class); // Ack ok start. if (log.isDebugEnabled()) @@ -150,7 +150,7 @@ public class AlwaysFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, /** {@inheritDoc} */ @Override public void spiStop() throws IgniteSpiException { - unregisterMBean(); + unregisterMXBean(); // Ack ok stop. if (log.isDebugEnabled()) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMBean.java deleted file mode 100644 index 3190a90..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMBean.java +++ /dev/null @@ -1,44 +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.failover.always; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean for {@link AlwaysFailoverSpi}. - */ -@IgniteMXBeanDescription("MBean that provides access to always failover SPI configuration.") -public interface AlwaysFailoverSpiMBean extends IgniteSpiManagementMBean { - /** - * Gets maximum number of attempts to execute a failed job on another node. - * If not specified, {@link AlwaysFailoverSpi#DFLT_MAX_FAILOVER_ATTEMPTS} value will be used. - * - * @return Maximum number of attempts to execute a failed job on another node. - */ - @IgniteMXBeanDescription("Maximum number of attempts to execute a failed job on another node.") - public int getMaximumFailoverAttempts(); - - /** - * Get total number of jobs that were failed over. - * - * @return Total number of failed over jobs. - */ - @IgniteMXBeanDescription("Total number of jobs that were failed over.") - public int getTotalFailoverJobsCount(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMXBean.java new file mode 100644 index 0000000..cb98c29 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpiMXBean.java @@ -0,0 +1,44 @@ +/* + * 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.failover.always; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +/** + * Management bean for {@link AlwaysFailoverSpi}. + */ +@IgniteMXBeanDescription("MXBean that provides access to always failover SPI configuration.") +public interface AlwaysFailoverSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets maximum number of attempts to execute a failed job on another node. + * If not specified, {@link AlwaysFailoverSpi#DFLT_MAX_FAILOVER_ATTEMPTS} value will be used. + * + * @return Maximum number of attempts to execute a failed job on another node. + */ + @IgniteMXBeanDescription("Maximum number of attempts to execute a failed job on another node.") + public int getMaximumFailoverAttempts(); + + /** + * Get total number of jobs that were failed over. + * + * @return Total number of failed over jobs. + */ + @IgniteMXBeanDescription("Total number of jobs that were failed over.") + public int getTotalFailoverJobsCount(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java index 4caa960..d433493 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java @@ -88,7 +88,7 @@ import static org.apache.ignite.spi.collision.jobstealing.JobStealingCollisionSp @IgniteSpiMultipleInstancesSupport(true) @IgniteSpiConsistencyChecked(optional = true) public class JobStealingFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, - JobStealingFailoverSpiMBean { + JobStealingFailoverSpiMXBean { /** Maximum number of attempts to execute a failed job on another node (default is {@code 5}). */ public static final int DFLT_MAX_FAILOVER_ATTEMPTS = 5; @@ -171,7 +171,7 @@ public class JobStealingFailoverSpi extends IgniteSpiAdapter implements Failover if (log.isDebugEnabled()) log.debug(configInfo("maxFailoverAttempts", maxFailoverAttempts)); - registerMBean(gridName, this, JobStealingFailoverSpiMBean.class); + registerMXBean(gridName, this, JobStealingFailoverSpiMXBean.class); // Ack ok start. if (log.isDebugEnabled()) @@ -180,7 +180,7 @@ public class JobStealingFailoverSpi extends IgniteSpiAdapter implements Failover /** {@inheritDoc} */ @Override public void spiStop() throws IgniteSpiException { - unregisterMBean(); + unregisterMXBean(); // Ack ok stop. if (log.isDebugEnabled()) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMBean.java deleted file mode 100644 index 426fffd..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMBean.java +++ /dev/null @@ -1,54 +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.failover.jobstealing; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean for {@link JobStealingFailoverSpi}. - */ -@IgniteMXBeanDescription("MBean that provides access to job stealing failover SPI configuration.") -public interface JobStealingFailoverSpiMBean extends IgniteSpiManagementMBean { - /** - * Gets maximum number of attempts to execute a failed job on another node. - * If job gets stolen and thief node exists then it is not considered as - * failed job. - * If not specified, {@link JobStealingFailoverSpi#DFLT_MAX_FAILOVER_ATTEMPTS} value will be used. - * - * @return Maximum number of attempts to execute a failed job on another node. - */ - @IgniteMXBeanDescription("Maximum number of attempts to execute a failed job on another node.") - public int getMaximumFailoverAttempts(); - - /** - * Get total number of jobs that were failed over including stolen ones. - * - * @return Total number of failed over jobs. - */ - @IgniteMXBeanDescription("Total number of jobs that were failed over including stolen ones.") - public int getTotalFailedOverJobsCount(); - - /** - * Get total number of jobs that were stolen. - * - * @return Total number of stolen jobs. - */ - @IgniteMXBeanDescription("Total number of jobs that were stolen.") - public int getTotalStolenJobsCount(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMXBean.java new file mode 100644 index 0000000..1a173db --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpiMXBean.java @@ -0,0 +1,54 @@ +/* + * 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.failover.jobstealing; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +/** + * Management bean for {@link JobStealingFailoverSpi}. + */ +@IgniteMXBeanDescription("MXBean that provides access to job stealing failover SPI configuration.") +public interface JobStealingFailoverSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets maximum number of attempts to execute a failed job on another node. + * If job gets stolen and thief node exists then it is not considered as + * failed job. + * If not specified, {@link JobStealingFailoverSpi#DFLT_MAX_FAILOVER_ATTEMPTS} value will be used. + * + * @return Maximum number of attempts to execute a failed job on another node. + */ + @IgniteMXBeanDescription("Maximum number of attempts to execute a failed job on another node.") + public int getMaximumFailoverAttempts(); + + /** + * Get total number of jobs that were failed over including stolen ones. + * + * @return Total number of failed over jobs. + */ + @IgniteMXBeanDescription("Total number of jobs that were failed over including stolen ones.") + public int getTotalFailedOverJobsCount(); + + /** + * Get total number of jobs that were stolen. + * + * @return Total number of stolen jobs. + */ + @IgniteMXBeanDescription("Total number of jobs that were stolen.") + public int getTotalStolenJobsCount(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java index e659e5d..cd5a4fa 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java @@ -60,7 +60,7 @@ import java.util.*; * @see org.apache.ignite.spi.failover.FailoverSpi */ @IgniteSpiMultipleInstancesSupport(true) -public class NeverFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, NeverFailoverSpiMBean { +public class NeverFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, NeverFailoverSpiMXBean { /** Injected grid logger. */ @IgniteLoggerResource private IgniteLogger log; @@ -70,7 +70,7 @@ public class NeverFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, N // Start SPI start stopwatch. startStopwatch(); - registerMBean(gridName, this, NeverFailoverSpiMBean.class); + registerMXBean(gridName, this, NeverFailoverSpiMXBean.class); // Ack ok start. if (log.isDebugEnabled()) @@ -79,7 +79,7 @@ public class NeverFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, N /** {@inheritDoc} */ @Override public void spiStop() throws IgniteSpiException { - unregisterMBean(); + unregisterMXBean(); // Ack ok stop. if (log.isDebugEnabled()) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMBean.java deleted file mode 100644 index 30e3028..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMBean.java +++ /dev/null @@ -1,29 +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.failover.never; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean for {@link NeverFailoverSpi}. - */ -@IgniteMXBeanDescription("MBean that provides access to never failover SPI configuration.") -public interface NeverFailoverSpiMBean extends IgniteSpiManagementMBean { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMXBean.java new file mode 100644 index 0000000..3f9945f --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpiMXBean.java @@ -0,0 +1,29 @@ +/* + * 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.failover.never; + +import org.apache.ignite.mxbean.*; +import org.apache.ignite.spi.*; + +/** + * Management bean for {@link NeverFailoverSpi}. + */ +@IgniteMXBeanDescription("MXBean that provides access to never failover SPI configuration.") +public interface NeverFailoverSpiMXBean extends IgniteSpiManagementMXBean { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java index 82252dc..fc4b4c7 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java @@ -230,7 +230,7 @@ import static org.apache.ignite.events.IgniteEventType.*; */ @IgniteSpiMultipleInstancesSupport(true) public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBalancingSpi, - AdaptiveLoadBalancingSpiMBean { + AdaptiveLoadBalancingSpiMXBean { /** Random number generator. */ private static final Random RAND = new Random(); @@ -282,7 +282,7 @@ public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBa if (log.isDebugEnabled()) log.debug(configInfo("loadProbe", probe)); - registerMBean(gridName, this, AdaptiveLoadBalancingSpiMBean.class); + registerMXBean(gridName, this, AdaptiveLoadBalancingSpiMXBean.class); // Ack ok start. if (log.isDebugEnabled()) @@ -300,7 +300,7 @@ public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBa rwLock.writeLock().unlock(); } - unregisterMBean(); + unregisterMXBean(); // Ack ok stop. if (log.isDebugEnabled()) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/903e698a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpiMBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpiMBean.java deleted file mode 100644 index e954ba4..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpiMBean.java +++ /dev/null @@ -1,35 +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.loadbalancing.adaptive; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management MBean for {@link AdaptiveLoadBalancingSpi} SPI. - */ -@IgniteMXBeanDescription("MBean that provides access to adaptive load balancing SPI configuration.") -public interface AdaptiveLoadBalancingSpiMBean extends IgniteSpiManagementMBean { - /** - * Gets text description of current load probing implementation used. - * - * @return Text description of current load probing implementation used. - */ - @IgniteMXBeanDescription("Text description of current load probing implementation used.") - public String getLoadProbeFormatted(); -}