Package com.google.appengine.api
Class LifecycleManager
java.lang.Object
com.google.appengine.api.LifecycleManager
Information about the current status of the Java Runtime.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginShutdown
(long deadline) For testing purposes only: Notifies the LifecycleManager that the runtime is shutting down.static LifecycleManager
long
If the runtime is shutting down, returns how long, in milliseconds, is left for shutdown code to clean up.void
Calls Thread.interrupt() on all threads running requests for this application.boolean
void
Register a ShutdownHook to be called when the runtime shuts down.
-
Method Details
-
getInstance
-
isShuttingDown
public boolean isShuttingDown() -
setShutdownHook
Register a ShutdownHook to be called when the runtime shuts down.- Throws:
NullPointerException
- if the calling thread is neither a request thread nor a thread created byThreadManager
.
-
interruptAllRequests
public void interruptAllRequests()Calls Thread.interrupt() on all threads running requests for this application. -
getRemainingShutdownTime
public long getRemainingShutdownTime()If the runtime is shutting down, returns how long, in milliseconds, is left for shutdown code to clean up. Otherwise, returns -1. -
beginShutdown
public void beginShutdown(long deadline) For testing purposes only: Notifies the LifecycleManager that the runtime is shutting down.
-