Class MarkerManager


  • public final class MarkerManager
    extends java.lang.Object
    Applications create Markers by using the Marker Manager. All Markers created by this Manager are immutable.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MarkerManager.Log4jMarker
      Consider this class private, it is only public to satisfy Jackson for XML and JSON IO.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.concurrent.ConcurrentMap<java.lang.String,​Marker> MARKERS  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MarkerManager()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void clear()
      Clears all markers.
      static boolean exists​(java.lang.String key)
      Tests existence of the given marker.
      static Marker getMarker​(java.lang.String name)
      Retrieves a Marker or create a Marker that has no parent.
      static Marker getMarker​(java.lang.String name, java.lang.String parent)
      Deprecated.
      Use the Marker add or set methods to add parent Markers.
      static Marker getMarker​(java.lang.String name, Marker parent)
      Deprecated.
      Use the Marker add or set methods to add parent Markers.
      private static void requireNonNull​(java.lang.Object obj, java.lang.String message)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MARKERS

        private static final java.util.concurrent.ConcurrentMap<java.lang.String,​Marker> MARKERS
    • Constructor Detail

      • MarkerManager

        private MarkerManager()
    • Method Detail

      • clear

        public static void clear()
        Clears all markers.
      • exists

        public static boolean exists​(java.lang.String key)
        Tests existence of the given marker.
        Parameters:
        key - the marker name
        Returns:
        true if the marker exists.
        Since:
        2.4
      • getMarker

        public static Marker getMarker​(java.lang.String name)
        Retrieves a Marker or create a Marker that has no parent.
        Parameters:
        name - The name of the Marker.
        Returns:
        The Marker with the specified name.
        Throws:
        java.lang.IllegalArgumentException - if the argument is null
      • getMarker

        @Deprecated
        public static Marker getMarker​(java.lang.String name,
                                       java.lang.String parent)
        Deprecated.
        Use the Marker add or set methods to add parent Markers. Will be removed by final GA release.
        Retrieves or creates a Marker with the specified parent. The parent must have been previously created.
        Parameters:
        name - The name of the Marker.
        parent - The name of the parent Marker.
        Returns:
        The Marker with the specified name.
        Throws:
        java.lang.IllegalArgumentException - if the parent Marker does not exist.
      • getMarker

        @Deprecated
        public static Marker getMarker​(java.lang.String name,
                                       Marker parent)
        Deprecated.
        Use the Marker add or set methods to add parent Markers. Will be removed by final GA release.
        Retrieves or creates a Marker with the specified parent.
        Parameters:
        name - The name of the Marker.
        parent - The parent Marker.
        Returns:
        The Marker with the specified name.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null
      • requireNonNull

        private static void requireNonNull​(java.lang.Object obj,
                                           java.lang.String message)