Class MethodMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<Method,InvocationInfo>
Method objects.
Doing a method lookup, even on an unsynchronized Map, can be an expensive operation, in many cases taking multiple microseconds. In most situations this overhead is negligible, but it can be noticeable when performed in the common path of a local ejb invocation, where our goal is to be as fast as a raw java method call.
A MethodMap must be created with an existing Map and is immutable after construction(except for clear()).
It does not support the optional Map operations put, putAll, and remove. NOTE that these operations could be implemented but are not necessary at this point since the main use is for the container's method info, which is invariant after initialization.
As this is a map for Method objects, null keys are not supported. This map is unsynchronized.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionMethodMap(Map<Method, InvocationInfo> methodMap) MethodMap(Map<Method, InvocationInfo> methodMap, int numBuckets) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()put(Method key, InvocationInfo value) voidputAll(Map<? extends Method, ? extends InvocationInfo> t) Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
MethodMap
-
MethodMap
-
-
Method Details
-
put
- Specified by:
putin interfaceMap<Method,InvocationInfo> - Overrides:
putin classHashMap<Method,InvocationInfo>
-
putAll
- Specified by:
putAllin interfaceMap<Method,InvocationInfo> - Overrides:
putAllin classHashMap<Method,InvocationInfo>
-
remove
- Specified by:
removein interfaceMap<Method,InvocationInfo> - Overrides:
removein classHashMap<Method,InvocationInfo>
-
get
- Specified by:
getin interfaceMap<Method,InvocationInfo> - Overrides:
getin classHashMap<Method,InvocationInfo>
-
get
-
clear
public void clear()- Specified by:
clearin interfaceMap<Method,InvocationInfo> - Overrides:
clearin classHashMap<Method,InvocationInfo>
-