Search in sources :

Example 1 with DiscoveryManager

use of org.openkilda.wfm.isl.DiscoveryManager 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);
}
Also used : DiscoveryNode(org.openkilda.messaging.model.DiscoveryNode) DiscoveryManager(org.openkilda.wfm.isl.DiscoveryManager) WatchDog(org.openkilda.wfm.WatchDog) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)1 DiscoveryNode (org.openkilda.messaging.model.DiscoveryNode)1 WatchDog (org.openkilda.wfm.WatchDog)1 DiscoveryManager (org.openkilda.wfm.isl.DiscoveryManager)1