com.google.appengine.api
Class LifecycleManager
- java.lang.Object
- 
- com.google.appengine.api.LifecycleManager
 
- 
 
 public final class LifecycleManager extends java.lang.ObjectInformation about the current status of the Java Runtime.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class and Description static interfaceLifecycleManager.ShutdownHook
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidbeginShutdown(long deadline)For testing purposes only: Notifies the LifecycleManager that the runtime is shutting down.static LifecycleManagergetInstance()longgetRemainingShutdownTime()If the runtime is shutting down, returns how long, in milliseconds, is left for shutdown code to clean up.voidinterruptAllRequests()Calls Thread.interrupt() on all threads running requests for this application.booleanisShuttingDown()voidsetShutdownHook(LifecycleManager.ShutdownHook hook)Register a ShutdownHook to be called when the runtime shuts down.
 
- 
- 
- 
Method Detail- 
getInstancepublic static LifecycleManager getInstance() 
 - 
isShuttingDownpublic boolean isShuttingDown() 
 - 
setShutdownHookpublic void setShutdownHook(LifecycleManager.ShutdownHook hook) Register a ShutdownHook to be called when the runtime shuts down.- Throws:
- java.lang.NullPointerException- if the calling thread is neither a request thread nor a thread created by- ThreadManager.
 
 - 
interruptAllRequestspublic void interruptAllRequests() Calls Thread.interrupt() on all threads running requests for this application.
 - 
getRemainingShutdownTimepublic long getRemainingShutdownTime() If the runtime is shutting down, returns how long, in milliseconds, is left for shutdown code to clean up. Otherwise, returns -1.
 - 
beginShutdownpublic void beginShutdown(long deadline) For testing purposes only: Notifies the LifecycleManager that the runtime is shutting down.
 
- 
 
-