test_class.declarator: registry
test_class.modifier: private
test_class.original_string: private HostRequestIntervalRegistry registry;
test_class.type: HostRequestIntervalRegistry
test_class.var_name: registry
test_class.file: common/transport/src/test/java/com/hashmapinc/server/common/transport/quota/inmemory/HostRequestIntervalRegistryTest.java
test_class.identifier: HostRequestIntervalRegistryTest
test_case.body: @Test
      public void emptyWhitelistParsedOk(){
          registry = new HostRequestIntervalRegistry(10000L, 100L,"", "b1");
          assertEquals(1L, registry.tick("aaa"));
      }
test_case.class_method_signature: HostRequestIntervalRegistryTest.emptyWhitelistParsedOk()
test_case.full_signature: @Test public void emptyWhitelistParsedOk()
test_case.identifier: emptyWhitelistParsedOk
test_case.invocations: assertEquals tick
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void emptyWhitelistParsedOk()
focal_class.declarator: hostCounts = new ConcurrentHashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, IntervalCount> hostCounts = new ConcurrentHashMap<>();
focal_class.type: Map<String, IntervalCount>
focal_class.var_name: hostCounts
focal_class.declarator: intervalDurationMs
focal_class.modifier: private final
focal_class.original_string: private final long intervalDurationMs;
focal_class.type: long
focal_class.var_name: intervalDurationMs
focal_class.declarator: ttlMs
focal_class.modifier: private final
focal_class.original_string: private final long ttlMs;
focal_class.type: long
focal_class.var_name: ttlMs
focal_class.declarator: whiteList
focal_class.modifier: private final
focal_class.original_string: private final Set<String> whiteList;
focal_class.type: Set<String>
focal_class.var_name: whiteList
focal_class.declarator: blackList
focal_class.modifier: private final
focal_class.original_string: private final Set<String> blackList;
focal_class.type: Set<String>
focal_class.var_name: blackList
focal_class.file: common/transport/src/main/java/com/hashmapinc/server/common/transport/quota/inmemory/HostRequestIntervalRegistry.java
focal_class.identifier: HostRequestIntervalRegistry
focal_class.class_method_signature: HostRequestIntervalRegistry.HostRequestIntervalRegistry(@Value("${quota.host.intervalMs}") long intervalDurationMs,
                                         @Value("${quota.host.ttlMs}") long ttlMs,
                                         @Value("${quota.host.whitelist}") String whiteList,
                                         @Value("${quota.host.blacklist}") String blackList)
focal_class.full_signature: public  HostRequestIntervalRegistry(@Value("${quota.host.intervalMs}") long intervalDurationMs,
                                         @Value("${quota.host.ttlMs}") long ttlMs,
                                         @Value("${quota.host.whitelist}") String whiteList,
                                         @Value("${quota.host.blacklist}") String blackList)
focal_class.identifier: HostRequestIntervalRegistry
focal_class.modifiers: public
focal_class.parameters: (@Value("${quota.host.intervalMs}") long intervalDurationMs,
                                         @Value("${quota.host.ttlMs}") long ttlMs,
                                         @Value("${quota.host.whitelist}") String whiteList,
                                         @Value("${quota.host.blacklist}") String blackList)
focal_class.signature:  HostRequestIntervalRegistry(@Value("${quota.host.intervalMs}") long intervalDurationMs,
                                         @Value("${quota.host.ttlMs}") long ttlMs,
                                         @Value("${quota.host.whitelist}") String whiteList,
                                         @Value("${quota.host.blacklist}") String blackList)
focal_class.class_method_signature: HostRequestIntervalRegistry.init()
focal_class.full_signature: @PostConstruct public void init()
focal_class.identifier: init
focal_class.modifiers: @PostConstruct public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: HostRequestIntervalRegistry.tick(String clientHostId)
focal_class.full_signature: public long tick(String clientHostId)
focal_class.identifier: tick
focal_class.modifiers: public
focal_class.parameters: (String clientHostId)
focal_class.return: long
focal_class.signature: long tick(String clientHostId)
focal_class.class_method_signature: HostRequestIntervalRegistry.clean()
focal_class.full_signature: public void clean()
focal_class.identifier: clean
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clean()
focal_class.class_method_signature: HostRequestIntervalRegistry.getContent()
focal_class.full_signature: public Map<String, Long> getContent()
focal_class.identifier: getContent
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, Long>
focal_class.signature: Map<String, Long> getContent()
focal_method.body: public long tick(String clientHostId) {
          if (whiteList.contains(clientHostId)) {
              return 0;
          } else if (blackList.contains(clientHostId)) {
              return Long.MAX_VALUE;
          }
          IntervalCount intervalCount = hostCounts.computeIfAbsent(clientHostId, s -> new IntervalCount(intervalDurationMs));
          return intervalCount.resetIfExpiredAndTick();
      }
focal_method.class_method_signature: HostRequestIntervalRegistry.tick(String clientHostId)
focal_method.full_signature: public long tick(String clientHostId)
focal_method.identifier: tick
focal_method.invocations: contains contains computeIfAbsent resetIfExpiredAndTick
focal_method.modifiers: public
focal_method.parameters: (String clientHostId)
focal_method.return: long
focal_method.signature: long tick(String clientHostId)