public class RenewingAction<A extends AsyncAction> extends AsyncAction
| Modifier and Type | Field and Description |
|---|---|
AtomicInteger |
executionCount |
int |
limit |
ATTR_CHANGES_APP_SIZE, ATTR_HALTS_APP, ATTR_REVIEWS_APP_SIZE, attrs, name| Constructor and Description |
|---|
RenewingAction(A action,
long initialDelay,
long interval,
TimeUnit timeUnit,
int limit)
Rescheduling action
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(SliderAppMaster appMaster,
QueueAccess queueService,
AppState appState)
Execute the inner action then reschedule ourselves
|
A |
getAction()
Get the action
|
int |
getExecutionCount() |
long |
getInterval() |
int |
getLimit() |
TimeUnit |
getTimeUnit() |
void |
updateInterval(long delay,
TimeUnit timeUnit) |
compareTo, convertAndOffset, getAttrs, getDelay, getNanos, hasAttr, now, setNanos, toStringpublic final AtomicInteger executionCount
public final int limit
public RenewingAction(A action, long initialDelay, long interval, TimeUnit timeUnit, int limit)
action - action to executeinitialDelay - initial delayinterval - interval for later delaystimeUnit - time unit for all timeslimit - limit on the no. of executions. If 0 or less: no limitpublic void execute(SliderAppMaster appMaster, QueueAccess queueService, AppState appState) throws Exception
execute in class AsyncActionappMaster - queueService - appState - ExceptionIOExceptionpublic A getAction()
public long getInterval()
public void updateInterval(long delay,
TimeUnit timeUnit)
public TimeUnit getTimeUnit()
public int getExecutionCount()
public int getLimit()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.