sashapolo commented on code in PR #795:
URL: https://github.com/apache/ignite-3/pull/795#discussion_r880286552
##########
modules/api/src/main/java/org/apache/ignite/IgnitionManager.java:
##########
@@ -101,64 +106,78 @@ public static CompletableFuture<Ignite> start(String
nodeName, @Nullable Path cf
}
/**
- * Stops the node with given {@code name}. It's possible to stop both
already started node or node that is currently starting. Has no
- * effect if node with specified name doesn't exist.
+ * Stops the node with given {@code nodeName}. It's possible to stop both
already started node or node that is currently starting.
+ * Has no effect if node with specified name doesn't exist.
*
- * @param name Node name to stop.
- * @throws IllegalArgumentException if null is specified instead of node
name.
+ * @param nodeName Node name to stop.
*/
- public static void stop(String name) {
+ public static void stop(String nodeName) {
Ignition ignition =
loadIgnitionService(Thread.currentThread().getContextClassLoader());
- ignition.stop(name);
+ ignition.stop(nodeName);
}
/**
- * Stops the node with given {@code name}. It's possible to stop both
already started node or node that is currently starting. Has no
- * effect if node with specified name doesn't exist.
+ * Stops the node with given {@code nodeName}. It's possible to stop both
already started node or node that is currently starting.
+ * Has no effect if node with specified name doesn't exist.
*
- * @param name Node name to stop.
+ * @param nodeName Node name to stop.
* @param clsLdr The class loader to be used to load
provider-configuration files and provider classes, or {@code null} if the system
* class loader (or, failing that, the bootstrap class
loader) is to be used
- * @throws IllegalArgumentException if null is specified instead of node
name.
*/
- public static void stop(String name, @Nullable ClassLoader clsLdr) {
+ public static void stop(String nodeName, @Nullable ClassLoader clsLdr) {
Ignition ignition = loadIgnitionService(clsLdr);
- ignition.stop(name);
+ ignition.stop(nodeName);
}
/**
* Initializes the cluster that this node is present in.
*
- * @param name name of the node that the initialization request will be
sent to.
+ * @param nodeName Name of the node that the initialization request will
be sent to.
* @param metaStorageNodeNames names of nodes that will host the Meta
Storage and the CMG.
+ * @param clusterName Human-readable name of the cluster.
* @throws IgniteException If the given node has not been started or has
been stopped.
- * @see Ignition#init(String, Collection)
+ * @see Ignition#init(String, Collection, String)
*/
- public static synchronized void init(String name, Collection<String>
metaStorageNodeNames) {
+ public static synchronized void init(String nodeName, Collection<String>
metaStorageNodeNames, String clusterName) {
+ Objects.requireNonNull(nodeName);
+ Objects.requireNonNull(metaStorageNodeNames);
Review Comment:
I agree with your points about consistency, I will fix them. As for
`@NotNull` - I think we agreed not to use this annotation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]