diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java index 435bea071f6..6f6052dcd64 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/LinkedBlockingQueueSubscribableChannelFactory.java @@ -28,7 +28,7 @@ import java.util.concurrent.LinkedBlockingQueue; public class LinkedBlockingQueueSubscribableChannelFactory implements ISubscribableChannelFactory { @Override - public SubscribableChannel createSubscribableChannel(String theChannelName, int theConcurrentConsumers) { + public SubscribableChannel createSubscribableChannel(String theChannelName, Class theMessageType, int theConcurrentConsumers) { return new LinkedBlockingQueueSubscribableChannel(new LinkedBlockingQueue<>(SubscriptionConstants.DELIVERY_EXECUTOR_QUEUE_SIZE), theChannelName + "-%d", theConcurrentConsumers); } diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java index 41cff5edd13..7407a42447a 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/ISubscribableChannelFactory.java @@ -23,7 +23,7 @@ package ca.uhn.fhir.jpa.subscription.module.channel; import org.springframework.messaging.SubscribableChannel; public interface ISubscribableChannelFactory { - SubscribableChannel createSubscribableChannel(String theChannelName, int theConcurrentConsumers); + SubscribableChannel createSubscribableChannel(String theChannelName, Class theMessageType, int theConcurrentConsumers); int getDeliveryChannelConcurrentConsumers(); diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java index c4a53b8d696..88019963d06 100644 --- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java +++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/channel/SubscriptionChannelFactory.java @@ -20,6 +20,8 @@ package ca.uhn.fhir.jpa.subscription.module.channel; * #L% */ +import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage; +import ca.uhn.fhir.jpa.subscription.module.subscriber.ResourceDeliveryMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.SubscribableChannel; import org.springframework.stereotype.Component; @@ -35,10 +37,10 @@ public class SubscriptionChannelFactory { } public SubscribableChannel newDeliveryChannel(String theChannelName) { - return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, mySubscribableChannelFactory.getDeliveryChannelConcurrentConsumers()); + return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, ResourceDeliveryMessage.class, mySubscribableChannelFactory.getDeliveryChannelConcurrentConsumers()); } public SubscribableChannel newMatchingChannel(String theChannelName) { - return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, mySubscribableChannelFactory.getMatchingChannelConcurrentConsumers()); + return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, ResourceModifiedMessage.class, mySubscribableChannelFactory.getMatchingChannelConcurrentConsumers()); } } diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java index 64b042db6e7..0d6c3d6bc3f 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java @@ -48,9 +48,11 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { private final AtomicReference myCountdownLatch = new AtomicReference<>(); private final AtomicReference> myFailures = new AtomicReference<>(); private final AtomicReference> myCalledWith = new AtomicReference<>(); - private final Pointcut myPointcut; + private int myDefaultTimeoutSeconds = DEFAULT_TIMEOUT_SECONDS; + private final Pointcut myPointcut; private int myInitialCount; + public PointcutLatch(Pointcut thePointcut) { this.name = thePointcut.name(); myPointcut = thePointcut; @@ -58,7 +60,12 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { public PointcutLatch(String theName) { this.name = theName; - myPointcut = null; + myPointcut = null; + } + + public PointcutLatch setDefaultTimeoutSeconds(int theDefaultTimeoutSeconds) { + myDefaultTimeoutSeconds = theDefaultTimeoutSeconds; + return this; } @Override @@ -91,14 +98,14 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { @Override public List awaitExpected() throws InterruptedException { - return awaitExpectedWithTimeout(DEFAULT_TIMEOUT_SECONDS); + return awaitExpectedWithTimeout(myDefaultTimeoutSeconds); } public List awaitExpectedWithTimeout(int timeoutSecond) throws InterruptedException { List retval = myCalledWith.get(); try { CountDownLatch latch = myCountdownLatch.get(); - Validate.notNull(latch, getName() + " awaitExpected() called before setExpected() called."); + Validate.notNull(latch, getName() + " awaitExpected() called before setExpected() called."); if (!latch.await(timeoutSecond, TimeUnit.SECONDS)) { throw new AssertionError(getName() + " timed out waiting " + timeoutSecond + " seconds for latch to countdown from " + myInitialCount + " to 0. Is " + latch.getCount() + "."); } @@ -145,7 +152,7 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { @Override public void invoke(Pointcut thePointcut, HookParams theArgs) { - CountDownLatch latch = myCountdownLatch.get(); + CountDownLatch latch = myCountdownLatch.get(); if (latch == null) { throw new PointcutLatchException("invoke() called outside of setExpectedCount() .. awaitExpected(). Probably got more invocations than expected or clear() was called before invoke() arrived.", theArgs); } else if (latch.getCount() <= 0) { diff --git a/pom.xml b/pom.xml index fdb314c6bce..71b90e0e974 100755 --- a/pom.xml +++ b/pom.xml @@ -625,8 +625,8 @@ 5.4.2.Final 4.4.11 4.5.9 - 2.9.9 - 2.9.10 + 2.10.0 + 2.10.0 3.1.0 1.8 4.0.0.Beta3 diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 3c3cc16bd39..3f5f5b3fa72 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -79,6 +79,13 @@ stored in the RDBMS. ]]> + + New Feature: + The R4 structures have been upgraded to the new 4.0.1 (Technical Correction) release, and the + R5 structure have been upgraded to the current (October) snapshot. + ]]> + Performance Improvement: