public List < WorkerSlot > getAvailableSlots ( SupervisorDetails supervisor ) { Set < Integer > ports = this . getAvailablePorts ( supervisor ) ; List < WorkerSlot > slots = new ArrayList <> ( ports . size ( ) ) ; for ( Integer port : ports ) { slots . add ( new WorkerSlot ( supervisor . getId ( ) , port ) ) ; } return slots ; }
Return all the available slots on this supervisor .