@Override
    public void close() {
        if (database != null) {
            database.close();
        }
    }
@Ignore
    @Test
    public void testRefreshTime() throws Exception {
        BDBEnvironment environment = initBDBEnv();
        BDBJEJournal journal = new BDBJEJournal(environment);
        journal.open();
        for (int i = 1; i < 10; ++ i) {
            if (i % 2 == 1) {
                journal.batchWriteBegin();
            }
            journal.batchWriteAppend(i, makeBuffer(i));
            if (i % 2 == 0) {
                journal.batchWriteCommit();
                journal.rollJournal(i + 1);
            }
        }
        journal.batchWriteCommit();
        journal.close();
        Assert.assertEquals(Arrays.asList(1L, 3L, 5L, 7L, 9L), environment.getDatabaseNames());

        long cnt = 1000000;
        long start = System.currentTimeMillis();
        for (int i = 0; i < cnt; ++ i) {
            environment.getDatabaseNames();
        }
        long interval = System.currentTimeMillis() - start;

        // 2022-07-12 17:20:49 .. - call environment.getDatabaseNames() 1000000 times cost 6797 ms
        // 2022-07-12 18:56:41 .. - call environment.getDatabaseNames() 1000000 times cost 6892 ms
        // seems like an in-memory operation, only cost 6µs
        LOG.info("call environment.getDatabaseNames() {} times cost {} ms", cnt, interval);
    }