Search in sources :

Example 1 with Closure

use of io.dingodb.raft.Closure in project dingo by dingodb.

the class IteratorImpl method runTheRestClosureWithError.

protected void runTheRestClosureWithError() {
    for (long i = Math.max(this.currentIndex, this.firstClosureIndex); i <= this.committedIndex; i++) {
        final Closure done = this.closures.get((int) (i - this.firstClosureIndex));
        if (done != null) {
            Requires.requireNonNull(this.error, "error");
            Requires.requireNonNull(this.error.getStatus(), "error.status");
            final Status status = this.error.getStatus();
            Utils.runClosureInThread(done, status);
        }
    }
}
Also used : Status(io.dingodb.raft.Status) Closure(io.dingodb.raft.Closure)

Example 2 with Closure

use of io.dingodb.raft.Closure in project dingo by dingodb.

the class NodeImpl method shutdown.

@Override
public void shutdown(Closure done) {
    List<RepeatedTimer> timers = null;
    this.writeLock.lock();
    try {
        LOG.info("Node {} shutdown, currTerm={} state={}.", getNodeId(), this.currTerm, this.state);
        if (this.state.compareTo(State.STATE_SHUTTING) < 0) {
            NodeManager.getInstance().remove(this);
            // If it is follower, call on_stop_following in step_down
            if (this.state.compareTo(State.STATE_FOLLOWER) <= 0) {
                stepDown(this.currTerm, this.state == State.STATE_LEADER, new Status(RaftError.ESHUTDOWN, "Raft node is going to quit."));
            }
            this.state = State.STATE_SHUTTING;
            // Stop all timers
            timers = stopAllTimers();
            if (this.readOnlyService != null) {
                this.readOnlyService.shutdown();
            }
            if (this.logManager != null) {
                this.logManager.shutdown();
            }
            if (this.metaStorage != null) {
                this.metaStorage.shutdown();
            }
            if (this.snapshotExecutor != null) {
                this.snapshotExecutor.shutdown();
            }
            if (this.wakingCandidate != null) {
                Replicator.stop(this.wakingCandidate);
            }
            if (this.fsmCaller != null) {
                this.fsmCaller.shutdown();
            }
            if (this.rpcService != null) {
                this.rpcService.shutdown();
            }
            if (this.applyQueue != null) {
                final CountDownLatch latch = new CountDownLatch(1);
                this.shutdownLatch = latch;
                Utils.runInThread(() -> this.applyQueue.publishEvent((event, sequence) -> event.shutdownLatch = latch));
            } else {
                final int num = GLOBAL_NUM_NODES.decrementAndGet();
                LOG.info("The number of active nodes decrement to {}.", num);
            }
            if (this.timerManager != null) {
                this.timerManager.shutdown();
            }
        }
        if (this.state != State.STATE_SHUTDOWN) {
            if (done != null) {
                this.shutdownContinuations.add(done);
                done = null;
            }
            return;
        }
    } finally {
        this.writeLock.unlock();
        // Destroy all timers out of lock
        if (timers != null) {
            destroyAllTimers(timers);
        }
        // Call join() asynchronously
        final Closure shutdownHook = done;
        Utils.runInThread(() -> {
            try {
                join();
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            } finally {
                // a writeLock which is already held by the caller
                if (shutdownHook != null) {
                    shutdownHook.run(Status.OK());
                }
            }
        });
    }
}
Also used : Status(io.dingodb.raft.Status) FSMCallerOptions(io.dingodb.raft.option.FSMCallerOptions) RpcRequestClosure(io.dingodb.raft.rpc.RpcRequestClosure) StringUtils(org.apache.commons.lang.StringUtils) Describer(io.dingodb.raft.util.Describer) LongHeldDetectingReadWriteLock(io.dingodb.raft.util.concurrent.LongHeldDetectingReadWriteLock) ThreadHelper(io.dingodb.raft.util.ThreadHelper) LogManager(io.dingodb.raft.storage.LogManager) RaftClientService(io.dingodb.raft.rpc.RaftClientService) ReadWriteLock(java.util.concurrent.locks.ReadWriteLock) SynchronizedClosure(io.dingodb.raft.closure.SynchronizedClosure) LogManagerOptions(io.dingodb.raft.option.LogManagerOptions) Set(java.util.Set) Configuration(io.dingodb.raft.conf.Configuration) Utils(io.dingodb.raft.util.Utils) RaftOutter(io.dingodb.raft.entity.RaftOutter) EnumOutter(io.dingodb.raft.entity.EnumOutter) CountDownLatch(java.util.concurrent.CountDownLatch) RaftTimerFactory(io.dingodb.raft.util.timer.RaftTimerFactory) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) LogId(io.dingodb.raft.entity.LogId) JRaftServiceLoader(io.dingodb.raft.util.JRaftServiceLoader) SystemPropertyUtil(io.dingodb.raft.util.SystemPropertyUtil) JRaftUtils(io.dingodb.raft.JRaftUtils) LogExceptionHandler(io.dingodb.raft.util.LogExceptionHandler) ArrayList(java.util.ArrayList) JRaftServiceFactory(io.dingodb.raft.JRaftServiceFactory) ReadOnlyOption(io.dingodb.raft.option.ReadOnlyOption) BootstrapOptions(io.dingodb.raft.option.BootstrapOptions) LogStorage(io.dingodb.raft.storage.LogStorage) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) EventHandler(com.lmax.disruptor.EventHandler) LinkedHashSet(java.util.LinkedHashSet) DisruptorMetricSet(io.dingodb.raft.util.DisruptorMetricSet) DefaultRaftClientService(io.dingodb.raft.rpc.impl.core.DefaultRaftClientService) SnapshotExecutorImpl(io.dingodb.raft.storage.snapshot.SnapshotExecutorImpl) NodeManager(io.dingodb.raft.NodeManager) BallotBoxOptions(io.dingodb.raft.option.BallotBoxOptions) Lock(java.util.concurrent.locks.Lock) Ballot(io.dingodb.raft.entity.Ballot) PeerId(io.dingodb.raft.entity.PeerId) ReadOnlyServiceOptions(io.dingodb.raft.option.ReadOnlyServiceOptions) ConfigurationManager(io.dingodb.raft.conf.ConfigurationManager) SnapshotExecutor(io.dingodb.raft.storage.SnapshotExecutor) Disruptor(com.lmax.disruptor.dsl.Disruptor) RaftServerService(io.dingodb.raft.rpc.RaftServerService) ThreadId(io.dingodb.raft.util.ThreadId) ScheduledFuture(java.util.concurrent.ScheduledFuture) LoggerFactory(org.slf4j.LoggerFactory) ClosureQueueImpl(io.dingodb.raft.closure.ClosureQueueImpl) ByteBuffer(java.nio.ByteBuffer) RaftMetaStorageOptions(io.dingodb.raft.option.RaftMetaStorageOptions) SignalHelper(io.dingodb.raft.util.SignalHelper) BlockingWaitStrategy(com.lmax.disruptor.BlockingWaitStrategy) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) CatchUpClosure(io.dingodb.raft.closure.CatchUpClosure) Task(io.dingodb.raft.entity.Task) RaftOptions(io.dingodb.raft.option.RaftOptions) Collection(java.util.Collection) Status(io.dingodb.raft.Status) ReplicatorGroupOptions(io.dingodb.raft.option.ReplicatorGroupOptions) Collectors(java.util.stream.Collectors) FSMCaller(io.dingodb.raft.FSMCaller) DisruptorBuilder(io.dingodb.raft.util.DisruptorBuilder) RpcResponseClosureAdapter(io.dingodb.raft.rpc.RpcResponseClosureAdapter) List(java.util.List) NodeId(io.dingodb.raft.entity.NodeId) RpcResponseClosure(io.dingodb.raft.rpc.RpcResponseClosure) RaftException(io.dingodb.raft.error.RaftException) Requires(io.dingodb.raft.util.Requires) RaftError(io.dingodb.raft.error.RaftError) UserLog(io.dingodb.raft.entity.UserLog) LogEntry(io.dingodb.raft.entity.LogEntry) HashSet(java.util.HashSet) RaftMetaStorage(io.dingodb.raft.storage.RaftMetaStorage) SnapshotExecutorOptions(io.dingodb.raft.option.SnapshotExecutorOptions) ConfigurationEntry(io.dingodb.raft.conf.ConfigurationEntry) ReadOnlyService(io.dingodb.raft.ReadOnlyService) OnlyForTest(io.dingodb.raft.util.OnlyForTest) ReadIndexClosure(io.dingodb.raft.closure.ReadIndexClosure) LogIndexOutOfBoundsException(io.dingodb.raft.error.LogIndexOutOfBoundsException) Logger(org.slf4j.Logger) NamedThreadFactory(io.dingodb.raft.util.NamedThreadFactory) ClosureQueue(io.dingodb.raft.closure.ClosureQueue) RingBuffer(com.lmax.disruptor.RingBuffer) Closure(io.dingodb.raft.Closure) ProducerType(com.lmax.disruptor.dsl.ProducerType) Node(io.dingodb.raft.Node) Platform(io.dingodb.raft.util.Platform) NodeOptions(io.dingodb.raft.option.NodeOptions) LogNotFoundException(io.dingodb.raft.error.LogNotFoundException) ReplicatorGroup(io.dingodb.raft.ReplicatorGroup) TimeUnit(java.util.concurrent.TimeUnit) JRaftSignalHandler(io.dingodb.raft.util.JRaftSignalHandler) RpcFactoryHelper(io.dingodb.raft.util.RpcFactoryHelper) EventTranslator(com.lmax.disruptor.EventTranslator) LogManagerImpl(io.dingodb.raft.storage.impl.LogManagerImpl) RepeatedTimer(io.dingodb.raft.util.RepeatedTimer) Message(com.google.protobuf.Message) RpcRequests(io.dingodb.raft.rpc.RpcRequests) LeaderChangeContext(io.dingodb.raft.entity.LeaderChangeContext) EventFactory(com.lmax.disruptor.EventFactory) RpcRequestClosure(io.dingodb.raft.rpc.RpcRequestClosure) SynchronizedClosure(io.dingodb.raft.closure.SynchronizedClosure) CatchUpClosure(io.dingodb.raft.closure.CatchUpClosure) RpcResponseClosure(io.dingodb.raft.rpc.RpcResponseClosure) ReadIndexClosure(io.dingodb.raft.closure.ReadIndexClosure) Closure(io.dingodb.raft.Closure) RepeatedTimer(io.dingodb.raft.util.RepeatedTimer) CountDownLatch(java.util.concurrent.CountDownLatch)

