From 66618ec6bdeb0a4391faa77362c433a432a2110c Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Thu, 3 Oct 2019 13:52:54 -0400 Subject: [PATCH] review feedback --- .../module/channel/SubscriptionChannelRegistry.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java index c020f266e54..5ca8f099bc9 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelRegistry.java @@ -32,7 +32,7 @@ public class SubscriptionChannelRegistry { @Autowired private ModelConfig myModelConfig; - public void add(ActiveSubscription theActiveSubscription) { + public synchronized void add(ActiveSubscription theActiveSubscription) { if (!myModelConfig.isSubscriptionMatchingEnabled()) { return; } @@ -56,7 +56,7 @@ public class SubscriptionChannelRegistry { mySubscriptionChannelCache.put(channelName, subscriptionChannelWithHandlers); } - public void remove(ActiveSubscription theActiveSubscription) { + public synchronized void remove(ActiveSubscription theActiveSubscription) { if (!myModelConfig.isSubscriptionMatchingEnabled()) { return; } @@ -77,7 +77,7 @@ public class SubscriptionChannelRegistry { } } - public SubscriptionChannelWithHandlers get(String theChannelName) { + public synchronized SubscriptionChannelWithHandlers get(String theChannelName) { return mySubscriptionChannelCache.get(theChannelName); }