Class LockLogger


  • public class LockLogger
    extends java.lang.Object
    Manages user-level logging information from Locks and Lock-like functions. Locking objects store their status as a string, which is kept for them until overwritten by a newer one.

    This implementation stores one (if more than one) in a Memory for display.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger log  
      java.lang.String logMemoryName  
      Memory memory  
      (package private) java.util.Map<java.lang.Object,​java.lang.String> statusMap  
    • Constructor Summary

      Constructors 
      Constructor Description
      LockLogger​(java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      (package private) void log​(java.lang.String message)
      Log a copy of the status.
      void setStatus​(java.lang.Object logger, java.lang.String status)
      Set the current status of some Lock
      • Methods inherited from class java.lang.Object

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

      • statusMap

        java.util.Map<java.lang.Object,​java.lang.String> statusMap
      • log

        protected static final org.slf4j.Logger log
    • Constructor Detail

      • LockLogger

        LockLogger​(java.lang.String name)
    • Method Detail

      • setStatus

        public void setStatus​(@Nonnull
                              java.lang.Object logger,
                              @Nonnull
                              java.lang.String status)
        Set the current status of some Lock
        Parameters:
        logger - The object providing status
        status - The new status value, "" for "nothing of interest"
      • clear

        public void clear()
      • log

        void log​(java.lang.String message)
        Log a copy of the status. Intended to be overridden by specific LockLogger implementations.
        Parameters:
        message - The status message, all filled out