Skip to content

ExecutorPodsSnapshotsStoreImpl

ExecutorPodsSnapshotsStoreImpl is an ExecutorPodsSnapshotsStore.

Creating Instance

ExecutorPodsSnapshotsStoreImpl takes the following to be created:

ExecutorPodsSnapshotsStoreImpl is created when:

replaceSnapshot

replaceSnapshot(
  newSnapshot: Seq[Pod]): Unit

replaceSnapshot is part of the ExecutorPodsSnapshotsStore abstraction.

replaceSnapshot...FIXME

updatePod

updatePod(
  updatedPod: Pod): Unit

updatePod is part of the ExecutorPodsSnapshotsStore abstraction.

updatePod...FIXME

Registering Subscriber

addSubscriber(
  processBatchIntervalMillis: Long)
  (onNewSnapshots: Seq[ExecutorPodsSnapshot] => Unit): Unit

addSubscriber is part of the ExecutorPodsSnapshotsStore abstraction.

addSubscriber adds a new SnapshotsSubscriber to the subscribers internal registry.

addSubscriber requests the ScheduledExecutorService to schedule processing executor pods by the SnapshotsSubscriber every given processBatchIntervalMillis delay (starting immediately).

In the end, addSubscriber adds the scheduled action to the pollingTasks internal registry.

callSubscriber

callSubscriber(
  subscriber: SnapshotsSubscriber): Unit

callSubscriber...FIXME

callSubscriber is used when:

pollingTasks Registry

pollingTasks: CopyOnWriteArrayList[Future[_]]

ExecutorPodsSnapshotsStoreImpl uses pollingTasks internal registry to track the recurring actions scheduled for subscribers.

pollingTasks are cancelled when ExecutorPodsSnapshotsStoreImpl is requested to stop.

subscribers Registry

subscribers: CopyOnWriteArrayList[SnapshotsSubscriber]

ExecutorPodsSnapshotsStoreImpl uses subscribers internal registry to track subscribers that want to be notified regularly about the current state of executor pods in a cluster.

addCurrentSnapshotToSubscribers

addCurrentSnapshotToSubscribers(): Unit

addCurrentSnapshotToSubscribers takes the subscribers and...FIXME

addCurrentSnapshotToSubscribers is used when:


Last update: 2021-01-06