public void stop() {
    for (PageSubscription cursor : activeCursors.values()) {
      cursor.stop();
    }

    waitForFuture();
  }
  public void stop() {
    for (PageSubscription cursor : activeCursors.values()) {
      cursor.stop();
    }

    Future future = new Future();

    executor.execute(future);

    while (!future.await(10000)) {
      log.warn("Waiting cursor provider " + this + " to finish executors" + executor);
    }
  }