środa, grudnia 11, 2013

BW Smart KeyValue Cache pattern

Problem: Consider entity A with field codeName and A' with fields codeName, name. Between A and A' there is key-value enrichment for codeName-name using dictionary D. Map Data activity for 1000+ A records using D with 1000+ records is very slow due to sequential scan on D.codeName. For-each mapping uses non-indexed access to D.codeName.

Solution: Create Java Custom Function control with functions: addMapping(String container, String key, String value), String getMapping(String container, String key), clearMapping. They will use private final static ConcurrentHashMap<String,ConcurrentHashMap<String,String>> for storing key-value associations.

0 komentarze: