Skip to content

Commit

Permalink
changing cache in MethodPool from LinkedList to HashMap
Browse files Browse the repository at this point in the history
  • Loading branch information
bseiller committed May 14, 2018
1 parent e134c27 commit 0c136fd
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class MethodPool {
private final ReadWriteLock readWriteLock;

private MethodPool() {
// could also be a ConcurrentHashMap, could probably make readWriteLock obsolete, but might influence performance negatively
availableMethods = new HashMap<>();

Stream.of(KnownResponseResultMethod.values()).forEach(knownResponseResultMethod -> availableMethods.put(knownResponseResultMethod.getIdentifier(), knownResponseResultMethod));
Expand Down

0 comments on commit 0c136fd

Please sign in to comment.