sirius.kernel.Killable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirius-kernel Show documentation
Show all versions of sirius-kernel Show documentation
Provides common core classes and the microkernel powering all Sirius applications
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package sirius.kernel;
import sirius.kernel.di.std.Priorized;
/**
* Classes implementing this interface get notified once the framework is being shut down.
*
* The framework lifecycle is split into three phases:
*
* - {@link Startable}: Each startable component is invoked during startup.
* - {@link Stoppable}: Each stoppable component is invoked during framework shutdown.
* - {@link Killable}: The the shutdown process has to wait for a task to finish, this can be used to block until a
* task is completed.
*
*/
public interface Killable extends Priorized {
@Override
default int getPriority() {
return DEFAULT_PRIORITY;
}
/**
* Called after {@link Stoppable#stopped()} has been called to wait until all tasks are fully finished.
*
* This method may block for a certain amount of time to permit the subsystem to shut down properly. However,
* it should not block infinitely...
*/
void awaitTermination();
}