]> WPIA git - gigi.git/blobdiff - lib/jetty/org/eclipse/jetty/util/thread/ShutdownThread.java
updating jetty to jetty-9.2.16.v2016040
[gigi.git] / lib / jetty / org / eclipse / jetty / util / thread / ShutdownThread.java
index 168b444ca002c5c29c0e9ca637ef473873cc04f7..db6ccf8e93258240d51249107f331390cc003768 100644 (file)
@@ -1,6 +1,6 @@
 //
 //  ========================================================================
-//  Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
+//  Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
 //  ------------------------------------------------------------------------
 //  All rights reserved. This program and the accompanying materials
 //  are made available under the terms of the Eclipse Public License v1.0
@@ -119,6 +119,12 @@ public class ShutdownThread extends Thread
             _thread.unhook();
     }
 
+    /* ------------------------------------------------------------ */
+    public static synchronized boolean isRegistered(LifeCycle lifeCycle)
+    {
+        return _thread._lifeCycles.contains(lifeCycle);
+    }
+
     /* ------------------------------------------------------------ */
     @Override
     public void run()
@@ -132,7 +138,7 @@ public class ShutdownThread extends Thread
                     lifeCycle.stop();
                     LOG.debug("Stopped {}",lifeCycle);
                 }
-                
+
                 if (lifeCycle instanceof Destroyable)
                 {
                     ((Destroyable)lifeCycle).destroy();