Search in sources :

Example 1 with LogManagerImpl

use of io.dingodb.raft.storage.impl.LogManagerImpl in project dingo by dingodb.

the class NodeImpl method initLogStorage.

private boolean initLogStorage() {
    Requires.requireNonNull(this.fsmCaller, "Null fsm caller");
    this.logStorage = this.serviceFactory.createLogStorage(this.options.getLogUri(), this.raftOptions);
    this.logManager = new LogManagerImpl();
    final LogManagerOptions opts = new LogManagerOptions();
    opts.setLogEntryCodecFactory(this.serviceFactory.createLogEntryCodecFactory());
    opts.setLogStorage(this.logStorage);
    opts.setConfigurationManager(this.configManager);
    opts.setFsmCaller(this.fsmCaller);
    opts.setNodeMetrics(this.metrics);
    opts.setDisruptorBufferSize(this.raftOptions.getDisruptorBufferSize());
    opts.setRaftOptions(this.raftOptions);
    opts.setRaftLogStorageOptions(this.options.getRaftLogStorageOptions());
    return this.logManager.init(opts);
}
Also used : LogManagerImpl(io.dingodb.raft.storage.impl.LogManagerImpl) LogManagerOptions(io.dingodb.raft.option.LogManagerOptions)

Aggregations

LogManagerOptions (io.dingodb.raft.option.LogManagerOptions)1 LogManagerImpl (io.dingodb.raft.storage.impl.LogManagerImpl)1