Search in sources :

Example 1 with FSMCallerOptions

use of io.dingodb.raft.option.FSMCallerOptions in project dingo by dingodb.

the class NodeImpl method initFSMCaller.

private boolean initFSMCaller(final LogId bootstrapId) {
    if (this.fsmCaller == null) {
        LOG.error("Fail to init fsm caller, null instance, bootstrapId={}.", bootstrapId);
        return false;
    }
    this.closureQueue = new ClosureQueueImpl();
    final FSMCallerOptions opts = new FSMCallerOptions();
    opts.setAfterShutdown(status -> afterShutdown());
    opts.setLogManager(this.logManager);
    opts.setFsm(this.options.getFsm());
    opts.setClosureQueue(this.closureQueue);
    opts.setNode(this);
    opts.setBootstrapId(bootstrapId);
    opts.setDisruptorBufferSize(this.raftOptions.getDisruptorBufferSize());
    return this.fsmCaller.init(opts);
}
Also used : FSMCallerOptions(io.dingodb.raft.option.FSMCallerOptions) ClosureQueueImpl(io.dingodb.raft.closure.ClosureQueueImpl)

Aggregations

ClosureQueueImpl (io.dingodb.raft.closure.ClosureQueueImpl)1 FSMCallerOptions (io.dingodb.raft.option.FSMCallerOptions)1