Java Code Examples for org.apache.logging.log4j.util.StringMap#remove()

The following examples show how to use org.apache.logging.log4j.util.StringMap#remove() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GarbageFreeSortedArrayThreadContextMap.java    From logging-log4j2 with Apache License 2.0 5 votes vote down vote up
@Override
public void remove(final String key) {
    final StringMap map = localMap.get();
    if (map != null) {
        map.remove(key);
    }
}
 
Example 2
Source File: GarbageFreeSortedArrayThreadContextMap.java    From logging-log4j2 with Apache License 2.0 5 votes vote down vote up
@Override
public void removeAll(final Iterable<String> keys) {
    final StringMap map = localMap.get();
    if (map != null) {
        for (final String key : keys) {
            map.remove(key);
        }
    }
}
 
Example 3
Source File: CopyOnWriteSortedArrayThreadContextMap.java    From logging-log4j2 with Apache License 2.0 5 votes vote down vote up
@Override
public void remove(final String key) {
    final StringMap map = localMap.get();
    if (map != null) {
        final StringMap copy = createStringMap(map);
        copy.remove(key);
        copy.freeze();
        localMap.set(copy);
    }
}
 
Example 4
Source File: CopyOnWriteSortedArrayThreadContextMap.java    From logging-log4j2 with Apache License 2.0 5 votes vote down vote up
@Override
public void removeAll(final Iterable<String> keys) {
    final StringMap map = localMap.get();
    if (map != null) {
        final StringMap copy = createStringMap(map);
        for (final String key : keys) {
            copy.remove(key);
        }
        copy.freeze();
        localMap.set(copy);
    }
}