Search in sources :

Example 1 with PersistenceContextRequired

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);
}
Also used : Isl(org.openkilda.model.Isl) PersistenceContextRequired(org.openkilda.persistence.context.PersistenceContextRequired)

Example 2 with PersistenceContextRequired

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");
    }
}
Also used : PipelineException(org.openkilda.wfm.error.PipelineException) FlowResourcesManager(org.openkilda.wfm.share.flow.resources.FlowResourcesManager) PersistenceContextRequired(org.openkilda.persistence.context.PersistenceContextRequired)

Example 3 with PersistenceContextRequired

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);
}
Also used : FlowCacheService(org.openkilda.wfm.topology.flowmonitoring.service.FlowCacheService) CalculateFlowLatencyService(org.openkilda.wfm.topology.flowmonitoring.service.CalculateFlowLatencyService) PersistenceContextRequired(org.openkilda.persistence.context.PersistenceContextRequired)

Aggregations

PersistenceContextRequired (org.openkilda.persistence.context.PersistenceContextRequired)3 Isl (org.openkilda.model.Isl)1 PipelineException (org.openkilda.wfm.error.PipelineException)1 FlowResourcesManager (org.openkilda.wfm.share.flow.resources.FlowResourcesManager)1 CalculateFlowLatencyService (org.openkilda.wfm.topology.flowmonitoring.service.CalculateFlowLatencyService)1 FlowCacheService (org.openkilda.wfm.topology.flowmonitoring.service.FlowCacheService)1