Package org.ldaptive

Class AbstractRetryMetadata

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.time.Instant failureTime
      Time at which the failure occurred.
      protected java.time.Instant successTime
      Time at which the last success occurred.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAttempts()
      Number of attempts for this retry.
      java.time.Instant getFailureTime()
      Returns the failure time.
      java.time.Instant getSuccessTime()
      Returns the success time.
      void recordFailure​(java.time.Instant time)
      Records a connection failure at the given instant.
      void recordSuccess​(java.time.Instant time)
      Records a connection success at the given instant.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • successTime

        protected java.time.Instant successTime
        Time at which the last success occurred.
      • failureTime

        protected java.time.Instant failureTime
        Time at which the failure occurred.
    • Constructor Detail

      • AbstractRetryMetadata

        public AbstractRetryMetadata()
    • Method Detail

      • getSuccessTime

        public java.time.Instant getSuccessTime()
        Description copied from interface: RetryMetadata
        Returns the success time.
        Specified by:
        getSuccessTime in interface RetryMetadata
        Returns:
        time that the success occurred
      • getFailureTime

        public java.time.Instant getFailureTime()
        Description copied from interface: RetryMetadata
        Returns the failure time.
        Specified by:
        getFailureTime in interface RetryMetadata
        Returns:
        time that the failure occurred
      • getAttempts

        public int getAttempts()
        Description copied from interface: RetryMetadata
        Number of attempts for this retry.
        Specified by:
        getAttempts in interface RetryMetadata
        Returns:
        retry attempts
      • recordSuccess

        public void recordSuccess​(java.time.Instant time)
        Description copied from interface: RetryMetadata
        Records a connection success at the given instant.
        Specified by:
        recordSuccess in interface RetryMetadata
        Parameters:
        time - Point in time where connection was opened.
      • recordFailure

        public void recordFailure​(java.time.Instant time)
        Description copied from interface: RetryMetadata
        Records a connection failure at the given instant.
        Specified by:
        recordFailure in interface RetryMetadata
        Parameters:
        time - Point in time where connection failed.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object