public void pushByKey(String key, String value) {
        if (key == null)
            return;

        Map<String, Deque<String>> map = tlMapOfStacks.get();

        if (map == null) {
            map = new HashMap<>();
            tlMapOfStacks.set(map);
        }

        Deque<String> deque = map.get(key);
        if (deque == null) {
            deque = new ArrayDeque<>();
        }
        deque.push(value);
        map.put(key, deque);
    }
A simple implementation of ThreadLocal backed Map containing values of type 
Deque<String>.

@author Ceki Guuml;c&uuml;
@since 2.0.0
slf4j-api/src/main/java/org/slf4j/helpers/ThreadLocalMapOfStacks.java