public class AuxLabelAccess
extends java.lang.Object
Protos.TaskInfo
.
If you're accessing labels in Protos.TaskInfo
s, you should be using TaskLabelReader
and/or
TaskLabelWriter
.Modifier and Type | Method and Description |
---|---|
static java.util.Optional<java.lang.String> |
getResourceId(Protos.Resource.ReservationInfo reservation) |
static java.util.Collection<EndpointUtils.VipInfo> |
getVIPsFromLabels(java.lang.String taskName,
Protos.Port port)
Returns the VIP information, if any, within the provided
Protos.Port . |
static void |
setDcosSpace(Protos.ExecutorInfo.Builder executorInfoBuilder,
java.lang.String dcosSpace) |
static void |
setNetworkLabels(Protos.NetworkInfo.Builder networkInfoBuilder,
java.util.Map<java.lang.String,java.lang.String> labels) |
static void |
setResourceId(Protos.Resource.ReservationInfo.Builder reservationBuilder,
java.lang.String resourceId) |
static void |
setVIPLabels(Protos.Port.Builder portBuilder,
NamedVIPSpec namedVIPSpec)
Updates the provided
Protos.Port to contain the provided VIP information. |
public static void setResourceId(Protos.Resource.ReservationInfo.Builder reservationBuilder, java.lang.String resourceId)
public static java.util.Optional<java.lang.String> getResourceId(Protos.Resource.ReservationInfo reservation)
public static void setDcosSpace(Protos.ExecutorInfo.Builder executorInfoBuilder, java.lang.String dcosSpace)
public static void setNetworkLabels(Protos.NetworkInfo.Builder networkInfoBuilder, java.util.Map<java.lang.String,java.lang.String> labels)
public static void setVIPLabels(Protos.Port.Builder portBuilder, NamedVIPSpec namedVIPSpec)
Protos.Port
to contain the provided VIP information.
This is the inverse of #getVIPsFromLabels(String, org.apache.mesos.Protos.Port)
.public static java.util.Collection<EndpointUtils.VipInfo> getVIPsFromLabels(java.lang.String taskName, Protos.Port port)
Protos.Port
.
This is the inverse of #setVIPLabels(org.apache.mesos.Protos.Port.Builder, NamedVIPSpec)
.