clintropolis commented on a change in pull request #6864: add 'init' lifecycle 
stage for finer control over startup and shutdown
URL: https://github.com/apache/incubator-druid/pull/6864#discussion_r248896140
 
 

 ##########
 File path: 
core/src/main/java/org/apache/druid/java/util/common/lifecycle/Lifecycle.java
 ##########
 @@ -77,9 +78,16 @@
   private final AtomicReference<State> state = new 
AtomicReference<>(State.NOT_STARTED);
   private Stage currStage = null;
   private final AtomicBoolean shutdownHookRegistered = new 
AtomicBoolean(false);
+  private final String name;
 
   public Lifecycle()
   {
+    this("anonymous");
+  }
+
+  public Lifecycle(String name)
+  {
+    this.name = name;
 
 Review comment:
   Added check :+1:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to