Code example for ConcurrentHashMap

0
 
  public static final String LOGGER_DELEGATE_FACTORY_CLASS_NAME = "vertx.logger-delegate-factory-class-name";
 
  private static volatile LogDelegateFactory delegateFactory;
 
  private static final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<>();
 
  static { 
    initialise(); 
  } 
 
  public static synchronized void initialise() { 
    LogDelegateFactory delegateFactory;
 
    // If a system property is specified then this overrides any delegate factory which is set 
    // programmatically - this is primarily of use so we can configure the logger delegate on the client side. 
    // call to System.getProperty is wrapped in a try block as it will fail if the client runs in a secured 
    // environment 
    String className = JULLogDelegateFactory.class.getName();
    try {