use of org.gradle.launcher.daemon.registry.DaemonRegistry in project gradle by gradle.
the class ForegroundDaemonAction method run.
public void run() {
LoggingManagerInternal loggingManager = loggingRegistry.newInstance(LoggingManagerInternal.class);
loggingManager.start();
DaemonServices daemonServices = new DaemonServices(configuration, loggingRegistry, loggingManager, new DefaultClassPath());
Daemon daemon = daemonServices.get(Daemon.class);
DaemonRegistry daemonRegistry = daemonServices.get(DaemonRegistry.class);
DaemonExpirationStrategy expirationStrategy = daemonServices.get(MasterExpirationStrategy.class);
daemon.start();
try {
daemonRegistry.markState(daemon.getAddress(), Idle);
daemon.stopOnExpiration(expirationStrategy, configuration.getPeriodicCheckIntervalMs());
} finally {
daemon.stop();
}
}
Aggregations