public static synchronized void addOperation ( Runnable runnable , boolean preserveForNextShutdown ) { shutdownOperations . add ( runnable ) ; if ( preserveForNextShutdown ) { preservedShutdownOperations . add ( runnable ) ; } }
Adds a shutdown operation