Package org.opentcs.components.kernel
Schnittstelle Scheduler.Client
- Umschließende Schnittstelle:
Scheduler
public static interface Scheduler.Client
Defines callback methods for clients of the resource scheduler.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
allocationFailed
(Set<TCSResource<?>> resources) Called if it was impossible to allocate a requested set of resources for this client.boolean
allocationSuccessful
(Set<TCSResource<?>> resources) Called when resources have been reserved for this client.getId()
Returns an ID string for this client.Returns a reference to theVehicle
that this client is related to.
-
Methodendetails
-
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
Returns a reference to theVehicle
that this client is related to. -
allocationSuccessful
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 offalse
indicates this client does not need the given resources (any more), freeing them implicitly, but not restoring any previous claim.
-
allocationFailed
Called if it was impossible to allocate a requested set of resources for this client.- Parameter:
resources
- The resources which could not be reserved.
-