public class SingleLogicalSlot extends Object implements LogicalSlot, PhysicalSlot.Payload
LogicalSlot.LogicalSlot.PayloadTERMINATED_PAYLOAD| 构造器和说明 |
|---|
SingleLogicalSlot(SlotRequestId slotRequestId,
SlotContext slotContext,
Locality locality,
SlotOwner slotOwner) |
SingleLogicalSlot(SlotRequestId slotRequestId,
SlotContext slotContext,
Locality locality,
SlotOwner slotOwner,
boolean willBeOccupiedIndefinitely) |
| 限定符和类型 | 方法和说明 |
|---|---|
static SingleLogicalSlot |
allocateFromPhysicalSlot(SlotRequestId slotRequestId,
PhysicalSlot physicalSlot,
Locality locality,
SlotOwner slotOwner,
boolean slotWillBeOccupiedIndefinitely) |
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.
|
SlotRequestId |
getSlotRequestId()
Gets the slot request id uniquely identifying the request with which this slot has been
allocated.
|
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.
|
boolean |
willOccupySlotIndefinitely()
Returns whether the payload will occupy a physical slot indefinitely.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseSlot@VisibleForTesting public SingleLogicalSlot(SlotRequestId slotRequestId, SlotContext slotContext, Locality locality, SlotOwner slotOwner)
public SingleLogicalSlot(SlotRequestId slotRequestId, SlotContext slotContext, Locality locality, SlotOwner slotOwner, boolean willBeOccupiedIndefinitely)
public TaskManagerLocation getTaskManagerLocation()
LogicalSlotgetTaskManagerLocation 在接口中 LogicalSlotpublic TaskManagerGateway getTaskManagerGateway()
LogicalSlotgetTaskManagerGateway 在接口中 LogicalSlotpublic Locality getLocality()
LogicalSlotgetLocality 在接口中 LogicalSlotpublic boolean isAlive()
LogicalSlotisAlive 在接口中 LogicalSlotpublic boolean tryAssignPayload(LogicalSlot.Payload payload)
LogicalSlottryAssignPayload 在接口中 LogicalSlotpayload - to be assigned to this slot.@Nullable public LogicalSlot.Payload getPayload()
LogicalSlotgetPayload 在接口中 LogicalSlotpublic CompletableFuture<?> releaseSlot(@Nullable Throwable cause)
LogicalSlotreleaseSlot 在接口中 LogicalSlotcause - why the slot was released or null if nonepublic AllocationID getAllocationId()
LogicalSlotgetAllocationId 在接口中 LogicalSlotpublic SlotRequestId getSlotRequestId()
LogicalSlotgetSlotRequestId 在接口中 LogicalSlotpublic static SingleLogicalSlot allocateFromPhysicalSlot(SlotRequestId slotRequestId, PhysicalSlot physicalSlot, Locality locality, SlotOwner slotOwner, boolean slotWillBeOccupiedIndefinitely)
public void release(Throwable cause)
AllocatedSlot triggers a release of the payload of
the logical slot.release 在接口中 PhysicalSlot.Payloadcause - of the payload releasepublic boolean willOccupySlotIndefinitely()
PhysicalSlot.PayloadwillOccupySlotIndefinitely 在接口中 PhysicalSlot.PayloadCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.