org.wildfly.swarm.config.logging

## Class AsyncHandler<T extends AsyncHandler<T>>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap
    - - org.wildfly.swarm.config.logging.AsyncHandler<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class AsyncHandler<T extends AsyncHandler<T>>
      extends HashMap

  Defines a handler which writes to the sub-handlers in an asynchronous thread. Used for handlers which introduce a substantial amount of lag.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AsyncHandler.OverflowAction`

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncHandler(String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `Boolean` | `enabled()` If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.
    `T` | `enabled(Boolean value)` If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.
    `String` | `filterSpec()` A filter expression value to define a filter.
    `T` | `filterSpec(String value)` A filter expression value to define a filter.
    `String` | `getKey()`
    `Level` | `level()` The log level specifying which message levels will be logged by this handler.
    `T` | `level(Level value)` The log level specifying which message levels will be logged by this handler.
    `AsyncHandler.OverflowAction` | `overflowAction()` Specify what action to take when the overflowing.
    `T` | `overflowAction(AsyncHandler.OverflowAction value)` Specify what action to take when the overflowing.
    `Integer` | `queueLength()` The queue length to use before flushing writing
    `T` | `queueLength(Integer value)` The queue length to use before flushing writing
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `T` | `subhandler(String value)` The Handlers associated with this async handler.
    `List<String>` | `subhandlers()` The Handlers associated with this async handler.
    `T` | `subhandlers(List<String> value)` The Handlers associated with this async handler.
    `T` | `subhandlers(String... args)` The Handlers associated with this async handler.

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### AsyncHandler

          public AsyncHandler(String key)

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### enabled

          public Boolean enabled()

      If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.

    - #### enabled

          public T enabled(Boolean value)

      If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.

    - #### filterSpec

          public String filterSpec()

      A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*"))

    - #### filterSpec

          public T filterSpec(String value)

      A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*"))

    - #### level

          public Level level()

      The log level specifying which message levels will be logged by this handler. Message levels lower than this value will be discarded.

    - #### level

          public T level(Level value)

      The log level specifying which message levels will be logged by this handler. Message levels lower than this value will be discarded.

    - #### overflowAction

          public AsyncHandler.OverflowAction overflowAction()

      Specify what action to take when the overflowing. The valid options are 'block' and 'discard'

    - #### overflowAction

          public T overflowAction(AsyncHandler.OverflowAction value)

      Specify what action to take when the overflowing. The valid options are 'block' and 'discard'

    - #### queueLength

          public Integer queueLength()

      The queue length to use before flushing writing

    - #### queueLength

          public T queueLength(Integer value)

      The queue length to use before flushing writing

    - #### subhandlers

          public List<String> subhandlers()

      The Handlers associated with this async handler.

    - #### subhandlers

          public T subhandlers(List<String> value)

      The Handlers associated with this async handler.

    - #### subhandler

          public T subhandler(String value)

      The Handlers associated with this async handler.

    - #### subhandlers

          public T subhandlers(String... args)

      The Handlers associated with this async handler.

Copyright © 2018 JBoss by Red Hat. All rights reserved.