From da1b7d9f04453e94fb77ebe4213f456a0be63fc2 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 5 Aug 2021 14:53:19 -0400 Subject: Use lombok in drools-pdp #2 Updated feature-session-persistence thru drools-domains. Issue-ID: POLICY-3397 Change-Id: I0b1c6da8b2301c00dd792675e8cf1f49888edb9f Signed-off-by: Jim Hahn --- .../drools/testtransaction/TestTransactionConstants.java | 11 +++++------ .../policy/drools/testtransaction/TtControllerTask.java | 14 ++------------ 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'feature-test-transaction/src/main') diff --git a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransactionConstants.java b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransactionConstants.java index 9b5ad251..a02cf498 100644 --- a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransactionConstants.java +++ b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransactionConstants.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-test-transaction * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019, 2021 AT&T Intellectual Property. 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. @@ -20,9 +20,12 @@ package org.onap.policy.drools.testtransaction; +import lombok.AccessLevel; import lombok.Getter; +import lombok.NoArgsConstructor; -public class TestTransactionConstants { +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class TestTransactionConstants { public static final String TT_FPC = "TT.FPC"; public static final String TT_COUNTER = "$ttc"; @@ -31,8 +34,4 @@ public class TestTransactionConstants { @Getter private static final TestTransaction manager = new TtImpl(); - - private TestTransactionConstants() { - // do nothing - } } diff --git a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TtControllerTask.java b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TtControllerTask.java index baecdfd9..bfd94df6 100644 --- a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TtControllerTask.java +++ b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TtControllerTask.java @@ -23,6 +23,7 @@ package org.onap.policy.drools.testtransaction; import java.util.EventObject; import java.util.HashMap; import java.util.List; +import lombok.Getter; import org.onap.policy.drools.controller.DroolsController; import org.onap.policy.drools.system.PolicyController; import org.slf4j.Logger; @@ -32,6 +33,7 @@ import org.slf4j.LoggerFactory; * TtControllerTask implements the Runnabale interface Carries out the injection of an event into a * drools session and subsequent query of a counter to ensure that forward progress is occuring. */ +@Getter public class TtControllerTask implements Runnable { // get an instance of logger @@ -53,14 +55,6 @@ public class TtControllerTask implements Runnable { this.thread.start(); } - public PolicyController getController() { - return this.controller; - } - - public synchronized boolean isAlive() { - return this.alive; - } - /** * Stops the task. */ @@ -75,10 +69,6 @@ public class TtControllerTask implements Runnable { } } - public Thread getThread() { - return this.thread; - } - @Override public void run() { try { -- cgit 1.2.3-korg