public class Session
extends java.lang.Object
This class should only be used by MesosApi.
| Constructor and Description |
|---|
Session(akka.stream.javadsl.SourceQueueWithComplete<com.mesosphere.usi.core.models.commands.SchedulerCommand> commands) |
| Modifier and Type | Method and Description |
|---|---|
static Session |
create(org.apache.mesos.v1.Protos.FrameworkInfo frameworkInfo,
com.mesosphere.mesos.conf.MesosClientSettings clientSettings,
java.util.Optional<com.mesosphere.mesos.client.CredentialsProvider> provider,
com.mesosphere.usi.core.conf.SchedulerSettings schedulerSettings,
com.mesosphere.usi.repository.PodRecordRepository repository,
Settings operationalSettings,
java.util.function.Consumer<com.mesosphere.usi.core.models.StateEventOrSnapshot> eventHandler,
java.util.function.BiFunction<akka.Done,java.lang.Throwable,akka.Done> terminationHandler,
scala.concurrent.ExecutionContext context,
akka.actor.ActorSystem system,
akka.stream.ActorMaterializer materializer) |
akka.stream.javadsl.SourceQueueWithComplete<com.mesosphere.usi.core.models.commands.SchedulerCommand> |
getCommands() |
static akka.japi.Pair<akka.stream.javadsl.SourceQueueWithComplete<com.mesosphere.usi.core.models.commands.SchedulerCommand>,java.util.concurrent.CompletionStage<akka.Done>> |
runScheduler(Settings operationalSettings,
akka.stream.javadsl.Flow<com.mesosphere.usi.core.models.commands.SchedulerCommand,com.mesosphere.usi.core.models.StateEvent,akka.NotUsed> schedulerFlow,
java.util.function.Consumer<com.mesosphere.usi.core.models.StateEventOrSnapshot> eventHandler,
akka.stream.ActorMaterializer materializer)
Constructs a queue of
SchedulerCommand. |
public Session(akka.stream.javadsl.SourceQueueWithComplete<com.mesosphere.usi.core.models.commands.SchedulerCommand> commands)
public static Session create(org.apache.mesos.v1.Protos.FrameworkInfo frameworkInfo, com.mesosphere.mesos.conf.MesosClientSettings clientSettings, java.util.Optional<com.mesosphere.mesos.client.CredentialsProvider> provider, com.mesosphere.usi.core.conf.SchedulerSettings schedulerSettings, com.mesosphere.usi.repository.PodRecordRepository repository, Settings operationalSettings, java.util.function.Consumer<com.mesosphere.usi.core.models.StateEventOrSnapshot> eventHandler, java.util.function.BiFunction<akka.Done,java.lang.Throwable,akka.Done> terminationHandler, scala.concurrent.ExecutionContext context, akka.actor.ActorSystem system, akka.stream.ActorMaterializer materializer)
public static akka.japi.Pair<akka.stream.javadsl.SourceQueueWithComplete<com.mesosphere.usi.core.models.commands.SchedulerCommand>,java.util.concurrent.CompletionStage<akka.Done>> runScheduler(Settings operationalSettings, akka.stream.javadsl.Flow<com.mesosphere.usi.core.models.commands.SchedulerCommand,com.mesosphere.usi.core.models.StateEvent,akka.NotUsed> schedulerFlow, java.util.function.Consumer<com.mesosphere.usi.core.models.StateEventOrSnapshot> eventHandler, akka.stream.ActorMaterializer materializer)
SchedulerCommand. All state events are processed by MesosApi.updateState(StateEventOrSnapshot).schedulerFlow - The scheduler flow from commands to events provided by USI.materializer - The ActorMaterializer used for the source queue.public akka.stream.javadsl.SourceQueueWithComplete<com.mesosphere.usi.core.models.commands.SchedulerCommand> getCommands()