@Test(expected = InsufficientCacheCapacityException.class) public void onFullCapacityThrowError() { AtomicReference<SerializedCommandResponse> responseAtomicReference = new AtomicReference<>(); testSubject.put("1234", new CommandInformation("1234", "Source", "Target", responseAtomicReference::set, new ClientStreamIdentification("context", "client"), "component")); testSubject.put("4567", new CommandInformation("4567", "Source", "Target", responseAtomicReference::set, new ClientStreamIdentification("context", "client"), "component")); }
@Override public CommandInformation put(@Nonnull String key, @Nonnull CommandInformation value) { checkCapacity(); return super.put(key, value); }
CommandCache extends ConcurrentHashMap<String, CommandInformation> { @Override public CommandInformation put(@Nonnull String key, @Nonnull CommandInformation value) { checkCapacity(); return super.put(key, value); } }
CommandCache extends ConcurrentHashMap<String, CommandInformation> { @Override public CommandInformation put(@Nonnull String key, @Nonnull CommandInformation value) { checkCapacity(); return super.put(key, value); } @Autowired  CommandCache(@Value("${axoniq.axonserver.default-command-timeout:300000}") long defaultCommandTimeout,
                        Clock clock, @Value("${axoniq.axonserver.command-cache-capacity:0}") long cacheCapacity);  CommandCache(Clock clock); }
CommandCache extends ConcurrentHashMap<String, CommandInformation> { @Override public CommandInformation put(@Nonnull String key, @Nonnull CommandInformation value) { checkCapacity(); return super.put(key, value); } @Autowired  CommandCache(@Value("${axoniq.axonserver.default-command-timeout:300000}") long defaultCommandTimeout,
                        Clock clock, @Value("${axoniq.axonserver.command-cache-capacity:0}") long cacheCapacity);  CommandCache(Clock clock); @Scheduled(fixedDelayString = "${axoniq.axonserver.cache-close-rate:5000}") void clearOnTimeout(); @Override CommandInformation put(@Nonnull String key, @Nonnull CommandInformation value); @Override CommandInformation putIfAbsent(String key, CommandInformation value); @Override void putAll(Map<? extends String, ? extends CommandInformation> m); }
CommandCache extends ConcurrentHashMap<String, CommandInformation> { @Override public CommandInformation put(@Nonnull String key, @Nonnull CommandInformation value) { checkCapacity(); return super.put(key, value); } @Autowired  CommandCache(@Value("${axoniq.axonserver.default-command-timeout:300000}") long defaultCommandTimeout,
                        Clock clock, @Value("${axoniq.axonserver.command-cache-capacity:0}") long cacheCapacity);  CommandCache(Clock clock); @Scheduled(fixedDelayString = "${axoniq.axonserver.cache-close-rate:5000}") void clearOnTimeout(); @Override CommandInformation put(@Nonnull String key, @Nonnull CommandInformation value); @Override CommandInformation putIfAbsent(String key, CommandInformation value); @Override void putAll(Map<? extends String, ? extends CommandInformation> m);  }