private Builder autorestart(String __value) { return autorestart(Boolean.valueOf(__value)); }
private Builder autostart(String __value) { return autostart(Boolean.valueOf(__value)); }
private void setPreShutdownCommand(SentinelConfig.Service.Builder serviceBuilder, Service service) { if (service.getPreShutdownCommand().isPresent()) { serviceBuilder.preShutdownCommand(service.getPreShutdownCommand().get()); } }
private Builder override(Builder __superior) { if (__superior.command != null) command(__superior.command); if (__superior.preShutdownCommand != null) preShutdownCommand(__superior.preShutdownCommand); if (__superior.name != null) name(__superior.name); if (__superior.autostart != null) autostart(__superior.autostart); if (__superior.autorestart != null) autorestart(__superior.autorestart); if (__superior.id != null) id(__superior.id); affinity(affinity.override(__superior.affinity)); return this; }
public Builder(SentinelConfig config) { port(new Port.Builder(config.port())); application(new Application.Builder(config.application())); for (Service s : config.service()) { service(new Service.Builder(s)); } }
public Builder(Service config) { command(config.command()); preShutdownCommand(config.preShutdownCommand()); name(config.name()); autostart(config.autostart()); autorestart(config.autorestart()); id(config.id()); affinity(new Affinity.Builder(config.affinity())); }
private SentinelConfig.Service.Builder getServiceConfig(Service s) { SentinelConfig.Service.Builder serviceBuilder = new SentinelConfig.Service.Builder(); serviceBuilder.command(s.getStartupCommand()); serviceBuilder.name(s.getServiceName()); serviceBuilder.autostart(s.getAutostartFlag()); serviceBuilder.autorestart(s.getAutorestartFlag()); serviceBuilder.id(s.getConfigId()); serviceBuilder.affinity(getServiceAffinity(s)); setPreShutdownCommand(serviceBuilder, s); return serviceBuilder; }