class UDCService extends AbstractLifecycleComponent {

    private static final Logger LOGGER = LogManager.getLogger(UDCService.class);

    public static final Setting<Boolean> UDC_ENABLED_SETTING = Setting.boolSetting(
        "udc.enabled", true, Property.NodeScope, Property.Exposed);

    // Explicit generic is required for eclipse JDT, otherwise it won't compile
    public static final Setting<String> UDC_URL_SETTING = new Setting<>(
        "udc.url", "https://udc.crate.io/",
        Function.identity(), DataTypes.STRING, Property.NodeScope, Property.Exposed);

    public static final Setting<TimeValue> UDC_INITIAL_DELAY_SETTING = Setting.positiveTimeSetting(
        "udc.initial_delay", new TimeValue(10, TimeUnit.MINUTES),
        Property.NodeScope,
        Property.Exposed);

    public static final Setting<TimeValue> UDC_INTERVAL_SETTING = Setting.positiveTimeSetting(
        "udc.interval", new TimeValue(24, TimeUnit.HOURS),
        Property.NodeScope,
        Property.Exposed
    );

    private final Timer timer;

    private final ClusterService clusterService;
    private final ExtendedNodeInfo extendedNodeInfo;
    private final Settings settings;

    @Inject
    public UDCService(Settings settings,
                      ExtendedNodeInfo extendedNodeInfo,
                      ClusterService clusterService) {
        this.settings = settings;
        this.extendedNodeInfo = extendedNodeInfo;
        this.clusterService = clusterService;
        this.timer = new Timer("crate-udc");
    }

    @Override
    protected void doStart() throws ElasticsearchException {<FILL_FUNCTION_BODY>}

    @Override
    protected void doStop() throws ElasticsearchException {
        timer.cancel();
    }

    @Override
    protected void doClose() throws ElasticsearchException {
        timer.cancel(); // safety net, in case of unlikely weirdness
    }
}

        String url = UDC_URL_SETTING.get(settings);
        TimeValue initialDelay = UDC_INITIAL_DELAY_SETTING.get(settings);
        TimeValue interval = UDC_INTERVAL_SETTING.get(settings);

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Starting with delay {} and period {}.", initialDelay.seconds(), interval.seconds());
        }
        PingTask pingTask = new PingTask(clusterService, extendedNodeInfo, url);
        timer.scheduleAtFixedRate(pingTask, initialDelay.millis(), interval.millis());
    
<methods>public void addLifecycleListener(org.elasticsearch.common.component.LifecycleListener) ,public void close() ,public org.elasticsearch.common.component.Lifecycle.State lifecycleState() ,public void removeLifecycleListener(org.elasticsearch.common.component.LifecycleListener) ,public void start() ,public void stop() <variables>protected final org.elasticsearch.common.component.Lifecycle lifecycle,private final List<org.elasticsearch.common.component.LifecycleListener> listeners