http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/PriorityQueueCollisionSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/PriorityQueueCollisionSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/PriorityQueueCollisionSpiMXBean.java new file mode 100644 index 0000000..da8dfcd --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/PriorityQueueCollisionSpiMXBean.java @@ -0,0 +1,159 @@ +/* + * 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; + +/** + * Management bean that provides access to the priority queue collision SPI configuration. + */ +@IgniteMXBeanDescription("MXBean provides access to the priority queue collision SPI.") +public interface PriorityQueueCollisionSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets current number of jobs that wait for the execution. + * + * @return Number of jobs that wait for execution. + */ + @IgniteMXBeanDescription("Number of jobs that wait for execution.") + public int getCurrentWaitJobsNumber(); + + /** + * Gets current number of jobs that are active, i.e. {@code 'running + held'} jobs. + * + * @return Number of active jobs. + */ + @IgniteMXBeanDescription("Number of active jobs.") + public int getCurrentActiveJobsNumber(); + + /* + * Gets number of currently running (not {@code 'held}) jobs. + * + * @return Number of currently running (not {@code 'held}) jobs. + */ + @IgniteMXBeanDescription("Number of running jobs.") + public int getCurrentRunningJobsNumber(); + + /** + * Gets number of currently {@code 'held'} jobs. + * + * @return Number of currently {@code 'held'} jobs. + */ + @IgniteMXBeanDescription("Number of held jobs.") + public int getCurrentHeldJobsNumber(); + + /** + * Gets number of jobs that can be executed in parallel. + * + * @return Number of jobs that can be executed in parallel. + */ + @IgniteMXBeanDescription("Number of jobs that can be executed in parallel.") + public int getParallelJobsNumber(); + + /** + * Sets number of jobs that can be executed in parallel. + * + * @param num Parallel jobs number. + */ + @IgniteMXBeanDescription("Number of jobs that can be executed in parallel.") + public void setParallelJobsNumber(int num); + + /** + * Maximum number of jobs that are allowed to wait in waiting queue. If number + * of waiting jobs ever exceeds this number, excessive jobs will be rejected. + * + * @return Maximum allowed number of waiting jobs. + */ + @IgniteMXBeanDescription("Maximum allowed number of waiting jobs.") + public int getWaitingJobsNumber(); + + /** + * Maximum number of jobs that are allowed to wait in waiting queue. If number + * of waiting jobs ever exceeds this number, excessive jobs will be rejected. + * + * @param num Maximium jobs number. + */ + @IgniteMXBeanDescription("Maximum allowed number of waiting jobs.") + public void setWaitingJobsNumber(int num); + + /** + * Gets key name of task priority attribute. + * + * @return Key name of task priority attribute. + */ + @IgniteMXBeanDescription("Key name of task priority attribute.") + public String getPriorityAttributeKey(); + + /** + * Gets key name of job priority attribute. + * + * @return Key name of job priority attribute. + */ + @IgniteMXBeanDescription("Key name of job priority attribute.") + public String getJobPriorityAttributeKey(); + + /** + * Gets default priority to use if a job does not have priority attribute + * set. + * + * @return Default priority to use if a task does not have priority + * attribute set. + */ + @IgniteMXBeanDescription("Default priority to use if a task does not have priority attribute set.") + public int getDefaultPriority(); + + /** + * Sets default priority to use if a job does not have priority attribute set. + * + * @param priority default priority. + */ + @IgniteMXBeanDescription("Default priority to use if a task does not have priority attribute set.") + public void setDefaultPriority(int priority); + + /** + * Gets value to increment job priority by every time a lower priority job gets + * behind a higher priority job. + * + * @return Value to increment job priority by every time a lower priority job gets + * behind a higher priority job. + */ + @IgniteMXBeanDescription("Value to increment job priority by every time a lower priority job gets behind a higher priority job.") + public int getStarvationIncrement(); + + /** + * Sets value to increment job priority by every time a lower priority job gets + * behind a higher priority job. + * + * @param increment Increment value. + */ + @IgniteMXBeanDescription("Value to increment job priority by every time a lower priority job gets behind a higher priority job.") + public void setStarvationIncrement(int increment); + + /** + * Gets flag indicating whether job starvation prevention is enabled. + * + * @return Flag indicating whether job starvation prevention is enabled. + */ + @IgniteMXBeanDescription("Flag indicating whether job starvation prevention is enabled.") + public boolean isStarvationPreventionEnabled(); + + /** + * Sets flag indicating whether job starvation prevention is enabled. + * + * @param preventStarvation Flag indicating whether job starvation prevention is enabled. + */ + @IgniteMXBeanDescription("Flag indicating whether job starvation prevention is enabled.") + public void setStarvationPreventionEnabled(boolean preventStarvation); +}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/RoundRobinLoadBalancingSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/RoundRobinLoadBalancingSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/RoundRobinLoadBalancingSpiMXBean.java new file mode 100644 index 0000000..221cf8f --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/RoundRobinLoadBalancingSpiMXBean.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.mxbean; + +import org.apache.ignite.spi.loadbalancing.roundrobin.*; + +/** + * Management bean for {@link RoundRobinLoadBalancingSpi} SPI. + */ +@IgniteMXBeanDescription("MXBean that provides access to round robin load balancing SPI configuration.") +public interface RoundRobinLoadBalancingSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Configuration parameter indicating whether a new round robin order should be + * created for every task. If {@code true} then load balancer is guaranteed + * to iterate through nodes sequentially for every task - so as long as number + * of jobs is less than or equal to the number of nodes, jobs are guaranteed to + * be assigned to unique nodes. If {@code false} then one round-robin order + * will be maintained for all tasks, so when tasks execute concurrently, it + * is possible for more than one job within task to be assigned to the same + * node. + * <p> + * Default is {@code true}. + * + * @return Configuration parameter indicating whether a new round robin order should + * be created for every task. Default is {@code true}. + */ + @IgniteMXBeanDescription("Configuration parameter indicating whether a new round robin order should be created for every task.") + public boolean isPerTask(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/SharedFsCheckpointSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/SharedFsCheckpointSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/SharedFsCheckpointSpiMXBean.java new file mode 100644 index 0000000..fa1a64b --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/SharedFsCheckpointSpiMXBean.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.mxbean; + +import java.util.*; + +/** + * Management bean that provides general administrative and configuration information + * about shared file system checkpoints. + */ +@IgniteMXBeanDescription("MXBean for shared file system based checkpoint SPI.") +public interface SharedFsCheckpointSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Gets path to the directory where all checkpoints are saved. + * + * @return Path to the checkpoints directory. + */ + @IgniteMXBeanDescription("Gets path to the directory where all checkpoints are saved.") + public String getCurrentDirectoryPath(); + + + /** + * Gets collection of all configured paths where checkpoints can be saved. + * + * @return Collection of all configured paths. + */ + @IgniteMXBeanDescription("Gets collection of all configured paths where checkpoints can be saved.") + public Collection<String> getDirectoryPaths(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerIndexProviderMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerIndexProviderMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerIndexProviderMXBean.java new file mode 100644 index 0000000..6e7e40b --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerIndexProviderMXBean.java @@ -0,0 +1,74 @@ +/* + * 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 org.apache.ignite.streamer.index.*; +import org.jetbrains.annotations.*; + +/** + * Streamer window index provider MXBean. + */ +public interface StreamerIndexProviderMXBean { + /** + * Index name. + * + * @return Index name. + */ + @IgniteMXBeanDescription("Index name.") + @Nullable public String name(); + + /** + * Gets index updater class name. + * + * @return Index updater class. + */ + @IgniteMXBeanDescription("Index updater class name.") + public String updaterClass(); + + /** + * Gets index unique flag. + * + * @return Index unique flag. + */ + @IgniteMXBeanDescription("Index unique flag.") + public boolean unique(); + + /** + * Returns {@code true} if index supports sorting and therefore can perform range operations. + * + * @return Index sorted flag. + */ + @IgniteMXBeanDescription("Index sorted flag.") + public boolean sorted(); + + /** + * Gets index policy. + * + * @return Index policy. + */ + @IgniteMXBeanDescription("Index policy.") + public StreamerIndexPolicy policy(); + + /** + * Gets current index size. + * + * @return Current index size. + */ + @IgniteMXBeanDescription("Current index size.") + public int size(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerMXBean.java new file mode 100644 index 0000000..a2a726f --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerMXBean.java @@ -0,0 +1,168 @@ +/* + * 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 org.jetbrains.annotations.*; + +/** + * Streamer MXBean interface. + */ +@IgniteMXBeanDescription("MXBean that provides access to streamer description and metrics.") +public interface StreamerMXBean { + /** + * Gets streamer name. + * + * @return Streamer name. + */ + @IgniteMXBeanDescription("Streamer name.") + @Nullable public String getName(); + + /** + * Gets {@code atLeastOnce} configuration flag. + * + * @return {@code True} if {@code atLeastOnce} is configured. + */ + @IgniteMXBeanDescription("True if atLeastOnce is configured.") + public boolean isAtLeastOnce(); + + /** + * Gets size of stage futures map. This map is maintained only when {@code atLeastOnce} configuration + * flag is set to true. + * + * @return Stage future map size. + */ + @IgniteMXBeanDescription("Stage future map size.") + public int getStageFutureMapSize(); + + /** + * Gets size of batch futures map. + * + * @return Batch future map size. + */ + @IgniteMXBeanDescription("Batch future map size.") + public int getBatchFutureMapSize(); + + /** + * Gets number of stages currently being executed in streamer pool. + * + * @return Number of stages. Cannot be more than pool thread count. + */ + @IgniteMXBeanDescription("Number of stages currently being executed in streamer pool.") + public int getStageActiveExecutionCount(); + + /** + * Gets number of event batches currently waiting to be executed. + * + * @return Number of event batches waiting to be processed. + */ + @IgniteMXBeanDescription("Number of event batches currently waiting to be executed.") + public int getStageWaitingExecutionCount(); + + /** + * Gets total number of stages executed since last reset. + * + * @return Total number of stages executed since last reset. + */ + @IgniteMXBeanDescription("Total number of stages executed since last reset.") + public long getStageTotalExecutionCount(); + + /** + * Gets pipeline maximum execution time, i.e. time between execution start and time when last stage in pipeline + * returned empty map. If pipeline execution was split to different nodes, metrics for each split will be + * recorded independently. + * + * @return Pipeline maximum execution time. + */ + @IgniteMXBeanDescription("Pipeline maximum execution time.") + public long getPipelineMaximumExecutionTime(); + + /** + * Gets pipeline minimum execution time, i.e. time between execution start and time when last stage in pipeline + * returned empty map. If pipeline execution was split to different nodes, metrics for each split will be + * recorded independently. + * + * @return Pipeline minimum execution time. + */ + @IgniteMXBeanDescription("Pipeline minimum execution time.") + public long getPipelineMinimumExecutionTime(); + + /** + * Gets pipeline average execution time, i.e. time between execution start and time when last stage in pipeline + * returned empty map. If pipeline execution was split, metrics for each split will be recorded independently. + * + * @return Pipeline average execution time. + */ + @IgniteMXBeanDescription("Pipeline average execution time.") + public long getPipelineAverageExecutionTime(); + + /** + * Gets maximum number of unique nodes participated in pipeline execution. If pipeline execution was split, + * metrics for each split will be recorded independently. + * + * @return Maximum number of unique nodes in pipeline execution. + */ + @IgniteMXBeanDescription("Maximum number of unique nodes participated in pipeline execution.") + public int getPipelineMaximumExecutionNodes(); + + /** + * Gets minimum number of unique nodes participated in pipeline execution. If pipeline execution was split, + * metrics for each split will be recorded independently. + * + * @return Minimum number of unique nodes in pipeline execution. + */ + @IgniteMXBeanDescription("Minimum number of unique nodes participated in pipeline execution.") + public int getPipelineMinimumExecutionNodes(); + + /** + * Gets average number of unique nodes participated in pipeline execution. If pipeline execution was split, + * metrics for each split will be recorded independently. + * + * @return Average number of unique nodes in pipeline execution. + */ + @IgniteMXBeanDescription("Average number of unique nodes participated in pipeline execution.") + public int getPipelineAverageExecutionNodes(); + + /** + * Gets number of current active sessions. Since event execution sessions are tracked only when + * {@code atLeastOnce} configuration property is set to {@code true}, this metric will be collected + * only in this case. When {@code atLeastOnce} is set to {@code false}, this metric will always be zero. + * + * @return Number of current active sessions. + */ + @IgniteMXBeanDescription("Number of current active sessions.") + public int getCurrentActiveSessions(); + + /** + * Gets maximum number of active sessions since last reset. Since event execution sessions are tracked only when + * {@code atLeastOnce} configuration property is set to {@code true}, this metric will be collected + * only in this case. When {@code atLeastOnce} is set to {@code false}, this metric will always be zero. + * + * @return Maximum active sessions since last reset. + */ + @IgniteMXBeanDescription("Maximum number of active sessions since last reset.") + public int getMaximumActiveSessions(); + + /** + * Gets number of failures since last reset. If {@code atLeastOnce} flag is set to steamer configuration, + * then only root node failures will be counted. Otherwise each node will count failures independently. + * + * @return Failures count. + */ + @IgniteMXBeanDescription("Number of failures since last reset.") + public int getFailuresCount(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerStageMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerStageMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerStageMXBean.java new file mode 100644 index 0000000..5bcb804 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerStageMXBean.java @@ -0,0 +1,112 @@ +/* + * 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; + +/** + * Streamer stage MXBean. + */ +@IgniteMXBeanDescription("MXBean that provides access to streamer stage description and metrics.") +public interface StreamerStageMXBean { + /** + * Gets stage name. + * + * @return Stage name. + */ + @IgniteMXBeanDescription("Stage name.") + public String getName(); + + /** + * Gets stage class name. + * + * @return Stage class name. + */ + @IgniteMXBeanDescription("Stage class name.") + public String getStageClassName(); + + /** + * Gets stage minimum execution time. + * + * @return Stage minimum execution time. + */ + @IgniteMXBeanDescription("Stage minimum execution time.") + public long getMinimumExecutionTime(); + + /** + * Gets stage maximum execution time. + * + * @return Stage maximum execution time. + */ + @IgniteMXBeanDescription("Stage maximum execution time.") + public long getMaximumExecutionTime(); + + /** + * Gets stage average execution time. + * + * @return Stage average execution time. + */ + @IgniteMXBeanDescription("Stage average execution time.") + public long getAverageExecutionTime(); + + /** + * Gets stage minimum waiting time. + * + * @return Stage minimum waiting time. + */ + @IgniteMXBeanDescription("Stage minimum waiting time.") + public long getMinimumWaitingTime(); + + /** + * Gets stage maximum waiting time. + * + * @return Stage maximum waiting time. + */ + @IgniteMXBeanDescription("Stage maximum waiting time.") + public long getMaximumWaitingTime(); + + /** + * Stage average waiting time. + * + * @return Stage average waiting time. + */ + @IgniteMXBeanDescription("Stage average waiting time.") + public long getAverageWaitingTime(); + + /** + * Gets total stage execution count since last reset. + * + * @return Number of times this stage was executed. + */ + @IgniteMXBeanDescription("Number of times this stage was executed.") + public long getTotalExecutionCount(); + + /** + * Gets stage failure count. + * + * @return Stage failure count. + */ + @IgniteMXBeanDescription("Stage failure count.") + public int getFailuresCount(); + + /** + * Gets flag indicating if stage is being currently executed by at least one thread on current node. + * + * @return {@code True} if stage is executing now. + */ + @IgniteMXBeanDescription("Whether stage is currently being executed.") + public boolean isExecuting(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerWindowMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerWindowMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerWindowMXBean.java new file mode 100644 index 0000000..b39d219 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/StreamerWindowMXBean.java @@ -0,0 +1,56 @@ +/* + * 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; + +/** + * Streamer window MXBean. + */ +@IgniteMXBeanDescription("MXBean that provides access to streamer window description.") +public interface StreamerWindowMXBean { + /** + * Gets window name. + * + * @return Window name. + */ + @IgniteMXBeanDescription("Window name.") + public String getName(); + + /** + * Gets window class name. + * + * @return Window class name. + */ + @IgniteMXBeanDescription("Window class name.") + public String getClassName(); + + /** + * Gets current window size. + * + * @return Current window size. + */ + @IgniteMXBeanDescription("Window size.") + public int getSize(); + + /** + * Gets estimate for window eviction queue size. + * + * @return Eviction queue size estimate. + */ + @IgniteMXBeanDescription("Eviction queue size estimate.") + public int getEvictionQueueSize(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/TcpClientDiscoverySpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/TcpClientDiscoverySpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/TcpClientDiscoverySpiMXBean.java new file mode 100644 index 0000000..baeb6ad --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/TcpClientDiscoverySpiMXBean.java @@ -0,0 +1,163 @@ +/* + * 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 org.apache.ignite.spi.discovery.tcp.*; + +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/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/TcpCommunicationSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/TcpCommunicationSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/TcpCommunicationSpiMXBean.java new file mode 100644 index 0000000..6b4ad7c --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/TcpCommunicationSpiMXBean.java @@ -0,0 +1,281 @@ +/* + * 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 org.apache.ignite.spi.communication.tcp.*; + +/** + * 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/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/TcpDiscoverySpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/TcpDiscoverySpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/TcpDiscoverySpiMXBean.java new file mode 100644 index 0000000..8e4cfa8 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/TcpDiscoverySpiMXBean.java @@ -0,0 +1,274 @@ +/* + * 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 org.apache.ignite.spi.discovery.tcp.*; +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/4916c90c/modules/core/src/main/java/org/apache/ignite/mxbean/WeightedRandomLoadBalancingSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/WeightedRandomLoadBalancingSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/WeightedRandomLoadBalancingSpiMXBean.java new file mode 100644 index 0000000..8b49eef --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/mxbean/WeightedRandomLoadBalancingSpiMXBean.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.mxbean; + +import org.apache.ignite.spi.loadbalancing.weightedrandom.*; + +/** + * Management MXBean for {@link WeightedRandomLoadBalancingSpi} SPI. + */ +@IgniteMXBeanDescription("MXBean that provides access to weighted random load balancing SPI configuration.") +public interface WeightedRandomLoadBalancingSpiMXBean extends IgniteSpiManagementMXBean { + /** + * Checks whether node weights are considered when doing + * random load balancing. + * + * @return If {@code true} then random load is distributed according + * to node weights. + */ + @IgniteMXBeanDescription("Whether node weights are considered when doing random load balancing.") + public boolean isUseWeights(); + + /** + * Gets weight of this node. + * + * @return Weight of this node. + */ + @IgniteMXBeanDescription("Weight of this node.") + public int getNodeWeight(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java index 42d3fee..5a996fd 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java @@ -21,6 +21,7 @@ import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.events.*; import org.apache.ignite.internal.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.authentication.*; import org.apache.ignite.internal.managers.communication.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiManagementMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiManagementMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiManagementMXBean.java deleted file mode 100644 index 6a6b5b4..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiManagementMXBean.java +++ /dev/null @@ -1,85 +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; - -import org.apache.ignite.mxbean.*; - -import java.util.*; - -/** - * This interface defines basic MXBean for all SPI implementations. Every SPI implementation - * should provide implementation for this MXBean interface. Note that SPI implementation can extend this - * interface as necessary. - */ -public interface IgniteSpiManagementMXBean { - /** - * Gets string presentation of the start timestamp. - * - * @return String presentation of the start timestamp. - */ - @IgniteMXBeanDescription("String presentation of the start timestamp.") - public String getStartTimestampFormatted(); - - /** - * Gets string presentation of up-time for this SPI. - * - * @return String presentation of up-time for this SPI. - */ - @IgniteMXBeanDescription("String presentation of up-time for this SPI.") - public String getUpTimeFormatted(); - - /** - * Get start timestamp of this SPI. - * - * @return Start timestamp of this SPI. - */ - @IgniteMXBeanDescription("Start timestamp of this SPI.") - public long getStartTimestamp(); - - /** - * Gets up-time of this SPI in ms. - * - * @return Up-time of this SPI. - */ - @IgniteMXBeanDescription("Up-time of this SPI in milliseconds.") - public long getUpTime(); - - /** - * Gets Gridgain installation home folder (i.e. ${GRIDGAIN_HOME}); - * - * @return Gridgain installation home folder. - */ - @IgniteMXBeanDescription("Gridgain installation home folder.") - public String getGridGainHome(); - - /** - * Gets ID of the local node. - * - * @return ID of the local node. - */ - @IgniteMXBeanDescription("ID of the local node.") - public UUID getLocalNodeId(); - - /** - * Gets name of the SPI. - * - * @return Name of the SPI. - */ - @IgniteMXBeanDescription("Name of the SPI.") - public String getName(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java index e4c939a..308e457 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java @@ -18,6 +18,7 @@ package org.apache.ignite.spi.authentication.noop; import org.apache.ignite.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.*; import org.apache.ignite.spi.authentication.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpiMXBean.java deleted file mode 100644 index e685b39..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpiMXBean.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.authentication.noop; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean for {@link NoopAuthenticationSpi}. - */ -@IgniteMXBeanDescription("MXBean that provides access to no-op authentication SPI configuration.") -public interface NoopAuthenticationSpiMXBean extends IgniteSpiManagementMXBean { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java index 4d96598..3a764a4 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java @@ -19,6 +19,7 @@ package org.apache.ignite.spi.checkpoint.cache; import org.apache.ignite.*; import org.apache.ignite.events.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.*; import org.apache.ignite.internal.managers.eventstorage.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiMXBean.java deleted file mode 100644 index de1d470..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpiMXBean.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.spi.checkpoint.cache; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean that provides general administrative and configuration information - * about cache checkpoint SPI. - */ -@IgniteMXBeanDescription("MXBean provides information about cache checkpoint SPI.") -public interface CacheCheckpointSpiMXBean extends IgniteSpiManagementMXBean { - /** - * Gets cache name to be used by this SPI.. - * - * @return Cache name to be used by this SPI. - */ - @IgniteMXBeanDescription("Cache name to be used by this SPI.") - public String getCacheName(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java index c915645..367735a 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java @@ -18,6 +18,7 @@ package org.apache.ignite.spi.checkpoint.jdbc; import org.apache.ignite.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.*; import org.apache.ignite.spi.checkpoint.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiMXBean.java deleted file mode 100644 index 68b9e89..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpiMXBean.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.spi.checkpoint.jdbc; - - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean that provides general administrative and configuration information - * about jdbc checkpoint SPI. - */ -@IgniteMXBeanDescription("MXBean that provides information about jdbc checkpoint SPI.") -public interface JdbcCheckpointSpiMXBean extends IgniteSpiManagementMXBean { - /** - * Gets number of retries in case of DB failure. - * - * @return Number of retries. - */ - @IgniteMXBeanDescription("Number of retries.") - public int getNumberOfRetries(); - - /** - * Gets data source description. - * - * @return Description for data source. - */ - @IgniteMXBeanDescription("Data source description.") - public String getDataSourceInfo(); - - /** - * Gets checkpoint jdbc user name. - * - * @return User name for checkpoint jdbc. - */ - @IgniteMXBeanDescription("User name for checkpoint database.") - public String getUser(); - - /** - * Gets checkpoint jdbc password. - * - * @return Password for checkpoint jdbc. - */ - @IgniteMXBeanDescription("Password for checkpoint database.") - public String getPwd(); - - /** - * Gets checkpoint table name. - * - * @return Checkpoint table name. - */ - @IgniteMXBeanDescription("Checkpoint table name.") - public String getCheckpointTableName(); - - /** - * Gets key field name for checkpoint table. - * - * @return Key field name for checkpoint table. - */ - @IgniteMXBeanDescription("Key field name for checkpoint table.") - public String getKeyFieldName(); - - /** - * Gets key field type for checkpoint table. - * - * @return Key field type for checkpoint table. - */ - @IgniteMXBeanDescription("Key field type for checkpoint table.") - public String getKeyFieldType(); - - /** - * Gets value field name for checkpoint table. - * - * @return Value field name for checkpoint table. - */ - @IgniteMXBeanDescription("Value field name for checkpoint table.") - public String getValueFieldName(); - - /** - * Gets value field type for checkpoint table. - * - * @return Value field type for checkpoint table. - */ - @IgniteMXBeanDescription("Value field type for checkpoint table.") - public String getValueFieldType(); - - /** - * Gets expiration date field name for checkpoint table. - * - * @return Create date field name for checkpoint table. - */ - @IgniteMXBeanDescription("Expiration date field name for checkpoint table.") - public String getExpireDateFieldName(); - - /** - * Gets expiration date field type for checkpoint table. - * - * @return Expiration date field type for checkpoint table. - */ - @IgniteMXBeanDescription("Expiration date field type for checkpoint table.") - public String getExpireDateFieldType(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java index e1ee46f..5e4277f 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java @@ -19,6 +19,7 @@ package org.apache.ignite.spi.checkpoint.sharedfs; import org.apache.ignite.*; import org.apache.ignite.marshaller.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.*; import org.apache.ignite.spi.checkpoint.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpiMXBean.java deleted file mode 100644 index 1b16a70..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpiMXBean.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.spi.checkpoint.sharedfs; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -import java.util.*; - -/** - * Management bean that provides general administrative and configuration information - * about shared file system checkpoints. - */ -@IgniteMXBeanDescription("MXBean for shared file system based checkpoint SPI.") -public interface SharedFsCheckpointSpiMXBean extends IgniteSpiManagementMXBean { - /** - * Gets path to the directory where all checkpoints are saved. - * - * @return Path to the checkpoints directory. - */ - @IgniteMXBeanDescription("Gets path to the directory where all checkpoints are saved.") - public String getCurrentDirectoryPath(); - - - /** - * Gets collection of all configured paths where checkpoints can be saved. - * - * @return Collection of all configured paths. - */ - @IgniteMXBeanDescription("Gets collection of all configured paths where checkpoints can be saved.") - public Collection<String> getDirectoryPaths(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java index 7debfb9..db089f5 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java @@ -18,6 +18,7 @@ package org.apache.ignite.spi.collision.fifoqueue; import org.apache.ignite.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.*; import org.apache.ignite.spi.collision.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpiMXBean.java deleted file mode 100644 index 1f31a01..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpiMXBean.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.spi.collision.fifoqueue; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -/** - * Management bean that provides access to the FIFO queue collision SPI configuration. - */ -@IgniteMXBeanDescription("MXBean provides information about FIFO queue based collision SPI configuration.") -public interface FifoQueueCollisionSpiMXBean extends IgniteSpiManagementMXBean { - /** - * Gets number of jobs that can be executed in parallel. - * - * @return Number of jobs that can be executed in parallel. - */ - @IgniteMXBeanDescription("Number of jobs that can be executed in parallel.") - public int getParallelJobsNumber(); - - /** - * Sets number of jobs that can be executed in parallel. - * - * @param num Parallel jobs number. - */ - @IgniteMXBeanDescription("Number of jobs that can be executed in parallel.") - public void setParallelJobsNumber(int num); - - /** - * Maximum number of jobs that are allowed to wait in waiting queue. If number - * of waiting jobs ever exceeds this number, excessive jobs will be rejected. - * - * @return Maximum allowed number of waiting jobs. - */ - @IgniteMXBeanDescription("Maximum allowed number of waiting jobs.") - public int getWaitingJobsNumber(); - - /** - * Sets maximum number of jobs that are allowed to wait in waiting queue. If number - * of waiting jobs ever exceeds this number, excessive jobs will be rejected. - * - * @param num Waiting jobs number. - */ - @IgniteMXBeanDescription("Maximum allowed number of waiting jobs.") - public void setWaitingJobsNumber(int num); - - /** - * Gets current number of jobs that wait for the execution. - * - * @return Number of jobs that wait for execution. - */ - @IgniteMXBeanDescription("Number of jobs that wait for execution.") - public int getCurrentWaitJobsNumber(); - - /** - * Gets current number of jobs that are active, i.e. {@code 'running + held'} jobs. - * - * @return Number of active jobs. - */ - @IgniteMXBeanDescription("Number of active jobs.") - public int getCurrentActiveJobsNumber(); - - /* - * Gets number of currently running (not {@code 'held}) jobs. - * - * @return Number of currently running (not {@code 'held}) jobs. - */ - @IgniteMXBeanDescription("Number of running jobs.") - public int getCurrentRunningJobsNumber(); - - /** - * Gets number of currently {@code 'held'} jobs. - * - * @return Number of currently {@code 'held'} jobs. - */ - @IgniteMXBeanDescription("Number of held jobs.") - public int getCurrentHeldJobsNumber(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java index 904429d..e84b297 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java @@ -21,6 +21,7 @@ import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.events.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.*; import org.apache.ignite.internal.managers.communication.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpiMXBean.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpiMXBean.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpiMXBean.java deleted file mode 100644 index 10c2d04..0000000 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpiMXBean.java +++ /dev/null @@ -1,193 +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.collision.jobstealing; - -import org.apache.ignite.mxbean.*; -import org.apache.ignite.spi.*; - -import java.io.*; -import java.util.*; - -/** - * Management MBean for job stealing based collision SPI. - */ -@IgniteMXBeanDescription("MXBean for job stealing based collision SPI.") -public interface JobStealingCollisionSpiMXBean extends IgniteSpiManagementMXBean { - /** - * Gets current number of jobs to be stolen. This is outstanding - * requests number. - * - * @return Number of jobs to be stolen. - */ - @IgniteMXBeanDescription("Number of jobs to be stolen.") - public int getCurrentJobsToStealNumber(); - - /** - * Gets current number of jobs that wait for the execution. - * - * @return Number of jobs that wait for execution. - */ - @IgniteMXBeanDescription("Number of jobs that wait for execution.") - public int getCurrentWaitJobsNumber(); - - /** - * Gets current number of jobs that are being executed. - * - * @return Number of active jobs. - */ - @IgniteMXBeanDescription("Number of active jobs.") - public int getCurrentActiveJobsNumber(); - - /* - * Gets number of currently running (not {@code 'held}) jobs. - * - * @return Number of currently running (not {@code 'held}) jobs. - */ - @IgniteMXBeanDescription("Number of running jobs.") - public int getCurrentRunningJobsNumber(); - - /** - * Gets number of currently {@code 'held'} jobs. - * - * @return Number of currently {@code 'held'} jobs. - */ - @IgniteMXBeanDescription("Number of held jobs.") - public int getCurrentHeldJobsNumber(); - - /** - * Gets total number of stolen jobs. - * - * @return Number of stolen jobs. - */ - @IgniteMXBeanDescription("Number of stolen jobs.") - public int getTotalStolenJobsNumber(); - - /** - * Gets number of jobs that can be executed in parallel. - * - * @return Number of jobs that can be executed in parallel. - */ - @IgniteMXBeanDescription("Number of jobs that can be executed in parallel.") - public int getActiveJobsThreshold(); - - /** - * Sets number of jobs that can be executed in parallel. - * - * @param activeJobsTreshold Number of jobs that can be executed in parallel. - */ - @IgniteMXBeanDescription("Number of jobs that can be executed in parallel.") - public void setActiveJobsThreshold(int activeJobsTreshold); - - /** - * Gets job count threshold at which this node will - * start stealing jobs from other nodes. - * - * @return Job count threshold. - */ - @IgniteMXBeanDescription("Job count threshold.") - public int getWaitJobsThreshold(); - - /** - * Sets job count threshold at which this node will - * start stealing jobs from other nodes. - * - * @param waitJobsThreshold Job count threshold. - */ - @IgniteMXBeanDescription("Job count threshold.") - public void setWaitJobsThreshold(int waitJobsThreshold); - - /** - * Message expire time configuration parameter. If no response is received - * from a busy node to a job stealing message, then implementation will - * assume that message never got there, or that remote node does not have - * this node included into topology of any of the jobs it has. - * - * @return Message expire time. - */ - @IgniteMXBeanDescription("Message expire time.") - public long getMessageExpireTime(); - - /** - * Message expire time configuration parameter. If no response is received - * from a busy node to a job stealing message, then implementation will - * assume that message never got there, or that remote node does not have - * this node included into topology of any of the jobs it has. - * - * @param msgExpireTime Message expire time. - */ - @IgniteMXBeanDescription("Message expire time.") - public void setMessageExpireTime(long msgExpireTime); - - /** - * Gets flag indicating whether this node should attempt to steal jobs - * from other nodes. If {@code false}, then this node will steal allow - * jobs to be stolen from it, but won't attempt to steal any jobs from - * other nodes. - * <p> - * Default value is {@code true}. - * - * @return Flag indicating whether this node should attempt to steal jobs - * from other nodes. - */ - @IgniteMXBeanDescription("Flag indicating whether this node should attempt to steal jobs from other nodes.") - public boolean isStealingEnabled(); - - /** - * Gets flag indicating whether this node should attempt to steal jobs - * from other nodes. If {@code false}, then this node will steal allow - * jobs to be stolen from it, but won't attempt to steal any jobs from - * other nodes. - * <p> - * Default value is {@code true}. - * - * @param stealingEnabled Flag indicating whether this node should attempt to steal jobs - * from other nodes. - */ - @IgniteMXBeanDescription("Flag indicating whether this node should attempt to steal jobs from other nodes.") - public void setStealingEnabled(boolean stealingEnabled); - - /** - * Gets maximum number of attempts to steal job by another node. - * If not specified, {@link JobStealingCollisionSpi#DFLT_MAX_STEALING_ATTEMPTS} - * value will be used. - * - * @return Maximum number of attempts to steal job by another node. - */ - @IgniteMXBeanDescription("Maximum number of attempts to steal job by another node.") - public int getMaximumStealingAttempts(); - - /** - * Gets maximum number of attempts to steal job by another node. - * If not specified, {@link JobStealingCollisionSpi#DFLT_MAX_STEALING_ATTEMPTS} - * value will be used. - * - * @param maximumStealingAttempts Maximum number of attempts to steal job by another node. - */ - @IgniteMXBeanDescription("Maximum number of attempts to steal job by another node.") - public void setMaximumStealingAttempts(int maximumStealingAttempts); - - /** - * Configuration parameter to enable stealing to/from only nodes that - * have these attributes set (see {@link org.apache.ignite.cluster.ClusterNode#attribute(String)} and - * {@link org.apache.ignite.configuration.IgniteConfiguration#getUserAttributes()} methods). - * - * @return Node attributes to enable job stealing for. - */ - @IgniteMXBeanDescription("Node attributes to enable job stealing for.") - public Map<String, ? extends Serializable> getStealingAttributes(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4916c90c/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java index 2519b89..449ca03 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java @@ -19,6 +19,7 @@ package org.apache.ignite.spi.collision.priorityqueue; import org.apache.ignite.*; import org.apache.ignite.compute.*; +import org.apache.ignite.mxbean.*; import org.apache.ignite.resources.*; import org.apache.ignite.spi.*; import org.apache.ignite.spi.collision.*;