alamar commented on a change in pull request #8417:
URL: https://github.com/apache/ignite/pull/8417#discussion_r518845321



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
##########
@@ -3209,6 +3214,13 @@ public void setCounter(int cnt) {
                 this.cnt = cnt;
             }
         }
+
+        /**
+         *
+         * @return whether the startLatch has been counted down, thereby 
indicating that the kernal has full started.
+         */
+        public boolean hasStartLatchCompleted() { return startLatch.getCount() 
== 0; }

Review comment:
       Every please unroll method body to 3 lines. You can import code 
conventions in your IDEA from 
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines
   
   Can you also discuss this approach on the developers list? I'm not sure we 
should use this latch for checking.

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
##########
@@ -1476,6 +1476,11 @@ public static DependencyResolver dependencyResolver() {
         return dependencyResolver.get();
     }
 
+    public static boolean hasKernalStarted(String name) {
+        IgniteNamedInstance grid = name != null ? grids.get(name) : dfltGrid;
+        return grid != null && grid.hasStartLatchCompleted();

Review comment:
       newline is needed before this line




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to