Package org.ldaptive
Class AbstractRetryMetadata
- java.lang.Object
-
- org.ldaptive.AbstractRetryMetadata
-
- All Implemented Interfaces:
RetryMetadata
- Direct Known Subclasses:
ClosedRetryMetadata,InitialRetryMetadata,LdapURLRetryMetadata
public abstract class AbstractRetryMetadata extends java.lang.Object implements RetryMetadata
Common implementation of retry metadata.- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected java.time.InstantfailureTimeTime at which the failure occurred.protected java.time.InstantsuccessTimeTime at which the last success occurred.
-
Constructor Summary
Constructors Constructor Description AbstractRetryMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAttempts()Number of attempts for this retry.java.time.InstantgetFailureTime()Returns the failure time.java.time.InstantgetSuccessTime()Returns the success time.voidrecordFailure(java.time.Instant time)Records a connection failure at the given instant.voidrecordSuccess(java.time.Instant time)Records a connection success at the given instant.java.lang.StringtoString()
-
-
-
Method Detail
-
getSuccessTime
public java.time.Instant getSuccessTime()
Description copied from interface:RetryMetadataReturns the success time.- Specified by:
getSuccessTimein interfaceRetryMetadata- Returns:
- time that the success occurred
-
getFailureTime
public java.time.Instant getFailureTime()
Description copied from interface:RetryMetadataReturns the failure time.- Specified by:
getFailureTimein interfaceRetryMetadata- Returns:
- time that the failure occurred
-
getAttempts
public int getAttempts()
Description copied from interface:RetryMetadataNumber of attempts for this retry.- Specified by:
getAttemptsin interfaceRetryMetadata- Returns:
- retry attempts
-
recordSuccess
public void recordSuccess(java.time.Instant time)
Description copied from interface:RetryMetadataRecords a connection success at the given instant.- Specified by:
recordSuccessin interfaceRetryMetadata- Parameters:
time- Point in time where connection was opened.
-
recordFailure
public void recordFailure(java.time.Instant time)
Description copied from interface:RetryMetadataRecords a connection failure at the given instant.- Specified by:
recordFailurein interfaceRetryMetadata- Parameters:
time- Point in time where connection failed.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-