diff options
author | Jim Hahn <jrh3@att.com> | 2021-08-05 14:53:19 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-08-05 15:25:14 -0400 |
commit | da1b7d9f04453e94fb77ebe4213f456a0be63fc2 (patch) | |
tree | e59daec0050c7ce88c07f1d7f97168aa849128a7 /feature-test-transaction/src/main/java/org | |
parent | 1744dac574fb771301027be74c9257eb070125f7 (diff) |
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 <jrh3@att.com>
Diffstat (limited to 'feature-test-transaction/src/main/java/org')
2 files changed, 7 insertions, 18 deletions
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 { |