Class LogThreadsHoldingLockAgent

    • Constructor Detail

      • LogThreadsHoldingLockAgent

        public LogThreadsHoldingLockAgent()
        Constructor
      • LogThreadsHoldingLockAgent

        public LogThreadsHoldingLockAgent​(String sId)
        Constructor
        Parameters:
        sId - session id
    • Method Detail

      • run

        public void run()
        Log the stacktraces of all the threads holding a lock for the session with id m_sId
        Specified by:
        run in interface Invocable
        Specified by:
        run in interface Runnable
      • writeToLog

        protected void writeToLog​(StringBuilder s)
        Delegating method for logging for mock testing purposes
        Parameters:
        s - the string to log
      • threadStackTrace

        protected StringBuilder threadStackTrace​(Thread t)
        Create a StringBuilder which contains the stacktrace for the Thread argument
        Parameters:
        t - the Thread
        Returns:
        a StringBuilder with the stacktrace for t
      • readExternal

        public void readExternal​(DataInput in)
                          throws IOException
        Restore the contents of this object by loading the object's state from the passed DataInput object.
        Specified by:
        readExternal in interface ExternalizableLite
        Parameters:
        in - the DataInput stream to read data from in order to restore the state of this object
        Throws:
        IOException - if an I/O exception occurs
        NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into
      • writeExternal

        public void writeExternal​(DataOutput out)
                           throws IOException
        Save the contents of this object by storing the object's state into the passed DataOutput object.
        Specified by:
        writeExternal in interface ExternalizableLite
        Parameters:
        out - the DataOutput stream to write the state of this object to
        Throws:
        IOException - if an I/O exception occurs