Interface Scheduler.Client

All Known Subinterfaces:
VehicleController
Enclosing interface:
Scheduler

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

    Modifier and Type Method Description
    void allocationFailed​(java.util.Set<TCSResource<?>> resources)
    Called if it was impossible to allocate a requested set of resources for this client.
    boolean allocationSuccessful​(java.util.Set<TCSResource<?>> resources)
    Called when resources have been reserved for this client.
    java.lang.String getId()
    Returns an ID string for this client.
  • Method Details

    • getId

      @Nonnull java.lang.String getId()
      Returns an ID string for this client. The returned string should be unique among all clients in the system.
      Returns:
      An unique ID string for this client.
    • allocationSuccessful

      boolean allocationSuccessful​(@Nonnull java.util.Set<TCSResource<?>> resources)
      Called when resources have been reserved for this client.
      Parameters:
      resources - The resources reserved.
      Returns:
      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.
    • allocationFailed

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