All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.spi.statistics.MethodStatisticsLogger Maven / Gradle / Ivy

There is a newer version: 4.0.0.Beta5
Show newest version
package org.jboss.resteasy.spi.statistics;


public interface MethodStatisticsLogger {

   /**
    * Retrieve current time
    * @return
    */
   default long timestamp(){
      // no-op
      return 0;
   }

   /**
    * Calculate lenght of time bewteen current time and provided time
    * @param fromTimestamp
    */
   default void duration(final long fromTimestamp) {
      // no-op
   }

   /**
    * Count reported failure of method invocation
    */
   default void incFailureCnt() {
      // no-op
   }

   /**
    * Reinitialize statistics
    */
   default void reset() {
      // no-op
   }

   default long getInvocationCnt() { return -1;}
   default long getFailedInvocationCnt() { return -1;}
   default long getAvgExecutionTime() { return -1;}
   default long getTotalExecutionTime() { return -1;}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy