@Override public SubscriptionMatchResult match(CanonicalSubscription theSubscription, ResourceModifiedMessage theMsg) { try { return match(theSubscription.getCriteriaString(), theMsg.getNewPayload(myContext)); } catch (Exception e) { throw new InternalErrorException("Failure processing resource ID[" + theMsg.getId(myContext) + "] for subscription ID[" + theSubscription.getIdElementString() + "]: " + e.getMessage(), e); } }
@Override public SubscriptionMatchResult match(CanonicalSubscription theSubscription, ResourceModifiedMessage theMsg) { SubscriptionMatchResult result; if (myDaoConfig.isEnableInMemorySubscriptionMatching()) { result = myInMemorySubscriptionMatcher.match(theSubscription, theMsg); if (result.supported()) { // TODO KHS test result.setInMemory(true); } else { ourLog.info("Criteria {} for Subscription {} not supported by InMemoryMatcher: {}. Reverting to DatabaseMatcher", theSubscription.getCriteriaString(), theSubscription.getIdElementString(), result.getUnsupportedReason()); result = myDaoSubscriptionMatcher.match(theSubscription, theMsg); } } else { result = myDaoSubscriptionMatcher.match(theSubscription, theMsg); } return result; } }
@Override public SubscriptionMatchResult match(CanonicalSubscription theSubscription, ResourceModifiedMessage theMsg) { SubscriptionMatchResult result; if (myDaoConfig.isEnableInMemorySubscriptionMatching()) { result = myInMemorySubscriptionMatcher.match(theSubscription, theMsg); if (result.supported()) { // TODO KHS test result.setInMemory(true); } else { ourLog.info("Criteria {} for Subscription {} not supported by InMemoryMatcher: {}. Reverting to DatabaseMatcher", theSubscription.getCriteriaString(), theSubscription.getIdElementString(), result.getUnsupportedReason()); result = myDaoSubscriptionMatcher.match(theSubscription, theMsg); } } else { result = myDaoSubscriptionMatcher.match(theSubscription, theMsg); } return result; } }