public AbstractJournalStorageManager(Configuration config, CriticalAnalyzer analyzer, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutorService, ExecutorFactory ioExecutorFactory, IOCriticalErrorListener criticalErrorListener) { super(analyzer, CRITICAL_PATHS); this.executorFactory = executorFactory; this.ioCriticalErrorListener = criticalErrorListener; this.ioExecutorFactory = ioExecutorFactory; this.scheduledExecutorService = scheduledExecutorService; this.config = config; executor = executorFactory.getExecutor(); syncNonTransactional = config.isJournalSyncNonTransactional(); syncTransactional = config.isJournalSyncTransactional(); init(config, criticalErrorListener); idGenerator = new BatchingIDGenerator(0, CHECKPOINT_BATCH_SIZE, this); }
BatchingIDGenerator batch = new BatchingIDGenerator(0, 1000, getJournalStorageManager(journal)); long id1 = batch.generateID(); long id2 = batch.generateID(); batch = new BatchingIDGenerator(0, 1000, getJournalStorageManager(journal)); loadIDs(journal, batch); batch = new BatchingIDGenerator(0, 1000, getJournalStorageManager(journal)); loadIDs(journal, batch); batch = new BatchingIDGenerator(0, 1000, getJournalStorageManager(journal)); loadIDs(journal, batch); batch = new BatchingIDGenerator(0, 1000, getJournalStorageManager(journal)); loadIDs(journal, batch); batch = new BatchingIDGenerator(0, 1000, getJournalStorageManager(journal)); loadIDs(journal, batch);