use of org.openkilda.persistence.context.PersistenceContextRequired in project open-kilda by telstra.
the class IslLatencyTopologyTest method createIsl.
@PersistenceContextRequired
private void createIsl(Switch srcSwitch, int srcPort, Switch dstSwitch, int dstPort, int latency) {
Isl isl = Isl.builder().srcSwitch(srcSwitch).srcPort(srcPort).destSwitch(dstSwitch).destPort(dstPort).actualStatus(IslStatus.ACTIVE).status(IslStatus.ACTIVE).latency(latency).build();
islRepository.add(isl);
}
use of org.openkilda.persistence.context.PersistenceContextRequired in project open-kilda by telstra.
the class FlowFetcher method init.
@Override
@PersistenceContextRequired(requiresNew = true)
public void init() {
super.init();
flowRepository = persistenceManager.getRepositoryFactory().createFlowRepository();
yFlowRepository = persistenceManager.getRepositoryFactory().createYFlowRepository();
flowResourcesManager = new FlowResourcesManager(persistenceManager, flowResourcesConfig);
try {
refreshHeap(null, false);
} catch (PipelineException e) {
log.error("Failed to init periodic ping cache");
}
}
use of org.openkilda.persistence.context.PersistenceContextRequired in project open-kilda by telstra.
the class FlowCacheBolt method init.
@PersistenceContextRequired(requiresNew = true)
protected void init() {
flowCacheService = new FlowCacheService(persistenceManager, Clock.systemUTC(), flowRttStatsExpirationTime, this);
calculateFlowLatencyService = new CalculateFlowLatencyService(this);
}
Aggregations