public SlotOffer generateSlotOffer ( ) { Preconditions . checkState ( TaskSlotState . ACTIVE == state || TaskSlotState . ALLOCATED == state , "The task slot is not in state active or allocated." ) ; Preconditions . checkState ( allocationId != null , "The task slot are not allocated" ) ; return new SlotOffer ( allocationId , index , resourceProfile ) ; }
Generate the slot offer from this TaskSlot .