Package org.ldaptive
Class AbstractRetryMetadata
java.lang.Object
org.ldaptive.AbstractRetryMetadata
- All Implemented Interfaces:
RetryMetadata
- Direct Known Subclasses:
ClosedRetryMetadata,InitialRetryMetadata,LdapURLRetryMetadata
Common implementation of retry metadata.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerAttempt count.protected InstantTime at which the failure occurred.protected InstantTime at which the last success occurred. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintNumber of attempts for this retry.Returns the failure time.Returns the success time.voidrecordFailure(Instant time) Records a connection failure at the given instant.voidrecordSuccess(Instant time) Records a connection success at the given instant.toString()
-
Field Details
-
successTime
Time at which the last success occurred. -
failureTime
Time at which the failure occurred. -
attempts
Attempt count.
-
-
Constructor Details
-
AbstractRetryMetadata
public AbstractRetryMetadata()
-
-
Method Details
-
getSuccessTime
Description copied from interface:RetryMetadataReturns the success time.- Specified by:
getSuccessTimein interfaceRetryMetadata- Returns:
- time that the success occurred
-
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
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
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
-