Class TimeTrackerFactory


  • public class TimeTrackerFactory
    extends java.lang.Object
    Creates and instance of @TimeTracker

    Normal tracker is returned if passed Logger has verbosity of info category or upper, dummy tracker otherwise.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TimeTracker create​(java.lang.String message, org.apache.logging.log4j.Logger log)
      Create time tracker.
      static TimeTracker create​(java.lang.String message, org.apache.logging.log4j.Logger log, int oneOperationTimeout, int batchOperationsTimeout)
      Create time tracker.
      static TimeTracker create​(java.lang.String message, org.apache.logging.log4j.Logger log, java.lang.Object... args)
      Create time tracker with formatted message - using String.format method.
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_SINGLE_OPERATION_TIMEOUT

        public static final int DEFAULT_SINGLE_OPERATION_TIMEOUT
        See Also:
        Constant Field Values
      • DEFAULT_BATCH_OPERATION_TIMEOUT

        public static final int DEFAULT_BATCH_OPERATION_TIMEOUT
        See Also:
        Constant Field Values
    • Constructor Detail

      • TimeTrackerFactory

        public TimeTrackerFactory()
    • Method Detail

      • create

        public static TimeTracker create​(java.lang.String message,
                                         org.apache.logging.log4j.Logger log)
        Create time tracker.
        Parameters:
        message - formatted message
        log - logger
      • create

        public static TimeTracker create​(java.lang.String message,
                                         org.apache.logging.log4j.Logger log,
                                         java.lang.Object... args)
        Create time tracker with formatted message - using String.format method.
        Parameters:
        message - formatted message
        log - logger
        args - message arguments
      • create

        public static TimeTracker create​(java.lang.String message,
                                         org.apache.logging.log4j.Logger log,
                                         int oneOperationTimeout,
                                         int batchOperationsTimeout)
        Create time tracker.
        Parameters:
        message - formatted message
        log - logger
        oneOperationTimeout - operation timeout
        batchOperationsTimeout - batch operation timeout