Top Description Fields Constructors Methods
com.oracle.bmc.waiter

public Class MaxAttemptsTerminationStrategy

extends Object
implements TerminationStrategy
Class Inheritance
All Implemented Interfaces
com.oracle.bmc.waiter.TerminationStrategy
Imports
com.oracle.bmc.waiter.WaiterConfiguration.WaitContext

Termination strategy that allows up to X attempts before terminating.

Field Summary

Modifier and TypeField and Description
private final int
maxAttempts

The maximum number of attempts to make.

Constructor Summary

AccessConstructor and Description
public
MaxAttemptsTerminationStrategy(final int maxAttempts)

Method Summary

Modifier and TypeMethod and Description
public int
getMaxAttempts()

The maximum number of attempts to make.

public boolean
shouldTerminate(WaiterConfiguration.WaitContext
The context after the last poll attempt.
context
)

Implements com.oracle.bmc.waiter.TerminationStrategy.shouldTerminate.

Returns whether or not polling should be terminated.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

maxAttemptsback to summary
private final int maxAttempts

The maximum number of attempts to make.

Constructor Detail

MaxAttemptsTerminationStrategyback to summary
public MaxAttemptsTerminationStrategy(final int maxAttempts)
Annotations
@java.beans.ConstructorProperties

Method Detail

getMaxAttemptsback to summary
public int getMaxAttempts()

The maximum number of attempts to make.

shouldTerminateback to summary
public boolean shouldTerminate(WaiterConfiguration.WaitContext context)

Implements com.oracle.bmc.waiter.TerminationStrategy.shouldTerminate.

Doc from com.oracle.bmc.waiter.TerminationStrategy.shouldTerminate.

Returns whether or not polling should be terminated.

Parameters
context:WaiterConfiguration.WaitContext

The context after the last poll attempt.

Returns:boolean

true to terminate polling, false to continue.

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. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override