Class DistributableInactiveSessionStatistics

java.lang.Object
org.wildfly.clustering.web.undertow.session.DistributableInactiveSessionStatistics
All Implemented Interfaces:
InactiveSessionStatistics, Recordable<org.wildfly.clustering.session.ImmutableSessionMetaData>, RecordableInactiveSessionStatistics

public class DistributableInactiveSessionStatistics extends Object implements RecordableInactiveSessionStatistics
Records statistics for inactive sessions.
Author:
Paul Ferraro
  • Constructor Details

    • DistributableInactiveSessionStatistics

      public DistributableInactiveSessionStatistics()
  • Method Details

    • record

      public void record(org.wildfly.clustering.session.ImmutableSessionMetaData metaData)
      Description copied from interface: Recordable
      Records the specified object
      Specified by:
      record in interface Recordable<org.wildfly.clustering.session.ImmutableSessionMetaData>
      Parameters:
      metaData - an object to record
    • getMeanSessionLifetime

      public Duration getMeanSessionLifetime()
      Specified by:
      getMeanSessionLifetime in interface InactiveSessionStatistics
      Returns:
      The average session lifetime, as a time duration
    • getMaxSessionLifetime

      public Duration getMaxSessionLifetime()
      Specified by:
      getMaxSessionLifetime in interface InactiveSessionStatistics
      Returns:
      The longest a session has been alive, as a time duration
    • getExpiredSessionCount

      public long getExpiredSessionCount()
      Specified by:
      getExpiredSessionCount in interface InactiveSessionStatistics
      Returns:
      The number of expired sessions
    • reset

      public void reset()
      Description copied from interface: Recordable
      Resets any previously recorded objects
      Specified by:
      reset in interface Recordable<org.wildfly.clustering.session.ImmutableSessionMetaData>