public class TwoConcurrentActionPolicy extends PeriodicPolicy
Modifier and Type | Class and Description |
---|---|
private static class |
TwoConcurrentActionPolicy.ActionRunner |
Policy.PolicyContext
Modifier and Type | Field and Description |
---|---|
private Action[] |
actionsOne |
private Action[] |
actionsTwo |
private ExecutorService |
executor |
Constructor and Description |
---|
TwoConcurrentActionPolicy(long sleepTime,
Action[] actionsOne,
Action[] actionsTwo) |
Modifier and Type | Method and Description |
---|---|
void |
init(Policy.PolicyContext context) |
protected void |
runOneIteration() |
run
isStopped, stop
private final Action[] actionsOne
private final Action[] actionsTwo
private final ExecutorService executor
public TwoConcurrentActionPolicy(long sleepTime, Action[] actionsOne, Action[] actionsTwo)
protected void runOneIteration()
runOneIteration
in class PeriodicPolicy
public void init(Policy.PolicyContext context) throws Exception
init
in class PeriodicPolicy
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.