Example 3 with Closure

use of io.dingodb.raft.Closure in project dingo by dingodb.

the class FSMCallerImpl method doCommitted.

private void doCommitted(final long committedIndex) {
    if (!this.error.getStatus().isOk()) {
        return;
    }
    final long lastAppliedIndex = this.lastAppliedIndex.get();
    // We can tolerate the disorder of committed_index
    if (lastAppliedIndex >= committedIndex) {
        return;
    }
    final long startMs = Utils.monotonicMs();
    try {
        final List<Closure> closures = new ArrayList<>();
        final List<TaskClosure> taskClosures = new ArrayList<>();
        final long firstClosureIndex = this.closureQueue.popClosureUntil(committedIndex, closures, taskClosures);
        // Calls TaskClosure#onCommitted if necessary
        onTaskCommitted(taskClosures);
        Requires.requireTrue(firstClosureIndex >= 0, "Invalid firstClosureIndex");
        final IteratorImpl iterImpl = new IteratorImpl(this.fsm, this.logManager, closures, firstClosureIndex, lastAppliedIndex, committedIndex, this.applyingIndex);
        while (iterImpl.isGood()) {
            final LogEntry logEntry = iterImpl.entry();
            if (logEntry.getType() != EnumOutter.EntryType.ENTRY_TYPE_DATA) {
                if (logEntry.getType() == EnumOutter.EntryType.ENTRY_TYPE_CONFIGURATION) {
                    if (logEntry.getOldPeers() != null && !logEntry.getOldPeers().isEmpty()) {
                        // Joint stage is not supposed to be noticeable by end users.
                        this.fsm.onConfigurationCommitted(new Configuration(iterImpl.entry().getPeers()));
                    }
                }
                if (iterImpl.done() != null) {
                    // For other entries, we have nothing to do besides flush the
                    // pending tasks and run this closure to notify the caller that the
                    // entries before this one were successfully committed and applied.
                    iterImpl.done().run(Status.OK());
                }
                iterImpl.next();
                continue;
            }
            // Apply data task to user state machine
            doApplyTasks(iterImpl);
        }
        if (iterImpl.hasError()) {
            setError(iterImpl.getError());
            iterImpl.runTheRestClosureWithError();
        }
        final long lastIndex = iterImpl.getIndex() - 1;
        final long lastTerm = this.logManager.getTerm(lastIndex);
        final LogId lastAppliedId = new LogId(lastIndex, lastTerm);
        this.lastAppliedIndex.set(lastIndex);
        this.lastAppliedTerm = lastTerm;
        this.logManager.setAppliedId(lastAppliedId);
        notifyLastAppliedIndexUpdated(lastIndex);
    } finally {
        this.nodeMetrics.recordLatency("fsm-commit", Utils.monotonicMs() - startMs);
    }
}
Also used : TaskClosure(io.dingodb.raft.closure.TaskClosure) LoadSnapshotClosure(io.dingodb.raft.closure.LoadSnapshotClosure) Closure(io.dingodb.raft.Closure) SaveSnapshotClosure(io.dingodb.raft.closure.SaveSnapshotClosure) Configuration(io.dingodb.raft.conf.Configuration) ArrayList(java.util.ArrayList) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) LogId(io.dingodb.raft.entity.LogId) LogEntry(io.dingodb.raft.entity.LogEntry) TaskClosure(io.dingodb.raft.closure.TaskClosure)

