use of org.openkilda.pce.cache.FlowCache in project open-kilda by telstra.
the class CacheBolt method initState.
/**
* {@inheritDoc}
*/
@Override
public void initState(InMemoryKeyValueState<String, Cache> state) {
this.state = state;
networkCache = (NetworkCache) state.get(NETWORK_CACHE);
if (networkCache == null) {
networkCache = new NetworkCache();
this.state.put(NETWORK_CACHE, networkCache);
}
flowCache = (FlowCache) state.get(FLOW_CACHE);
if (flowCache == null) {
flowCache = new FlowCache();
this.state.put(FLOW_CACHE, flowCache);
}
cacheWarmingService = new CacheWarmingService(networkCache);
reroutedFlows.clear();
}
use of org.openkilda.pce.cache.FlowCache in project open-kilda by telstra.
the class CrudBolt method initState.
/**
* {@inheritDoc}
*/
@Override
public void initState(InMemoryKeyValueState<String, FlowCache> state) {
this.caches = state;
// TODO - do we have to use InMemoryKeyValue, or is there some other InMemory option?
// The reason for the qestion .. we are only putting in one object.
flowCache = state.get(FLOW_CACHE);
if (flowCache == null) {
flowCache = new FlowCache();
this.caches.put(FLOW_CACHE, flowCache);
}
}
Aggregations