Top Description Fields Constructors Methods
reactor.util.retry

pack-priv final Class ImmutableRetrySignal

extends Object
implements RetrySignal
Class Inheritance
All Implemented Interfaces
reactor.util.retry.Retry.RetrySignal
Imports
reactor.util.context.Context, .ContextView

An immutable reactor.util.retry.Retry.RetrySignal that can be used for retained copies of mutable implementations.
Author
Simon Baslé

Field Summary

Modifier and TypeField and Description
pack-priv final Throwable
pack-priv final long
pack-priv final long
pack-priv final ContextView

Constructor Summary

AccessConstructor and Description
pack-priv
ImmutableRetrySignal(long failureTotalIndex, long failureSubsequentIndex, Throwable failure)

pack-priv
ImmutableRetrySignal(long failureTotalIndex, long failureSubsequentIndex, Throwable failure, ContextView retryContext)

Method Summary

Modifier and TypeMethod and Description
public Retry.RetrySignal
copy()

Overrides default reactor.util.retry.Retry.RetrySignal.copy.

An immutable copy of this RetrySignal which is guaranteed to give a consistent view of the state at the time at which this method is invoked.
public Throwable
failure()

Implements reactor.util.retry.Retry.RetrySignal.failure.

The Throwable that caused the current onError signal.
public ContextView
retryContextView()

Overrides default reactor.util.retry.Retry.RetrySignal.retryContextView.

Return a read-only view of the user provided context, which may be used to store objects to be reset/rolled-back or otherwise mutated before or after a retry.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public long
totalRetries()

Implements reactor.util.retry.Retry.RetrySignal.totalRetries.

The total number of retries since the source first was subscribed to (in other words the number of errors -1 since the source was first subscribed to).
public long
totalRetriesInARow()

Implements reactor.util.retry.Retry.RetrySignal.totalRetriesInARow.

Retry counter resetting after each onNext (in other words the number of errors -1 since the latest onNext).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

failureback to summary
pack-priv final Throwable failure
failureSubsequentIndexback to summary
pack-priv final long failureSubsequentIndex
failureTotalIndexback to summary
pack-priv final long failureTotalIndex
retryContextback to summary
pack-priv final ContextView retryContext

Constructor Detail

ImmutableRetrySignalback to summary
pack-priv ImmutableRetrySignal(long failureTotalIndex, long failureSubsequentIndex, Throwable failure)
ImmutableRetrySignalback to summary
pack-priv ImmutableRetrySignal(long failureTotalIndex, long failureSubsequentIndex, Throwable failure, ContextView retryContext)

Method Detail

copyback to summary
public Retry.RetrySignal copy()

Overrides default reactor.util.retry.Retry.RetrySignal.copy.

Doc from reactor.util.retry.Retry.RetrySignal.copy.

An immutable copy of this RetrySignal which is guaranteed to give a consistent view of the state at the time at which this method is invoked. This is especially useful if this RetrySignal is a transient view of the state of the underlying retry subscriber.

Returns:Retry.RetrySignal

an immutable copy of the current RetrySignal, always safe to use

Annotations
@Override
failureback to summary
public Throwable failure()

Implements reactor.util.retry.Retry.RetrySignal.failure.

Doc from reactor.util.retry.Retry.RetrySignal.failure.

The Throwable that caused the current onError signal.

Returns:Throwable

the current failure.

Annotations
@Override
retryContextViewback to summary
public ContextView retryContextView()

Overrides default reactor.util.retry.Retry.RetrySignal.retryContextView.

Doc from reactor.util.retry.Retry.RetrySignal.retryContextView.

Return a read-only view of the user provided context, which may be used to store objects to be reset/rolled-back or otherwise mutated before or after a retry.

Returns:ContextView

a read-only view of a user provided context.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
totalRetriesback to summary
public long totalRetries()

Implements reactor.util.retry.Retry.RetrySignal.totalRetries.

Doc from reactor.util.retry.Retry.RetrySignal.totalRetries.

The total number of retries since the source first was subscribed to (in other words the number of errors -1 since the source was first subscribed to).

Returns:long

the total number of retries since the source first was subscribed to.

Annotations
@Override
totalRetriesInARowback to summary
public long totalRetriesInARow()

Implements reactor.util.retry.Retry.RetrySignal.totalRetriesInARow.

Doc from reactor.util.retry.Retry.RetrySignal.totalRetriesInARow.

Retry counter resetting after each onNext (in other words the number of errors -1 since the latest onNext).

Returns:long

the number of retries since the latest onNext, or the number of retries since the source first was subscribed to if there hasn't been any onNext signals (in which case RetrySignal#totalRetries() and RetrySignal#totalRetriesInARow() are equivalent).

Annotations
@Override