* @return A DistributedSDFReceiver with the next available ID in the
* listOfIds.
*/
public Receiver newReceiver() {
Integer ID;
DistributedSDFReceiver receiver;
if (!listOfIds.isEmpty()) {
ID = (Integer) listOfIds.getFirst();
listOfIds.removeFirst();
receiver = new DistributedSDFReceiver(ID);
idsReceiversMap.put(ID, receiver);
if (VERBOSE) {
System.out.println("DistributedDirector.Created receiver: "
+ ID);
}
} else {
ID = Integer.valueOf(lastId);
lastId += 1;
receiver = new DistributedSDFReceiver(ID);
}
return receiver;
}