Revision 45126
Added by Claudio Atzori about 7 years ago
ResourceStateSubscriptionRegistry.java | ||
---|---|---|
87 | 87 |
* @return subscription id (potentially changed) |
88 | 88 |
*/ |
89 | 89 |
private String registerSubscription(final ResourceStateSubscription subscription) { |
90 |
if(log.isDebugEnabled()) { |
|
91 |
log.debug("evict subscriptions cache"); |
|
92 |
} |
|
90 | 93 |
|
91 |
log.info("evict subscriptions cache"); |
|
92 |
|
|
93 | 94 |
// TODO: change the dao, and implement a method which finds a given subscription directly. |
94 | 95 |
final Collection<ResourceStateSubscription> similar = subscriptionDao.listSubscriptions(subscription.getPrefix(), subscription.getType(), |
95 | 96 |
subscription.getResourceId()); |
... | ... | |
182 | 183 |
@Cacheable(value="subscriptions", key="{ #prefix, #type, #resId }") |
183 | 184 |
public Collection<ResourceStateSubscription> listMatchingSubscriptions(final String prefix, final String type, final String resId) { |
184 | 185 |
|
185 |
log.info(String.format("uncached list subscriptions [prefix: '%s', type: '%s', resourceId: '%s']", prefix, type, resId)); |
|
186 |
|
|
186 |
if(log.isDebugEnabled()) { |
|
187 |
log.debug(String.format("uncached list subscriptions [prefix: '%s', type: '%s', resourceId: '%s']", prefix, type, resId)); |
|
188 |
} |
|
187 | 189 |
final Set<ResourceStateSubscription> merged = new HashSet<ResourceStateSubscription>(); |
188 | 190 |
merged.addAll(subscriptionDao.listSubscriptions(prefix, type, resId)); |
189 | 191 |
merged.addAll(subscriptionDao.listSubscriptions(prefix, type, "*")); |
Also available in: Unified diff
migrated to dnet45, using updated mockito version in tests