@SuppressWarnings("unchecked") @Test public void testIllegalCapture() { boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1, new MockRaftActorContext.MockPayload()), 9); assertTrue(capture); verify(mockProcedure).accept(any()); reset(mockProcedure); capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1, new MockRaftActorContext.MockPayload()), 9); assertFalse(capture); verify(mockProcedure, never()).accept(any()); }
@Override public boolean capture(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex) { return currentState.capture(lastLogEntry, replicatedToAllIndex); }
SnapshotManager implements SnapshotState { @Override public boolean capture(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex) { return currentState.capture(lastLogEntry, replicatedToAllIndex); } }
SnapshotManager implements SnapshotState { @Override public boolean capture(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex) { return currentState.capture(lastLogEntry, replicatedToAllIndex); } SnapshotManager(final RaftActorContext context, final Logger logger); }
SnapshotManager implements SnapshotState { @Override public boolean capture(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex) { return currentState.capture(lastLogEntry, replicatedToAllIndex); } SnapshotManager(final RaftActorContext context, final Logger logger); boolean isApplying(); @Override boolean isCapturing(); @Override boolean captureToInstall(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex,
            final String targetFollower); @Override boolean capture(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex); @Override boolean captureWithForcedTrim(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex); @Override void apply(final ApplySnapshot snapshot); @Override void persist(final Snapshot.State state, final Optional<OutputStream> installSnapshotStream,
            final long totalMemory); @Override void commit(final long sequenceNumber, final long timeStamp); @Override void rollback(); @Override long trimLog(final long desiredTrimIndex); Snapshot.@NonNull State convertSnapshot(final ByteSource snapshotBytes); long getLastSequenceNumber(); @VisibleForTesting CaptureSnapshot getCaptureSnapshot(); CaptureSnapshot newCaptureSnapshot(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex,
                                              final boolean mandatoryTrim); }
SnapshotManager implements SnapshotState { @Override public boolean capture(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex) { return currentState.capture(lastLogEntry, replicatedToAllIndex); } SnapshotManager(final RaftActorContext context, final Logger logger); boolean isApplying(); @Override boolean isCapturing(); @Override boolean captureToInstall(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex,
            final String targetFollower); @Override boolean capture(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex); @Override boolean captureWithForcedTrim(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex); @Override void apply(final ApplySnapshot snapshot); @Override void persist(final Snapshot.State state, final Optional<OutputStream> installSnapshotStream,
            final long totalMemory); @Override void commit(final long sequenceNumber, final long timeStamp); @Override void rollback(); @Override long trimLog(final long desiredTrimIndex); Snapshot.@NonNull State convertSnapshot(final ByteSource snapshotBytes); long getLastSequenceNumber(); @VisibleForTesting CaptureSnapshot getCaptureSnapshot(); CaptureSnapshot newCaptureSnapshot(final ReplicatedLogEntry lastLogEntry, final long replicatedToAllIndex,
                                              final boolean mandatoryTrim);  }