Class SingleLogicalSlot

    • Method Detail

      • getLocality

        public Locality getLocality()
        Description copied from interface: LogicalSlot
        Gets the locality of this slot.
        Specified by:
        getLocality in interface LogicalSlot
        Returns:
        locality of this slot
      • isAlive

        public boolean isAlive()
        Description copied from interface: LogicalSlot
        True if the slot is alive and has not been released.
        Specified by:
        isAlive in interface LogicalSlot
        Returns:
        True if the slot is alive, otherwise false if the slot is released
      • tryAssignPayload

        public boolean tryAssignPayload​(LogicalSlot.Payload payload)
        Description copied from interface: LogicalSlot
        Tries to assign a payload to this slot. One can only assign a single payload once.
        Specified by:
        tryAssignPayload in interface LogicalSlot
        Parameters:
        payload - to be assigned to this slot.
        Returns:
        true if the payload could be assigned, otherwise false
      • releaseSlot

        public CompletableFuture<?> releaseSlot​(@Nullable
                                                Throwable cause)
        Description copied from interface: LogicalSlot
        Releases this slot.
        Specified by:
        releaseSlot in interface LogicalSlot
        Parameters:
        cause - why the slot was released or null if none
        Returns:
        future which is completed once the slot has been released
      • getAllocationId

        public AllocationID getAllocationId()
        Description copied from interface: LogicalSlot
        Gets the allocation id of this slot. Multiple logical slots can share the same allocation id.
        Specified by:
        getAllocationId in interface LogicalSlot
        Returns:
        allocation id of this slot
      • getSlotRequestId

        public SlotRequestId getSlotRequestId()
        Description copied from interface: LogicalSlot
        Gets the slot request id uniquely identifying the request with which this slot has been allocated.
        Specified by:
        getSlotRequestId in interface LogicalSlot
        Returns:
        Unique id identifying the slot request with which this slot was allocated
      • release

        public void release​(Throwable cause)
        A release of the payload by the AllocatedSlot triggers a release of the payload of the logical slot.
        Specified by:
        release in interface PhysicalSlot.Payload
        Parameters:
        cause - of the payload release
      • willOccupySlotIndefinitely

        public boolean willOccupySlotIndefinitely()
        Description copied from interface: PhysicalSlot.Payload
        Returns whether the payload will occupy a physical slot indefinitely.
        Specified by:
        willOccupySlotIndefinitely in interface PhysicalSlot.Payload
        Returns:
        true if the payload will occupy a physical slot indefinitely, otherwise false