Example 4 with Closure

use of io.dingodb.raft.Closure in project dingo by dingodb.

the class NodeImpl method afterShutdown.

private void afterShutdown() {
    List<Closure> savedDoneList = null;
    this.writeLock.lock();
    try {
        if (!this.shutdownContinuations.isEmpty()) {
            savedDoneList = new ArrayList<>(this.shutdownContinuations);
        }
        if (this.logStorage != null) {
            this.logStorage.shutdown();
        }
        this.state = State.STATE_SHUTDOWN;
    } finally {
        this.writeLock.unlock();
    }
    if (savedDoneList != null) {
        for (final Closure closure : savedDoneList) {
            Utils.runClosureInThread(closure);
        }
    }
}
Also used : RpcRequestClosure(io.dingodb.raft.rpc.RpcRequestClosure) SynchronizedClosure(io.dingodb.raft.closure.SynchronizedClosure) CatchUpClosure(io.dingodb.raft.closure.CatchUpClosure) RpcResponseClosure(io.dingodb.raft.rpc.RpcResponseClosure) ReadIndexClosure(io.dingodb.raft.closure.ReadIndexClosure) Closure(io.dingodb.raft.Closure)

Example 5 with Closure

use of io.dingodb.raft.Closure in project dingo by dingodb.

the class NodeImpl method executeApplyingTasks.

