diff options
author | 2021-06-29 17:01:21 -0400 | |
---|---|---|
committer | 2021-06-30 09:18:52 +0000 | |
commit | 57e39b87ac53c128502110b64b06947e9e380d4e (patch) | |
tree | dfac02665737e73f8bba0ee6f6a85745970c92a0 /main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java | |
parent | 38a0a3888dc752bc6f88bdcc3477d20e38aeed3f (diff) |
Add ability to turn on/off pdp statistics
Adding an ability in pap to turn on/off processing of pdp statistics.
By default it will be turned on and can be changed via configuration.
Issue-ID: POLICY-3450
Change-Id: I093fe3f1390769f9acf2cfe85dd0d4edf0539de8
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java')
-rw-r--r-- | main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java b/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java index ed73c3e1..617275b4 100644 --- a/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java +++ b/main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. + * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,7 +113,8 @@ public class PapActivator extends ServiceManagerContainer { this.papParameterGroup = papParameterGroup; this.msgDispatcher = new MessageTypeDispatcher(MSG_TYPE_NAMES); this.reqIdDispatcher = new RequestIdDispatcher<>(PdpStatus.class, REQ_ID_NAMES); - this.pdpHeartbeatListener = new PdpHeartbeatListener(papParameterGroup.getPdpParameters()); + this.pdpHeartbeatListener = new PdpHeartbeatListener(papParameterGroup.getPdpParameters(), + papParameterGroup.isSavePdpStatisticsInDb()); } catch (final RuntimeException e) { throw new PolicyPapRuntimeException(e); @@ -216,6 +218,7 @@ public class PapActivator extends ServiceManagerContainer { .responseDispatcher(reqIdDispatcher) .stateChangeTimers(pdpStChgTimers.get()) .updateTimers(pdpUpdTimers.get()) + .savePdpStatistics(papParameterGroup.isSavePdpStatisticsInDb()) .build())); Registry.register(PapConstants.REG_PDP_MODIFY_MAP, requestMap.get()); |