mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
Reimplement restarting of scm-manager
SCM-Manager tries now to figure out which is the best strategy for the restart. It chooses from one of the following strategies: * PosixRestartStrategy which uses native LibC * ExitRestartStrategy uses System.exit and relies on external mechanism to start again * InjectionContextRestartStrategy destroys and re initializes the injection context
This commit is contained in:
@@ -10,9 +10,11 @@ import sonia.scm.event.ShutdownEventBusEvent;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
/**
|
||||
* Restart strategy implementation which destroy the injection context and re initialize it.
|
||||
* Restart strategy which tries to free, every resource used by the context, starts gc and re initializes the context.
|
||||
*/
|
||||
public class InjectionContextRestartStrategy implements RestartStrategy {
|
||||
class InjectionContextRestartStrategy implements RestartStrategy {
|
||||
|
||||
static final String NAME = "context";
|
||||
|
||||
private static final String DISABLE_RESTART_PROPERTY = "sonia.scm.restart.disable";
|
||||
private static final String WAIT_PROPERTY = "sonia.scm.restart.wait";
|
||||
|
||||
Reference in New Issue
Block a user