public class ClusterState
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addLaunchedPod(LaunchedPod pod)
Adds the provided pod to the list of launched pods.
|
void |
addSentOffer(Protos.Offer offer)
Adds the provided offer to the list of sent offers.
|
static ClusterState |
create(ServiceSpec serviceSpec,
AbstractScheduler scheduler) |
LaunchedPod |
getLastLaunchedPod()
Returns the last pod to be launched, regardless of the pod's name.
|
LaunchedPod |
getLastLaunchedPod(java.lang.String podName)
Returns the last pod to be launched with the specified name.
|
LaunchedTask |
getLastLaunchedTask(java.lang.String taskName)
Returns the last task launched with the specified name.
|
Protos.Offer |
getLastOffer()
Returns the last offer to have been sent.
|
java.util.Collection<Plan> |
getPlans()
Returns the scheduler's current plans.
|
java.util.Collection<java.lang.Object> |
getResources() |
ServiceSpec |
getServiceSpec()
Returns the rendered scheduler/service configuration.
|
Protos.TaskID |
getTaskId(java.lang.String taskName)
Returns the last task id for a task of the specified name.
|
static ClusterState |
withUpdatedConfig(ClusterState clusterState,
ServiceSpec serviceSpec,
AbstractScheduler scheduler) |
public static ClusterState create(ServiceSpec serviceSpec, AbstractScheduler scheduler)
public static ClusterState withUpdatedConfig(ClusterState clusterState, ServiceSpec serviceSpec, AbstractScheduler scheduler)
public ServiceSpec getServiceSpec()
public java.util.Collection<Plan> getPlans()
public java.util.Collection<java.lang.Object> getResources()
public void addSentOffer(Protos.Offer offer)
public Protos.Offer getLastOffer()
#addSentOffer(org.apache.mesos.Protos.Offer)
java.lang.IllegalStateException
- if no pods had been sentpublic void addLaunchedPod(LaunchedPod pod)
public LaunchedPod getLastLaunchedPod()
#addLaunchedPod(Collection)
java.lang.IllegalStateException
- if no pods had been launchedgetLastLaunchedPod(String)
public LaunchedPod getLastLaunchedPod(java.lang.String podName)
podName
- name+index of the pod, of the form "podtype-#"java.lang.IllegalStateException
- if no such pod was foundgetLastLaunchedPod()
public LaunchedTask getLastLaunchedTask(java.lang.String taskName)
taskName
- the task name to be foundjava.lang.IllegalStateException
- if no such task was foundpublic Protos.TaskID getTaskId(java.lang.String taskName)
taskName
- the task name to be foundjava.lang.IllegalStateException
- if no such task was found