summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-01-14 16:01:12 +0200
committervempo <vitaliy.emporopulo@amdocs.com>2018-01-14 16:01:12 +0200
commit66b612c13079d066cebd9629fb1eab0215e684c4 (patch)
tree2c6599f33ba2a4815467fb0f36fce8390e5edf18 /openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main
parent1eb66b78d3b1f1fc60a82ce6dbd16b12f2845e9a (diff)
Minor refactor of logging API
Change-Id: I926ba95c7145eb98aade3f9009a252ad995a346d Issue-ID: SDC-772 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main')
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggingContext.java14
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/ServiceBinder.java6
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggerCreationService.java (renamed from openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggerCreationService.java)2
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggingContextService.java (renamed from openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggingContextService.java)6
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggingServiceProvider.java (renamed from openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggingServiceProvider.java)2
6 files changed, 16 insertions, 16 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java
index b790a02042..826f6d509f 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggerFactory.java
@@ -16,7 +16,7 @@
package org.openecomp.sdc.logging.api;
-import org.openecomp.sdc.logging.provider.LoggerCreationService;
+import org.openecomp.sdc.logging.spi.LoggerCreationService;
import java.util.Objects;
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggingContext.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggingContext.java
index 542f709074..f827fec50f 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggingContext.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/LoggingContext.java
@@ -16,7 +16,7 @@
package org.openecomp.sdc.logging.api;
-import org.openecomp.sdc.logging.provider.LoggingContextService;
+import org.openecomp.sdc.logging.spi.LoggingContextService;
import java.util.Objects;
import java.util.concurrent.Callable;
@@ -59,12 +59,12 @@ public class LoggingContext {
SERVICE.clear();
}
- public static Runnable toRunnable(Runnable runnable) {
- return SERVICE.toRunnable(runnable);
+ public static Runnable copyToRunnable(Runnable runnable) {
+ return SERVICE.copyToRunnable(runnable);
}
- public static <V> Callable<V> toCallable(Callable<V> callable) {
- return SERVICE.toCallable(callable);
+ public static <V> Callable<V> copyToCallable(Callable<V> callable) {
+ return SERVICE.copyToCallable(callable);
}
private static class NoOpLoggingContextService implements LoggingContextService {
@@ -95,13 +95,13 @@ public class LoggingContext {
}
@Override
- public Runnable toRunnable(Runnable runnable) {
+ public Runnable copyToRunnable(Runnable runnable) {
Objects.requireNonNull(runnable, "Runnable cannot be null");
return runnable;
}
@Override
- public <V> Callable<V> toCallable(Callable<V> callable) {
+ public <V> Callable<V> copyToCallable(Callable<V> callable) {
Objects.requireNonNull(callable, "Callable cannot be null");
return callable;
}
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/ServiceBinder.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/ServiceBinder.java
index b16f3944e9..e3c9ea02de 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/ServiceBinder.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/api/ServiceBinder.java
@@ -16,9 +16,9 @@
package org.openecomp.sdc.logging.api;
-import org.openecomp.sdc.logging.provider.LoggerCreationService;
-import org.openecomp.sdc.logging.provider.LoggingContextService;
-import org.openecomp.sdc.logging.provider.LoggingServiceProvider;
+import org.openecomp.sdc.logging.spi.LoggerCreationService;
+import org.openecomp.sdc.logging.spi.LoggingContextService;
+import org.openecomp.sdc.logging.spi.LoggingServiceProvider;
import java.util.Iterator;
import java.util.Optional;
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggerCreationService.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggerCreationService.java
index 344d23688e..90aebfa221 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggerCreationService.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggerCreationService.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.openecomp.sdc.logging.provider;
+package org.openecomp.sdc.logging.spi;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggingContextService.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggingContextService.java
index 8e725e7cc5..7aed0fc7dc 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggingContextService.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggingContextService.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.openecomp.sdc.logging.provider;
+package org.openecomp.sdc.logging.spi;
import java.util.concurrent.Callable;
@@ -60,11 +60,11 @@ public interface LoggingContextService {
* Copies logging context of current thread onto a {@link Runnable}, so that the context is available
* when this {@link Runnable} runs in another thread.
*/
- Runnable toRunnable(Runnable runnable);
+ Runnable copyToRunnable(Runnable runnable);
/**
* Copies logging context of current thread onto a {@link Callable}, so that the context is available
* when this {@link Callable} runs in another thread
*/
- <V> Callable<V> toCallable(Callable<V> callable);
+ <V> Callable<V> copyToCallable(Callable<V> callable);
}
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggingServiceProvider.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggingServiceProvider.java
index baf99f0e55..12e4040feb 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/provider/LoggingServiceProvider.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/src/main/java/org/openecomp/sdc/logging/spi/LoggingServiceProvider.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.openecomp.sdc.logging.provider;
+package org.openecomp.sdc.logging.spi;
/**
* <p>From the application code (consumer) perspective, logger creation (factory) and logging context are independent