Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Enrichment Service
[nonrtric.git]
/
enrichment-coordinator-service
/
src
/
main
/
java
/
org
/
oransc
/
enrichment
/
repository
/
EiTypes.java
diff --git
a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java
b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java
index
7668ff1
..
5454e8a
100644
(file)
--- a/
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java
+++ b/
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java
@@
-34,7
+34,7
@@
public class EiTypes {
Map<String, EiType> allEiTypes = new HashMap<>();
public synchronized void put(EiType type) {
Map<String, EiType> allEiTypes = new HashMap<>();
public synchronized void put(EiType type) {
- allEiTypes.put(type.
i
d(), type);
+ allEiTypes.put(type.
getI
d(), type);
}
public synchronized Collection<EiType> getAllEiTypes() {
}
public synchronized Collection<EiType> getAllEiTypes() {
@@
-44,7
+44,7
@@
public class EiTypes {
public synchronized EiType getType(String id) throws ServiceException {
EiType type = allEiTypes.get(id);
if (type == null) {
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;
}
}
return type;
}
@@
-57,6
+57,10
@@
public class EiTypes {
allEiTypes.remove(id);
}
allEiTypes.remove(id);
}
+ public synchronized void remove(EiType type) {
+ this.remove(type.getId());
+ }
+
public synchronized int size() {
return allEiTypes.size();
}
public synchronized int size() {
return allEiTypes.size();
}