Interface LogicalSlot
- All Known Implementing Classes:
SingleLogicalSlot
public interface LogicalSlot
A logical slot represents a resource on a TaskManager into which a single task can be deployed.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacePayload for a logical slot. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGets the allocation id of this slot.Gets the locality of this slot.Returns the set payload or null if none.Gets the slot request id uniquely identifying the request with which this slot has been allocated.Return the TaskManager gateway to talk to the TaskManager.Return the TaskManager location of this slot.booleanisAlive()True if the slot is alive and has not been released.default CompletableFuture<?>Deprecated.Added because extended the actual releaseSlot method with cause parameter.releaseSlot(Throwable cause) Releases this slot.booleantryAssignPayload(LogicalSlot.Payload payload) Tries to assign a payload to this slot.
-
Field Details
-
TERMINATED_PAYLOAD
-
-
Method Details
-
getTaskManagerLocation
TaskManagerLocation getTaskManagerLocation()Return the TaskManager location of this slot.- Returns:
- TaskManager location of this slot
-
getTaskManagerGateway
TaskManagerGateway getTaskManagerGateway()Return the TaskManager gateway to talk to the TaskManager.- Returns:
- TaskManager gateway to talk to the TaskManager
-
getLocality
Locality getLocality()Gets the locality of this slot.- Returns:
- locality of this slot
-
isAlive
boolean isAlive()True if the slot is alive and has not been released.- Returns:
- True if the slot is alive, otherwise false if the slot is released
-
tryAssignPayload
Tries to assign a payload to this slot. One can only assign a single payload once.- Parameters:
payload- to be assigned to this slot.- Returns:
- true if the payload could be assigned, otherwise false
-
getPayload
Returns the set payload or null if none.- Returns:
- Payload of this slot of null if none
-
releaseSlot
Deprecated.Added because extended the actual releaseSlot method with cause parameter.Releases this slot.- Returns:
- Future which is completed once the slot has been released, in case of a failure it is completed exceptionally
-
releaseSlot
Releases this slot.- Parameters:
cause- why the slot was released or null if none- Returns:
- future which is completed once the slot has been released
-
getAllocationId
AllocationID getAllocationId()Gets the allocation id of this slot. Multiple logical slots can share the same allocation id.- Returns:
- allocation id of this slot
-
getSlotRequestId
SlotRequestId getSlotRequestId()Gets the slot request id uniquely identifying the request with which this slot has been allocated.- Returns:
- Unique id identifying the slot request with which this slot was allocated
-