Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEclipse
public class ApexPolicyStatisticsManager {
    private static final Logger LOGGER = LoggerFactory.getLogger(ApexPolicyStatisticsManager.class);
    public static final String REG_APEX_PDP_POLICY_COUNTER = "object:pdp/statistics/policy/counter";
    private final AtomicLong policyDeployCount = new AtomicLong(0);
    private final AtomicLong policyDeploySuccessCount = new AtomicLong(0);
    private final AtomicLong policyDeployFailCount = new AtomicLong(0);
    private final AtomicLong policyExecutedCount = new AtomicLong(0);
    private final AtomicLong policyExecutedSuccessCount = new AtomicLong(0);
    private final AtomicLong policyExecutedFailCount = new AtomicLong(0);
}

deploy count is updated on message handler method startApexEngine, startApexEngineBasedOnPolicies

policies to undeploy are mentioned on startApexEngineBasedOnPolicies and stopApexEngineBasedOnPolicies 

should we update the count on the mentioned methods for when there's a list of policies to undeploy? 

Code Block
themeEclipse
private PdpResponseDetails startApexEngineBasedOnPolicies(final PdpUpdate pdpUpdateMsg,
        final PdpMessageHandler pdpMessageHandler, ApexEngineHandler apexEngineHandler)



Questions:

  1. all the mentioned classes track different operations?
  2. can we have one class with common counters then add the extra?
  3. are they all converging to Pdp Statistics entity?

...