Schnittstelle Scheduler.Client

Umschließende Schnittstelle:
Scheduler

public static interface Scheduler.Client
Defines callback methods for clients of the resource scheduler.
  • Methodendetails

    • getId

      @Nonnull String getId()
      Returns an ID string for this client. The returned string should be unique among all clients in the system.
      Gibt zurück:
      An unique ID string for this client.
    • getRelatedVehicle

      @Nullable TCSObjectReference<Vehicle> getRelatedVehicle()
      Returns a reference to the Vehicle that this client is related to.
      Gibt zurück:
      A reference to the Vehicle that this client is related to or null, if this client is not related to any Vehicle.
    • allocationSuccessful

      boolean allocationSuccessful(@Nonnull Set<TCSResource<?>> resources)
      Called when resources have been reserved for this client.
      Parameter:
      resources - The resources reserved.
      Gibt zurück:
      true if, and only if, this client accepts the resources allocated. A return value of false indicates this client does not need the given resources (any more), freeing them implicitly, but not restoring any previous claim.
    • allocationFailed

      void allocationFailed(@Nonnull Set<TCSResource<?>> resources)
      Called if it was impossible to allocate a requested set of resources for this client.
      Parameter:
      resources - The resources which could not be reserved.