public Future execute()

in archaius2-core/src/main/java/com/netflix/archaius/config/polling/FixedPollingStrategy.java [45:72]


    public Future<?> execute(final Runnable callback) {
        while (true) {
            try {
                callback.run();
                break;
            } 
            catch (Exception e) {
                try {
                    LOG.warn("Fail to poll the polling source", e);
                    units.sleep(interval);
                } 
                catch (InterruptedException e1) {
                    Thread.currentThread().interrupt();
                    return Futures.immediateFailure(e);
                }
            }
        }
        return executor.scheduleWithFixedDelay(new Runnable() {
            @Override
            public void run() {
                try {
                    callback.run();
                } catch (Exception e) {
                    LOG.warn("Failed to load properties", e);
                }
            }
        }, interval, interval, units);
    }