use of org.openkilda.wfm.WatchDog in project open-kilda by telstra.
the class OFELinkBolt method initState.
@Override
@SuppressWarnings("unchecked")
public void initState(KeyValueState<String, Object> state) {
watchDog = new WatchDog(watchDogInterval);
// NB: First time the worker is created this will be null
// TODO: what happens to state as workers go up or down
Object payload = state.get(STATE_ID_DISCOVERY);
if (payload == null) {
payload = discoveryQueue = new LinkedList<>();
state.put(islDiscoveryTopic, payload);
} else {
discoveryQueue = (LinkedList<DiscoveryNode>) payload;
}
discovery = new DiscoveryManager(islFilter, discoveryQueue, islHealthCheckInterval, islHealthCheckTimeout, islHealthFailureLimit);
}
Aggregations