@Test(expected = InsufficientCacheCapacityException.class) public void onFullCapacityThrowError() { testSubject.put("1234", mock(QueryInformation.class)); testSubject.put("4567", mock(QueryInformation.class)); }
@Override public QueryInformation put(@Nonnull String key, @Nonnull QueryInformation value) { checkCapacity(); return super.put(key, value); }
QueryCache extends ConcurrentHashMap<String, QueryInformation> { @Override public QueryInformation put(@Nonnull String key, @Nonnull QueryInformation value) { checkCapacity(); return super.put(key, value); } }
QueryCache extends ConcurrentHashMap<String, QueryInformation> { @Override public QueryInformation put(@Nonnull String key, @Nonnull QueryInformation value) { checkCapacity(); return super.put(key, value); } QueryCache(@Value("${axoniq.axonserver.default-query-timeout:300000}") long defaultQueryTimeout,
                      @Value("${axoniq.axonserver.query-cache-capacity:10000}") long cacheCapacity); }
QueryCache extends ConcurrentHashMap<String, QueryInformation> { @Override public QueryInformation put(@Nonnull String key, @Nonnull QueryInformation value) { checkCapacity(); return super.put(key, value); } QueryCache(@Value("${axoniq.axonserver.default-query-timeout:300000}") long defaultQueryTimeout,
                      @Value("${axoniq.axonserver.query-cache-capacity:10000}") long cacheCapacity); QueryInformation remove(String messagId); @Scheduled(fixedDelayString = "${axoniq.axonserver.cache-close-rate:5000}") void clearOnTimeout(); @EventListener void on(TopologyEvents.QueryHandlerDisconnected queryHandlerDisconnected); @Override QueryInformation put(@Nonnull String key, @Nonnull QueryInformation value); @Override QueryInformation putIfAbsent(String key, QueryInformation value); @Override void putAll(Map<? extends String, ? extends QueryInformation> m); }
QueryCache extends ConcurrentHashMap<String, QueryInformation> { @Override public QueryInformation put(@Nonnull String key, @Nonnull QueryInformation value) { checkCapacity(); return super.put(key, value); } QueryCache(@Value("${axoniq.axonserver.default-query-timeout:300000}") long defaultQueryTimeout,
                      @Value("${axoniq.axonserver.query-cache-capacity:10000}") long cacheCapacity); QueryInformation remove(String messagId); @Scheduled(fixedDelayString = "${axoniq.axonserver.cache-close-rate:5000}") void clearOnTimeout(); @EventListener void on(TopologyEvents.QueryHandlerDisconnected queryHandlerDisconnected); @Override QueryInformation put(@Nonnull String key, @Nonnull QueryInformation value); @Override QueryInformation putIfAbsent(String key, QueryInformation value); @Override void putAll(Map<? extends String, ? extends QueryInformation> m);  }