Search in sources :

Example 1 with Filters

use of org.apache.mesos.v1.Protos.Filters in project Singularity by HubSpot.

the class SingularityMesosSchedulerClient method accept.

public void accept(List<OfferID> offerIds, List<Offer.Operation> offerOperations, Filters filters) {
    Builder accept = build().setAccept(Accept.newBuilder().addAllOfferIds(offerIds).addAllOperations(offerOperations).setFilters(filters));
    sendCall(accept, Type.ACCEPT);
}
Also used : MesosClientBuilder(com.mesosphere.mesos.rx.java.MesosClientBuilder) ProtobufMesosClientBuilder(com.mesosphere.mesos.rx.java.protobuf.ProtobufMesosClientBuilder) Builder(org.apache.mesos.v1.scheduler.Protos.Call.Builder)

Example 2 with Filters

use of org.apache.mesos.v1.Protos.Filters in project Singularity by HubSpot.

the class SingularityMesosSchedulerClient method revive.

/**
 * Sent by the scheduler to remove any/all filters that it has previously set via ACCEPT or DECLINE calls.
 */
public void revive() {
    Builder revive = build();
    sendCall(revive, Type.REVIVE);
}
Also used : MesosClientBuilder(com.mesosphere.mesos.rx.java.MesosClientBuilder) ProtobufMesosClientBuilder(com.mesosphere.mesos.rx.java.protobuf.ProtobufMesosClientBuilder) Builder(org.apache.mesos.v1.scheduler.Protos.Call.Builder)

Example 3 with Filters

use of org.apache.mesos.v1.Protos.Filters in project Singularity by HubSpot.

the class SingularityMesosSchedulerClient method decline.

public void decline(List<OfferID> offerIds, Filters filters) {
    Builder decline = build().setDecline(Decline.newBuilder().addAllOfferIds(offerIds).setFilters(filters));
    sendCall(decline, Type.DECLINE);
}
Also used : MesosClientBuilder(com.mesosphere.mesos.rx.java.MesosClientBuilder) ProtobufMesosClientBuilder(com.mesosphere.mesos.rx.java.protobuf.ProtobufMesosClientBuilder) Builder(org.apache.mesos.v1.scheduler.Protos.Call.Builder)

Aggregations

MesosClientBuilder (com.mesosphere.mesos.rx.java.MesosClientBuilder)3 ProtobufMesosClientBuilder (com.mesosphere.mesos.rx.java.protobuf.ProtobufMesosClientBuilder)3 Builder (org.apache.mesos.v1.scheduler.Protos.Call.Builder)3