@Test public void testNoFields() throws ConnectionException { final ApplicationScope collectionScope = mock( ApplicationScope.class ); final Keyspace keyspace = mock(Keyspace.class); final MutationBatch batch = mock(MutationBatch.class); when(keyspace.prepareMutationBatch()).thenReturn(batch); final Entity entity = generateEntity(); final MvccEntity mvccEntity = fromEntity( entity ); WriteUniqueVerify newStage = new WriteUniqueVerify( uvstrat, fig, keyspace, cassandraConfig, null, null, null, session ); newStage.call( new CollectionIoEvent<>( collectionScope, mvccEntity ) ) ; verify(batch, never()).execute(); }
@Override public void call( final CollectionIoEvent<MvccEntity> ioevent ) { if ( actorSystemFig != null && actorSystemFig.getEnabled() && uniqueValuesFig.getUnqiueValueViaCluster() ) { verifyUniqueFieldsAkka( ioevent ); } else { verifyUniqueFields( ioevent ); } }
WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>> { @Override public void call( final CollectionIoEvent<MvccEntity> ioevent ) { if ( actorSystemFig != null && actorSystemFig.getEnabled() && uniqueValuesFig.getUnqiueValueViaCluster() ) { verifyUniqueFieldsAkka( ioevent ); } else { verifyUniqueFields( ioevent ); } } }
WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>> { @Override public void call( final CollectionIoEvent<MvccEntity> ioevent ) { if ( actorSystemFig != null && actorSystemFig.getEnabled() && uniqueValuesFig.getUnqiueValueViaCluster() ) { verifyUniqueFieldsAkka( ioevent ); } else { verifyUniqueFields( ioevent ); } } @Inject  WriteUniqueVerify(final UniqueValueSerializationStrategy uniqueValueSerializiationStrategy,
                             final SerializationFig serializationFig,
                             final Keyspace keyspace,
                             final CassandraConfig cassandraFig,
                             final ActorSystemFig actorSystemFig,
                             final UniqueValuesFig uniqueValuesFig,
                             final UniqueValuesService akkaUvService,
                             final Session session ); }
WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>> { @Override public void call( final CollectionIoEvent<MvccEntity> ioevent ) { if ( actorSystemFig != null && actorSystemFig.getEnabled() && uniqueValuesFig.getUnqiueValueViaCluster() ) { verifyUniqueFieldsAkka( ioevent ); } else { verifyUniqueFields( ioevent ); } } @Inject  WriteUniqueVerify(final UniqueValueSerializationStrategy uniqueValueSerializiationStrategy,
                             final SerializationFig serializationFig,
                             final Keyspace keyspace,
                             final CassandraConfig cassandraFig,
                             final ActorSystemFig actorSystemFig,
                             final UniqueValuesFig uniqueValuesFig,
                             final UniqueValuesService akkaUvService,
                             final Session session ); @Override void call( final CollectionIoEvent<MvccEntity> ioevent ); }
WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>> { @Override public void call( final CollectionIoEvent<MvccEntity> ioevent ) { if ( actorSystemFig != null && actorSystemFig.getEnabled() && uniqueValuesFig.getUnqiueValueViaCluster() ) { verifyUniqueFieldsAkka( ioevent ); } else { verifyUniqueFields( ioevent ); } } @Inject  WriteUniqueVerify(final UniqueValueSerializationStrategy uniqueValueSerializiationStrategy,
                             final SerializationFig serializationFig,
                             final Keyspace keyspace,
                             final CassandraConfig cassandraFig,
                             final ActorSystemFig actorSystemFig,
                             final UniqueValuesFig uniqueValuesFig,
                             final UniqueValuesService akkaUvService,
                             final Session session ); @Override void call( final CollectionIoEvent<MvccEntity> ioevent );  }