org.ov4j.retry
Interface IRetryable


public interface IRetryable

Interface to implement to be able to have methods retried.

Author:
smolloy

Field Summary
static int KEEP_TRYING
          Keep retrying the call.
static int STOP_TRYING
          Stop retrying the call.
static int TRY_NEXT_RUN
          Stop retrying the call for now, but retry next time the VM is started.
 
Method Summary
 int maxRetriesReached(RetryableCallResult result)
          The maximum number of retries has been reached.
 void retryCallback(RetryableCallResult result)
          The call is done.
 

Field Detail

STOP_TRYING

static final int STOP_TRYING
Stop retrying the call.

See Also:
Constant Field Values

KEEP_TRYING

static final int KEEP_TRYING
Keep retrying the call.

See Also:
Constant Field Values

TRY_NEXT_RUN

static final int TRY_NEXT_RUN
Stop retrying the call for now, but retry next time the VM is started.

See Also:
Constant Field Values
Method Detail

maxRetriesReached

int maxRetriesReached(RetryableCallResult result)
The maximum number of retries has been reached.

Parameters:
result - Information about the call.
Returns:
One of STOP_TRYING, KEEP_TRYING or TRY_NEXT_RUN.

retryCallback

void retryCallback(RetryableCallResult result)
The call is done.

Parameters:
result - Result of the call.


Copyright © 2004-2007 Steve Molloy. All Rights Reserved.