public class SingleLogicalSlot extends Object implements LogicalSlot, PhysicalSlot.Payload
LogicalSlot which is used by the SlotPoolImpl.LogicalSlot.PayloadTERMINATED_PAYLOAD| Constructor and Description |
|---|
SingleLogicalSlot(SlotRequestId slotRequestId,
SlotContext slotContext,
SlotSharingGroupId slotSharingGroupId,
Locality locality,
SlotOwner slotOwner) |
| Modifier and Type | Method and Description |
|---|---|
AllocationID |
getAllocationId()
Gets the allocation id of this slot.
|
Locality |
getLocality()
Gets the locality of this slot.
|
LogicalSlot.Payload |
getPayload()
Returns the set payload or null if none.
|
int |
getPhysicalSlotNumber()
Gets the slot number on the TaskManager.
|
SlotRequestId |
getSlotRequestId()
Gets the slot request id uniquely identifying the request with which this
slot has been allocated.
|
SlotSharingGroupId |
getSlotSharingGroupId()
Gets the slot sharing group id to which this slot belongs.
|
TaskManagerGateway |
getTaskManagerGateway()
Return the TaskManager gateway to talk to the TaskManager.
|
TaskManagerLocation |
getTaskManagerLocation()
Return the TaskManager location of this slot.
|
boolean |
isAlive()
True if the slot is alive and has not been released.
|
void |
release(Throwable cause)
A release of the payload by the
AllocatedSlot triggers a release of the payload of
the logical slot. |
CompletableFuture<?> |
releaseSlot(Throwable cause)
Releases this slot.
|
boolean |
tryAssignPayload(LogicalSlot.Payload payload)
Tries to assign a payload to this slot.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseSlotpublic SingleLogicalSlot(SlotRequestId slotRequestId, SlotContext slotContext, @Nullable SlotSharingGroupId slotSharingGroupId, Locality locality, SlotOwner slotOwner)
public TaskManagerLocation getTaskManagerLocation()
LogicalSlotgetTaskManagerLocation in interface LogicalSlotpublic TaskManagerGateway getTaskManagerGateway()
LogicalSlotgetTaskManagerGateway in interface LogicalSlotpublic Locality getLocality()
LogicalSlotgetLocality in interface LogicalSlotpublic boolean isAlive()
LogicalSlotisAlive in interface LogicalSlotpublic boolean tryAssignPayload(LogicalSlot.Payload payload)
LogicalSlottryAssignPayload in interface LogicalSlotpayload - to be assigned to this slot.@Nullable public LogicalSlot.Payload getPayload()
LogicalSlotgetPayload in interface LogicalSlotpublic CompletableFuture<?> releaseSlot(@Nullable Throwable cause)
LogicalSlotreleaseSlot in interface LogicalSlotcause - why the slot was released or null if nonepublic int getPhysicalSlotNumber()
LogicalSlotgetPhysicalSlotNumber in interface LogicalSlotpublic AllocationID getAllocationId()
LogicalSlotgetAllocationId in interface LogicalSlotpublic SlotRequestId getSlotRequestId()
LogicalSlotgetSlotRequestId in interface LogicalSlot@Nullable public SlotSharingGroupId getSlotSharingGroupId()
LogicalSlotgetSlotSharingGroupId in interface LogicalSlotpublic void release(Throwable cause)
AllocatedSlot triggers a release of the payload of
the logical slot.release in interface PhysicalSlot.Payloadcause - of the payload releaseCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.