PropertyMap Class — netty Architecture
Architecture documentation for the PropertyMap class in DefaultHttp2Connection.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 86ee2f76_c8a8_f2a5_83b6_3bac35c76af2["PropertyMap"] c1b91a38_3d50_98cc_116d_1d9e5bc49432["DefaultHttp2Connection.java"] 86ee2f76_c8a8_f2a5_83b6_3bac35c76af2 -->|defined in| c1b91a38_3d50_98cc_116d_1d9e5bc49432 7545ae46_c99b_84b0_b772_52a7119ddaff["V()"] 86ee2f76_c8a8_f2a5_83b6_3bac35c76af2 -->|method| 7545ae46_c99b_84b0_b772_52a7119ddaff 6b7608e8_0931_64b8_e7c0_5630e58d9de0["resizeIfNecessary()"] 86ee2f76_c8a8_f2a5_83b6_3bac35c76af2 -->|method| 6b7608e8_0931_64b8_e7c0_5630e58d9de0
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2Connection.java lines 567–601
private class PropertyMap {
Object[] values = EmptyArrays.EMPTY_OBJECTS;
<V> V add(DefaultPropertyKey key, V value) {
resizeIfNecessary(key.index);
@SuppressWarnings("unchecked")
V prevValue = (V) values[key.index];
values[key.index] = value;
return prevValue;
}
@SuppressWarnings("unchecked")
<V> V get(DefaultPropertyKey key) {
if (key.index >= values.length) {
return null;
}
return (V) values[key.index];
}
@SuppressWarnings("unchecked")
<V> V remove(DefaultPropertyKey key) {
V prevValue = null;
if (key.index < values.length) {
prevValue = (V) values[key.index];
values[key.index] = null;
}
return prevValue;
}
void resizeIfNecessary(int index) {
if (index >= values.length) {
values = Arrays.copyOf(values, propertyKeyRegistry.size());
}
}
}
Source
Frequently Asked Questions
What is the PropertyMap class?
PropertyMap is a class in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2Connection.java.
Where is PropertyMap defined?
PropertyMap is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2Connection.java at line 567.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free