test_class.declarator: execution
test_class.modifier: @Mock
test_class.original_string: @Mock Execution execution;
test_class.type: Execution
test_class.var_name: execution
test_class.declarator: functionServiceHelper
test_class.modifier: @Mock
test_class.original_string: @Mock FunctionServiceHelper functionServiceHelper;
test_class.type: FunctionServiceHelper
test_class.var_name: functionServiceHelper
test_class.declarator: resultCollector
test_class.modifier: @Mock
test_class.original_string: @Mock ResultCollector<?,?> resultCollector;
test_class.type: ResultCollector<?,?>
test_class.var_name: resultCollector
test_class.declarator: idGenerator
test_class.original_string: PartitionedRegionIDGenerator idGenerator;
test_class.type: PartitionedRegionIDGenerator
test_class.var_name: idGenerator
test_class.declarator: collection
test_class.original_string: Collection<long[]> collection;
test_class.type: Collection<long[]>
test_class.var_name: collection
test_class.file: gemfire-utils/gemfire-keyfw/src/test/java/io/pivotal/bds/gemfire/keyfw/generator/PartitionedRegionIDGeneratorTest.java
test_class.identifier: PartitionedRegionIDGeneratorTest
test_case.body: @Test
      void getId() {
          assertEquals((long)idGenerator.generate("test"), 0L);
          assertEquals((long)idGenerator.generate("test"), 1L);
          assertEquals((long)idGenerator.generate("test"), 2L);
          assertEquals((long)idGenerator.generate("test"), 3L);
      }
test_case.class_method_signature: PartitionedRegionIDGeneratorTest.getId()
test_case.full_signature: @Test void getId()
test_case.identifier: getId
test_case.invocations: assertEquals generate assertEquals generate assertEquals generate assertEquals generate
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void getId()
focal_class.declarator: idRegion
focal_class.modifier: private
focal_class.original_string: private Region<String, Long> idRegion;
focal_class.type: Region<String, Long>
focal_class.var_name: idRegion
focal_class.declarator: functionServiceHelper
focal_class.modifier: private
focal_class.original_string: private FunctionServiceHelper functionServiceHelper;
focal_class.type: FunctionServiceHelper
focal_class.var_name: functionServiceHelper
focal_class.declarator: nextId = -1L
focal_class.modifier: private
focal_class.original_string: private long nextId = -1L;
focal_class.type: long
focal_class.var_name: nextId
focal_class.declarator: lastId = -1L
focal_class.modifier: private
focal_class.original_string: private long lastId = -1L;
focal_class.type: long
focal_class.var_name: lastId
focal_class.declarator: LOG = LoggerFactory.getLogger(PartitionedRegionIDGenerator.class)
focal_class.modifier: private  static final
focal_class.original_string: private  static final Logger LOG = LoggerFactory.getLogger(PartitionedRegionIDGenerator.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: gemfire-utils/gemfire-keyfw/src/main/java/io/pivotal/bds/gemfire/keyfw/generator/PartitionedRegionIDGenerator.java
focal_class.identifier: PartitionedRegionIDGenerator
focal_class.interfaces: implements IDGenerator<Long>
focal_class.class_method_signature: PartitionedRegionIDGenerator.PartitionedRegionIDGenerator(Region<String, Long> idRegion, FunctionServiceHelper functionServiceHelper)
focal_class.full_signature: public  PartitionedRegionIDGenerator(Region<String, Long> idRegion, FunctionServiceHelper functionServiceHelper)
focal_class.identifier: PartitionedRegionIDGenerator
focal_class.modifiers: public
focal_class.parameters: (Region<String, Long> idRegion, FunctionServiceHelper functionServiceHelper)
focal_class.signature:  PartitionedRegionIDGenerator(Region<String, Long> idRegion, FunctionServiceHelper functionServiceHelper)
focal_class.class_method_signature: PartitionedRegionIDGenerator.generate(String domain)
focal_class.full_signature: @Override public synchronized Long generate(String domain)
focal_class.identifier: generate
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (String domain)
focal_class.return: Long
focal_class.signature: Long generate(String domain)
focal_method.body: @Override
      public synchronized Long generate(String domain) {
          if (nextId < 0L || nextId > lastId) {
              Collection<long[]> coll = (Collection<long[]>) functionServiceHelper
                      .onRegion(idRegion)
                      .withArgs(domain)
                      .execute("PartitionedRegionIDGeneratorFunction")
                      .getResult();
              assert coll.size() == 1;
  
              long[] ids = coll.iterator().next();
              assert ids.length == 2;
  
              nextId = ids[0];
              lastId = ids[1];
          }
  
          LOG.debug("generate: domain={}, nextId={}, lastId={}", domain, nextId, lastId);
          return nextId++;
      }
focal_method.class_method_signature: PartitionedRegionIDGenerator.generate(String domain)
focal_method.full_signature: @Override public synchronized Long generate(String domain)
focal_method.identifier: generate
focal_method.invocations: getResult execute withArgs onRegion size next iterator debug
focal_method.modifiers: @Override public synchronized
focal_method.parameters: (String domain)
focal_method.return: Long
focal_method.signature: Long generate(String domain)