/** * Creates a new instance of the DebugLogWrapper class. * * @param logId The Id of the BookKeeperLog to wrap. * @param zkClient A pointer to the CuratorFramework client to use. * @param bookKeeper A pointer to the BookKeeper client to use. * @param config BookKeeperConfig to use. * @param executor An Executor to use for async operations. */ DebugLogWrapper(int logId, CuratorFramework zkClient, BookKeeper bookKeeper, BookKeeperConfig config, ScheduledExecutorService executor) { this.log = new BookKeeperLog(logId, zkClient, bookKeeper, config, executor); this.bkClient = bookKeeper; this.config = config; this.initialized = new AtomicBoolean(); }
@Override public DurableDataLog createDurableDataLog(int logId) { Preconditions.checkState(this.bookKeeper.get() != null, "BookKeeperLogFactory is not initialized."); return new BookKeeperLog(logId, this.zkClient, this.bookKeeper.get(), this.config, this.executor); }