@SuppressWarnings({ "unchecked", "rawtypes" }) @Test public void testPersistWithPersistenceDisabled() throws Exception { doReturn(false).when(mockDelegateProvider).isRecoveryApplicable(); provider.persist(mockPersistentLogEntry, mockProcedure); ArgumentCaptor<Procedure> procedureCaptor = ArgumentCaptor.forClass(Procedure.class); verify(mockPersistentProvider).persist(eq(PERSISTENT_PAYLOAD), procedureCaptor.capture()); verify(mockDelegateProvider, never()).persist(mockNonPersistentLogEntry, mockProcedure); procedureCaptor.getValue().apply(PERSISTENT_PAYLOAD); verify(mockProcedure).apply(mockPersistentLogEntry); provider.persist(mockNonPersistentLogEntry, mockProcedure); verify(mockDelegateProvider).persist(mockNonPersistentLogEntry, mockProcedure); provider.persist(OTHER_DATA_OBJECT, mockProcedure); verify(mockDelegateProvider).persist(OTHER_DATA_OBJECT, mockProcedure); }
@Override public <T> void persist(final T entry, final Procedure<T> procedure) { doPersist(entry, procedure, false); }
RaftActorDelegatingPersistentDataProvider extends DelegatingPersistentDataProvider { @Override public <T> void persist(final T entry, final Procedure<T> procedure) { doPersist(entry, procedure, false); } }
RaftActorDelegatingPersistentDataProvider extends DelegatingPersistentDataProvider { @Override public <T> void persist(final T entry, final Procedure<T> procedure) { doPersist(entry, procedure, false); } RaftActorDelegatingPersistentDataProvider(final DataPersistenceProvider delegate,
            final PersistentDataProvider persistentProvider); }
RaftActorDelegatingPersistentDataProvider extends DelegatingPersistentDataProvider { @Override public <T> void persist(final T entry, final Procedure<T> procedure) { doPersist(entry, procedure, false); } RaftActorDelegatingPersistentDataProvider(final DataPersistenceProvider delegate,
            final PersistentDataProvider persistentProvider); @Override void persist(final T entry, final Procedure<T> procedure); @Override void persistAsync(final T entry, final Procedure<T> procedure); }
RaftActorDelegatingPersistentDataProvider extends DelegatingPersistentDataProvider { @Override public <T> void persist(final T entry, final Procedure<T> procedure) { doPersist(entry, procedure, false); } RaftActorDelegatingPersistentDataProvider(final DataPersistenceProvider delegate,
            final PersistentDataProvider persistentProvider); @Override void persist(final T entry, final Procedure<T> procedure); @Override void persistAsync(final T entry, final Procedure<T> procedure);  }