aboutsummaryrefslogtreecommitdiffstats
path: root/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/AbstractDistributor.java
diff options
context:
space:
mode:
Diffstat (limited to 'context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/AbstractDistributor.java')
-rw-r--r--context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/AbstractDistributor.java44
1 files changed, 12 insertions, 32 deletions
diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/AbstractDistributor.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/AbstractDistributor.java
index 3444f9342..4d5d01c86 100644
--- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/AbstractDistributor.java
+++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/AbstractDistributor.java
@@ -26,6 +26,9 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.Setter;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.context.Distributor;
@@ -56,22 +59,25 @@ public abstract class AbstractDistributor implements Distributor {
// Logger for this class
private static final XLogger LOGGER = XLoggerFactory.getXLogger(AbstractDistributor.class);
- // The key of this distributor
- private AxArtifactKey key = null;
-
// The context albums for this context set indexed by their keys
private static Map<AxArtifactKey, ContextAlbum> albumMaps = Collections
.synchronizedMap(new HashMap<AxArtifactKey, ContextAlbum>());
// Lock manager for this distributor
+ @Setter(AccessLevel.PRIVATE)
private static LockManager lockManager = null;
- // Hold a persistor for this distributor
- private Persistor persistor = null;
-
// Hold a flush timer for this context distributor
+ @Setter(AccessLevel.PRIVATE)
private static DistributorFlushTimerTask flushTimer = null;
+ // The key of this distributor
+ @Getter
+ private AxArtifactKey key = null;
+
+ // Hold a persistor for this distributor
+ private Persistor persistor = null;
+
/**
* Create an instance of an abstract Context Distributor.
*/
@@ -106,38 +112,12 @@ public abstract class AbstractDistributor implements Distributor {
}
/**
- * Set the static lock manager.
- *
- * @param incomingLockManager the lock manager value
- */
- private static void setLockManager(final LockManager incomingLockManager) {
- lockManager = incomingLockManager;
- }
-
- /**
- * Set the static flush timer.
- *
- * @param incomingFlushTimer the flush timer value
- */
- private static void setFlushTimer(final DistributorFlushTimerTask incomingFlushTimer) {
- flushTimer = incomingFlushTimer;
- }
-
- /**
* {@inheritDoc}.
*/
@Override
public abstract void shutdown();
/**
- * {@inheritDoc}.
- */
- @Override
- public AxArtifactKey getKey() {
- return key;
- }
-
- /**
* Create a context album using whatever underlying mechanism we are using for albums.
*
* @param contextAlbumKey The key of the album