A thread-safe map implementation that optimizes its run time representation for space efficiency.
At image build time the map is implemented as a
ConcurrentHashMap
wrapped into an
EconomicMap
. The
ImageHeapMapFeature
intercepts each build time map and
transforms it into an actual memory-efficient
EconomicMap
backed by a flat object array
during analysis. The later image building stages see only the
EconomicMap
.
This map implementation allows thread-safe collection of data at image build time and storing it
into a space efficient data structure at run time.