Examples of attachIfAbsent()


Examples of org.jboss.logmanager.Logger.attachIfAbsent()

            stdioContext = StdioContext.create(
                    new NullInputStream(),
                    new LoggingOutputStream(logContext.getLogger("stdout"), Level.INFO),
                    new LoggingOutputStream(logContext.getLogger("stderr"), Level.ERROR)
            );
            final StdioContext appearing = root.attachIfAbsent(STDIO_CONTEXT_ATTACHMENT_KEY, stdioContext);
            if (appearing != null) {
                stdioContext = appearing;
            }
        }
        return stdioContext;
View Full Code Here

Examples of org.jboss.logmanager.Logger.attachIfAbsent()

    public static ConfigurationPersistence getOrCreateConfigurationPersistence(final LogContext logContext) {
        final Logger root = logContext.getLogger(CommonAttributes.ROOT_LOGGER_NAME);
        ConfigurationPersistence result = (ConfigurationPersistence) root.getAttachment(Configurator.ATTACHMENT_KEY);
        if (result == null) {
            result = new ConfigurationPersistence(logContext);
            ConfigurationPersistence existing = (ConfigurationPersistence) root.attachIfAbsent(Configurator.ATTACHMENT_KEY, result);
            if (existing != null) {
                result = existing;
            }
        }
        return result;
View Full Code Here

Examples of org.jboss.logmanager.Logger.attachIfAbsent()

        final Logger root = configuration.getLogContext().getLogger(CommonAttributes.ROOT_LOGGER_NAME);
        Map<String, String> disableHandlers = root.getAttachment(DISABLED_HANDLERS_KEY);
        synchronized (HANDLER_LOCK) {
            if (disableHandlers == null) {
                disableHandlers = new HashMap<String, String>();
                final Map<String, String> current = root.attachIfAbsent(DISABLED_HANDLERS_KEY, disableHandlers);
                if (current != null) {
                    disableHandlers = current;
                }
            }
            if (!disableHandlers.containsKey(handlerName)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.