private void executeApplyingTasks(final List<LogEntryAndClosure> tasks) {
    this.writeLock.lock();
    try {
        final int size = tasks.size();
        if (this.state != State.STATE_LEADER) {
            final Status st = new Status();
            if (this.state != State.STATE_TRANSFERRING) {
                st.setError(RaftError.EPERM, "Is not leader.");
            } else {
                st.setError(RaftError.EBUSY, "Is transferring leadership.");
            }
            LOG.debug("Node {} can't apply, status={}.", getNodeId(), st);
            final List<Closure> dones = tasks.stream().map(ele -> ele.done).collect(Collectors.toList());
            Utils.runInThread(() -> {
                for (final Closure done : dones) {
                    done.run(st);
                }
            });
            return;
        }
        final List<LogEntry> entries = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            final LogEntryAndClosure task = tasks.get(i);
            if (task.expectedTerm != -1 && task.expectedTerm != this.currTerm) {
                LOG.debug("Node {} can't apply task whose expectedTerm={} doesn't match currTerm={}.", getNodeId(), task.expectedTerm, this.currTerm);
                if (task.done != null) {
                    final Status st = new Status(RaftError.EPERM, "expected_term=%d doesn't match current_term=%d", task.expectedTerm, this.currTerm);
                    Utils.runClosureInThread(task.done, st);
                    task.reset();
                }
                continue;
            }
            if (!this.ballotBox.appendPendingTask(this.conf.getConf(), this.conf.isStable() ? null : this.conf.getOldConf(), task.done)) {
                Utils.runClosureInThread(task.done, new Status(RaftError.EINTERNAL, "Fail to append task."));
                task.reset();
                continue;
            }
            // set task entry info before adding to list.
            task.entry.getId().setTerm(this.currTerm);
            task.entry.setType(EnumOutter.EntryType.ENTRY_TYPE_DATA);
            entries.add(task.entry);
            task.reset();
        }
        this.logManager.appendEntries(entries, new LeaderStableClosure(entries));
        // update conf.first
        checkAndSetConfiguration(true);
    } finally {
        this.writeLock.unlock();
    }
}
Also used : Status(io.dingodb.raft.Status) FSMCallerOptions(io.dingodb.raft.option.FSMCallerOptions) RpcRequestClosure(io.dingodb.raft.rpc.RpcRequestClosure) StringUtils(org.apache.commons.lang.StringUtils) Describer(io.dingodb.raft.util.Describer) LongHeldDetectingReadWriteLock(io.dingodb.raft.util.concurrent.LongHeldDetectingReadWriteLock) ThreadHelper(io.dingodb.raft.util.ThreadHelper) LogManager(io.dingodb.raft.storage.LogManager) RaftClientService(io.dingodb.raft.rpc.RaftClientService) ReadWriteLock(java.util.concurrent.locks.ReadWriteLock) SynchronizedClosure(io.dingodb.raft.closure.SynchronizedClosure) LogManagerOptions(io.dingodb.raft.option.LogManagerOptions) Set(java.util.Set) Configuration(io.dingodb.raft.conf.Configuration) Utils(io.dingodb.raft.util.Utils) RaftOutter(io.dingodb.raft.entity.RaftOutter) EnumOutter(io.dingodb.raft.entity.EnumOutter) CountDownLatch(java.util.concurrent.CountDownLatch) RaftTimerFactory(io.dingodb.raft.util.timer.RaftTimerFactory) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) LogId(io.dingodb.raft.entity.LogId) JRaftServiceLoader(io.dingodb.raft.util.JRaftServiceLoader) SystemPropertyUtil(io.dingodb.raft.util.SystemPropertyUtil) JRaftUtils(io.dingodb.raft.JRaftUtils) LogExceptionHandler(io.dingodb.raft.util.LogExceptionHandler) ArrayList(java.util.ArrayList) JRaftServiceFactory(io.dingodb.raft.JRaftServiceFactory) ReadOnlyOption(io.dingodb.raft.option.ReadOnlyOption) BootstrapOptions(io.dingodb.raft.option.BootstrapOptions) LogStorage(io.dingodb.raft.storage.LogStorage) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) EventHandler(com.lmax.disruptor.EventHandler) LinkedHashSet(java.util.LinkedHashSet) DisruptorMetricSet(io.dingodb.raft.util.DisruptorMetricSet) DefaultRaftClientService(io.dingodb.raft.rpc.impl.core.DefaultRaftClientService) SnapshotExecutorImpl(io.dingodb.raft.storage.snapshot.SnapshotExecutorImpl) NodeManager(io.dingodb.raft.NodeManager) BallotBoxOptions(io.dingodb.raft.option.BallotBoxOptions) Lock(java.util.concurrent.locks.Lock) Ballot(io.dingodb.raft.entity.Ballot) PeerId(io.dingodb.raft.entity.PeerId) ReadOnlyServiceOptions(io.dingodb.raft.option.ReadOnlyServiceOptions) ConfigurationManager(io.dingodb.raft.conf.ConfigurationManager) SnapshotExecutor(io.dingodb.raft.storage.SnapshotExecutor) Disruptor(com.lmax.disruptor.dsl.Disruptor) RaftServerService(io.dingodb.raft.rpc.RaftServerService) ThreadId(io.dingodb.raft.util.ThreadId) ScheduledFuture(java.util.concurrent.ScheduledFuture) LoggerFactory(org.slf4j.LoggerFactory) ClosureQueueImpl(io.dingodb.raft.closure.ClosureQueueImpl) ByteBuffer(java.nio.ByteBuffer) RaftMetaStorageOptions(io.dingodb.raft.option.RaftMetaStorageOptions) SignalHelper(io.dingodb.raft.util.SignalHelper) BlockingWaitStrategy(com.lmax.disruptor.BlockingWaitStrategy) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) CatchUpClosure(io.dingodb.raft.closure.CatchUpClosure) Task(io.dingodb.raft.entity.Task) RaftOptions(io.dingodb.raft.option.RaftOptions) Collection(java.util.Collection) Status(io.dingodb.raft.Status) ReplicatorGroupOptions(io.dingodb.raft.option.ReplicatorGroupOptions) Collectors(java.util.stream.Collectors) FSMCaller(io.dingodb.raft.FSMCaller) DisruptorBuilder(io.dingodb.raft.util.DisruptorBuilder) RpcResponseClosureAdapter(io.dingodb.raft.rpc.RpcResponseClosureAdapter) List(java.util.List) NodeId(io.dingodb.raft.entity.NodeId) RpcResponseClosure(io.dingodb.raft.rpc.RpcResponseClosure) RaftException(io.dingodb.raft.error.RaftException) Requires(io.dingodb.raft.util.Requires) RaftError(io.dingodb.raft.error.RaftError) UserLog(io.dingodb.raft.entity.UserLog) LogEntry(io.dingodb.raft.entity.LogEntry) HashSet(java.util.HashSet) RaftMetaStorage(io.dingodb.raft.storage.RaftMetaStorage) SnapshotExecutorOptions(io.dingodb.raft.option.SnapshotExecutorOptions) ConfigurationEntry(io.dingodb.raft.conf.ConfigurationEntry) ReadOnlyService(io.dingodb.raft.ReadOnlyService) OnlyForTest(io.dingodb.raft.util.OnlyForTest) ReadIndexClosure(io.dingodb.raft.closure.ReadIndexClosure) LogIndexOutOfBoundsException(io.dingodb.raft.error.LogIndexOutOfBoundsException) Logger(org.slf4j.Logger) NamedThreadFactory(io.dingodb.raft.util.NamedThreadFactory) ClosureQueue(io.dingodb.raft.closure.ClosureQueue) RingBuffer(com.lmax.disruptor.RingBuffer) Closure(io.dingodb.raft.Closure) ProducerType(com.lmax.disruptor.dsl.ProducerType) Node(io.dingodb.raft.Node) Platform(io.dingodb.raft.util.Platform) NodeOptions(io.dingodb.raft.option.NodeOptions) LogNotFoundException(io.dingodb.raft.error.LogNotFoundException) ReplicatorGroup(io.dingodb.raft.ReplicatorGroup) TimeUnit(java.util.concurrent.TimeUnit) JRaftSignalHandler(io.dingodb.raft.util.JRaftSignalHandler) RpcFactoryHelper(io.dingodb.raft.util.RpcFactoryHelper) EventTranslator(com.lmax.disruptor.EventTranslator) LogManagerImpl(io.dingodb.raft.storage.impl.LogManagerImpl) RepeatedTimer(io.dingodb.raft.util.RepeatedTimer) Message(com.google.protobuf.Message) RpcRequests(io.dingodb.raft.rpc.RpcRequests) LeaderChangeContext(io.dingodb.raft.entity.LeaderChangeContext) EventFactory(com.lmax.disruptor.EventFactory) RpcRequestClosure(io.dingodb.raft.rpc.RpcRequestClosure) SynchronizedClosure(io.dingodb.raft.closure.SynchronizedClosure) CatchUpClosure(io.dingodb.raft.closure.CatchUpClosure) RpcResponseClosure(io.dingodb.raft.rpc.RpcResponseClosure) ReadIndexClosure(io.dingodb.raft.closure.ReadIndexClosure) Closure(io.dingodb.raft.Closure) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) LogEntry(io.dingodb.raft.entity.LogEntry)

