package com.twitter.heron.statemgr;

import java.util.Map;

import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;

import com.twitter.heron.api.generated.TopologyAPI;
import com.twitter.heron.proto.scheduler.Scheduler;
import com.twitter.heron.proto.system.ExecutionEnvironment;
import com.twitter.heron.proto.system.PhysicalPlans;
import com.twitter.heron.proto.tmaster.TopologyMaster;
import com.twitter.heron.spi.common.Config;
import com.twitter.heron.spi.statemgr.IStateManager;
import com.twitter.heron.spi.statemgr.WatchCallback;

@SuppressWarnings("unchecked")
public class NullStateManager implements IStateManager {
  public SettableFuture nullFuture = SettableFuture.create();

  @Override
  public void initialize(Config config) {
    nullFuture.set(null);
  }

  @Override
  public void close() {

  }

  @Override
  public ListenableFuture<Boolean> isTopologyRunning(String topologyName) {
    return null;
  }

  @Override
  public ListenableFuture<Boolean> setTMasterLocation(TopologyMaster.TMasterLocation location, String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> setExecutionState(ExecutionEnvironment.ExecutionState executionState, String
      topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> setTopology(TopologyAPI.Topology topology, String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> setPhysicalPlan(PhysicalPlans.PhysicalPlan physicalPlan, String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> setSchedulerLocation(Scheduler.SchedulerLocation location, String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> deleteTMasterLocation(String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> deleteExecutionState(String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> deleteTopology(String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> deletePhysicalPlan(String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<Boolean> deleteSchedulerLocation(String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<TopologyMaster.TMasterLocation> getTMasterLocation(WatchCallback watcher, String
      topologyName) {

    return nullFuture;
  }

  @Override
  public ListenableFuture<Scheduler.SchedulerLocation> getSchedulerLocation(WatchCallback watcher, String
      topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<TopologyAPI.Topology> getTopology(WatchCallback watcher, String topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<ExecutionEnvironment.ExecutionState> getExecutionState(WatchCallback watcher, String
      topologyName) {
    return nullFuture;
  }

  @Override
  public ListenableFuture<PhysicalPlans.PhysicalPlan> getPhysicalPlan(WatchCallback watcher, String topologyName) {
    return nullFuture;
  }
}

@@ -30,16 +30,39 @@
 temgr;%0A%0A
+import java.util.List;%0A
 import j
@@ -3029,32 +3029,167 @@
 ullFuture;%0A  %7D%0A%0A
+  @Override%0A  public ListenableFuture%3CList%3CExecutionEnvironment.ExecutionState%3E%3E getAllExecutionStates() %7B%0A    return nullFuture;%0A  %7D%0A%0A
   @Override%0A  pu

fix compilation of NullStateManager by adding the getAllExecutionStates method