test_class.declarator: scope = new ArrayList<>()
test_class.modifier: private
test_class.original_string: private List<Tuple2<Integer, Integer>> scope = new ArrayList<>();
test_class.type: List<Tuple2<Integer, Integer>>
test_class.var_name: scope
test_class.declarator: step = 5000
test_class.modifier: private
test_class.original_string: private int step = 5000;
test_class.type: int
test_class.var_name: step
test_class.declarator: rowIdQueue = new ConcurrentLinkedQueue<>()
test_class.modifier: private
test_class.original_string: private ConcurrentLinkedQueue<UnsignedLongValue> rowIdQueue = new ConcurrentLinkedQueue<>();
test_class.type: ConcurrentLinkedQueue<UnsignedLongValue>
test_class.var_name: rowIdQueue
test_class.declarator: INTERVAL = UnsignedLongValue.getInstance(new BigInteger("1"))
test_class.modifier: private static final
test_class.original_string: private static final UnsignedLongValue INTERVAL = UnsignedLongValue.getInstance(new BigInteger("1"));
test_class.type: UnsignedLongValue
test_class.var_name: INTERVAL
test_class.declarator: executor
test_class.modifier: private
test_class.original_string: private ThreadPoolExecutor executor;
test_class.type: ThreadPoolExecutor
test_class.var_name: executor
test_class.declarator: num = 1000000
test_class.modifier: private
test_class.original_string: private int num = 1000000;
test_class.type: int
test_class.var_name: num
test_class.declarator: router
test_class.modifier: private
test_class.original_string: private Router router;
test_class.type: Router
test_class.var_name: router
test_class.file: jimsql/jim-sdk/jim-engine/src/test/java/io/jimdb/engine/table/alloc/AutoIncrIDAllocatorTest.java
test_class.identifier: AutoIncrIdAllocatorTest
test_case.body: @Test
    public void testAllocByLocal() throws Exception {
      ConcurrentHashMap<Long, Long> map = new ConcurrentHashMap();
      CountDownLatch latch = new CountDownLatch(num);
      for (int i = 0; i < num; i++) {
        executor.execute(() -> {
          try {
            UnsignedLongValue value = (UnsignedLongValue) alloc();
            if (map.get(value.getValue().longValue()) != null) {
              System.out.println("duplate:" + value.getString());
            } else {
              Long v = value.getValue().longValue();
              map.put(v, v);
            }
          } catch (RuntimeException e) {
            e.printStackTrace();
            System.out.println("executor err " + e.getMessage());
            return;
          } finally {
            latch.countDown();
          }
        });
      }
      try {
        latch.await();
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      executor.shutdown();
    }
test_case.class_method_signature: AutoIncrIdAllocatorTest.testAllocByLocal()
test_case.full_signature: @Test public void testAllocByLocal()
test_case.identifier: testAllocByLocal
test_case.invocations: execute alloc get longValue getValue println getString longValue getValue put printStackTrace println getMessage countDown await printStackTrace shutdown
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAllocByLocal()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(AutoIncrIDAllocator.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(AutoIncrIDAllocator.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: INTERVAL = UnsignedLongValue.getInstance(new BigInteger("1"))
focal_class.modifier: private static final
focal_class.original_string: private static final UnsignedLongValue INTERVAL = UnsignedLongValue.getInstance(new BigInteger("1"));
focal_class.type: UnsignedLongValue
focal_class.var_name: INTERVAL
focal_class.declarator: step
focal_class.modifier: private
focal_class.original_string: private int step;
focal_class.type: int
focal_class.var_name: step
focal_class.declarator: metaStore
focal_class.modifier: private
focal_class.original_string: private MetaStore metaStore;
focal_class.type: MetaStore
focal_class.var_name: metaStore
focal_class.declarator: tableIDAllocatorMap = new ConcurrentHashMap<>()
focal_class.modifier: private
focal_class.original_string: private ConcurrentMap<String, TableIDAllocator> tableIDAllocatorMap = new ConcurrentHashMap<>();
focal_class.type: ConcurrentMap<String, TableIDAllocator>
focal_class.var_name: tableIDAllocatorMap
focal_class.file: jimsql/jim-sdk/jim-engine/src/main/java/io/jimdb/engine/table/alloc/AutoIncrIDAllocator.java
focal_class.identifier: AutoIncrIDAllocator
focal_class.interfaces: implements IDAllocator
focal_class.class_method_signature: AutoIncrIDAllocator.AutoIncrIDAllocator(MetaStore metaStore, int rowIdStepSize)
focal_class.full_signature: public  AutoIncrIDAllocator(MetaStore metaStore, int rowIdStepSize)
focal_class.identifier: AutoIncrIDAllocator
focal_class.modifiers: public
focal_class.parameters: (MetaStore metaStore, int rowIdStepSize)
focal_class.signature:  AutoIncrIDAllocator(MetaStore metaStore, int rowIdStepSize)
focal_class.class_method_signature: AutoIncrIDAllocator.alloc(int dbId, int tableId, int size)
focal_class.full_signature: public List<UnsignedLongValue> alloc(int dbId, int tableId, int size)
focal_class.identifier: alloc
focal_class.modifiers: public
focal_class.parameters: (int dbId, int tableId, int size)
focal_class.return: List<UnsignedLongValue>
focal_class.signature: List<UnsignedLongValue> alloc(int dbId, int tableId, int size)
focal_class.class_method_signature: AutoIncrIDAllocator.getTableIDAllocator(int dbId, int tableId)
focal_class.full_signature: private TableIDAllocator getTableIDAllocator(int dbId, int tableId)
focal_class.identifier: getTableIDAllocator
focal_class.modifiers: private
focal_class.parameters: (int dbId, int tableId)
focal_class.return: TableIDAllocator
focal_class.signature: TableIDAllocator getTableIDAllocator(int dbId, int tableId)
focal_class.class_method_signature: AutoIncrIDAllocator.removeIDAlloctor(int dbId, int tableId)
focal_class.full_signature: public void removeIDAlloctor(int dbId, int tableId)
focal_class.identifier: removeIDAlloctor
focal_class.modifiers: public
focal_class.parameters: (int dbId, int tableId)
focal_class.return: void
focal_class.signature: void removeIDAlloctor(int dbId, int tableId)
focal_class.class_method_signature: AutoIncrIDAllocator.getKey(int dbId, int tableId)
focal_class.full_signature: private String getKey(int dbId, int tableId)
focal_class.identifier: getKey
focal_class.modifiers: private
focal_class.parameters: (int dbId, int tableId)
focal_class.return: String
focal_class.signature: String getKey(int dbId, int tableId)
focal_method.body: public List<UnsignedLongValue> alloc(int dbId, int tableId, int size) {
      if (LOGGER.isInfoEnabled()) {
        LOGGER.info("alloc id: dbId {}, tableId{}, size{}.", dbId, tableId, size);
      }
      return getTableIDAllocator(dbId, tableId).alloc(size);
    }
focal_method.class_method_signature: AutoIncrIDAllocator.alloc(int dbId, int tableId, int size)
focal_method.full_signature: public List<UnsignedLongValue> alloc(int dbId, int tableId, int size)
focal_method.identifier: alloc
focal_method.invocations: isInfoEnabled info alloc getTableIDAllocator
focal_method.modifiers: public
focal_method.parameters: (int dbId, int tableId, int size)
focal_method.return: List<UnsignedLongValue>
focal_method.signature: List<UnsignedLongValue> alloc(int dbId, int tableId, int size)