Aggregations

Closure (io.dingodb.raft.Closure)7 Status (io.dingodb.raft.Status)4 CatchUpClosure (io.dingodb.raft.closure.CatchUpClosure)3 ReadIndexClosure (io.dingodb.raft.closure.ReadIndexClosure)3 SynchronizedClosure (io.dingodb.raft.closure.SynchronizedClosure)3 Configuration (io.dingodb.raft.conf.Configuration)3 LogEntry (io.dingodb.raft.entity.LogEntry)3 LogId (io.dingodb.raft.entity.LogId)3 RpcRequestClosure (io.dingodb.raft.rpc.RpcRequestClosure)3 RpcResponseClosure (io.dingodb.raft.rpc.RpcResponseClosure)3 ArrayList (java.util.ArrayList)3 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)3 Message (com.google.protobuf.Message)2 BlockingWaitStrategy (com.lmax.disruptor.BlockingWaitStrategy)2 EventFactory (com.lmax.disruptor.EventFactory)2 EventHandler (com.lmax.disruptor.EventHandler)2 EventTranslator (com.lmax.disruptor.EventTranslator)2 RingBuffer (com.lmax.disruptor.RingBuffer)2 Disruptor (com.lmax.disruptor.dsl.Disruptor)2 ProducerType (com.lmax.disruptor.dsl.ProducerType)2