@Override
 public void onRefreshSettings(Settings settings) {
   TimeValue snapshotInterval =
       settings.getAsTime(
           INDEX_GATEWAY_SNAPSHOT_INTERVAL, IndexShardGatewayService.this.snapshotInterval);
   if (!snapshotInterval.equals(IndexShardGatewayService.this.snapshotInterval)) {
     logger.info(
         "updating snapshot_interval from [{}] to [{}]",
         IndexShardGatewayService.this.snapshotInterval,
         snapshotInterval);
     IndexShardGatewayService.this.snapshotInterval = snapshotInterval;
     if (snapshotScheduleFuture != null) {
       snapshotScheduleFuture.cancel(false);
       snapshotScheduleFuture = null;
     }
     scheduleSnapshotIfNeeded();
   }
 }