|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Command
An asynchronous encapsulated command. Callers do not need to know what the command does.
Commands must be serializable, so that they be persisted to disk by ehcache. The command can also be fault tolerant. It is made fault tolerant whengetThrowablesToRetryOn() is non null.
Any Throwables thrown that are <instanceof a Throwable in the array are expected
and will result in reexecution up to the maximum number of attempts, after the delay between repeats.
allowing a delay each time.
| Method Summary | |
|---|---|
void |
execute()
Executes the command. |
int |
getDelayBetweenAttemptsInSeconds()
|
int |
getNumberOfAttempts()
|
java.lang.Class[] |
getThrowablesToRetryOn()
The AsynchronousCommandExecutor may also be fault tolerant. |
| Method Detail |
|---|
void execute()
throws java.lang.Throwable
java.lang.Throwable - A command could do anything and could throw any Exception or Errorto set {@link Throwable}s that should are expectedjava.lang.Class[] getThrowablesToRetryOn()
Throwable
classes such that if one if thrown during an execute attempt the command will simply retry after an interval
until it uses up all of its retry attempts. If a Throwable does occurs which is not in this list,
an AsynchronousCommandException will be thrown and the command will be removed.
Classs. It only makes sense for the list to contain Classes which are subclasses
of Throwableint getNumberOfAttempts()
getThrowablesToRetryOn() is non-null.int getDelayBetweenAttemptsInSeconds()
getThrowablesToRetryOn() is non-null.
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||