Map<String, EiType> allEiTypes = new HashMap<>();
public synchronized void put(EiType type) {
- allEiTypes.put(type.id(), type);
+ allEiTypes.put(type.getId(), type);
}
public synchronized Collection<EiType> getAllEiTypes() {
public synchronized EiType getType(String id) throws ServiceException {
EiType type = allEiTypes.get(id);
if (type == null) {
- throw new ServiceException("Could not find EI Job: " + id);
+ throw new ServiceException("Could not find EI type: " + id);
}
return type;
}
allEiTypes.remove(id);
}
+ public synchronized void remove(EiType type) {
+ this.remove(type.getId());
+ }
+
public synchronized int size() {
return allEiTypes.size();
}