X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Futil%2Fthread%2FShutdownThread.java;h=db6ccf8e93258240d51249107f331390cc003768;hp=168b444ca002c5c29c0e9ca637ef473873cc04f7;hb=ba4f228fa9f72d50991a2218cfd83987ef5d385e;hpb=875b5e9651498a0cd8e0001c0742ba843e47cad0 diff --git a/lib/jetty/org/eclipse/jetty/util/thread/ShutdownThread.java b/lib/jetty/org/eclipse/jetty/util/thread/ShutdownThread.java index 168b444c..db6ccf8e 100644 --- a/lib/jetty/org/eclipse/jetty/util/thread/ShutdownThread.java +++ b/lib/jetty/org/eclipse/jetty/util/thread/ShutdownThread.java @@ -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();