@Test void saveOnSecondShouldBeFalse() { assertThat(testee.save(USER_INBOX_MAILBOXPATH, INBOX_ID).block()).isTrue(); assertThat(testee.save(USER_INBOX_MAILBOXPATH, INBOX_ID).block()).isFalse(); }
public Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId) { return cassandraAsyncExecutor.executeReturnApplied(insert.bind() .setString(NAMESPACE, mailboxPath.getNamespace()) .setString(USER, sanitizeUser(mailboxPath.getUser())) .setString(MAILBOX_NAME, mailboxPath.getName()) .setUUID(MAILBOX_ID, mailboxId.asUuid())); }
CassandraMailboxPathV2DAO { public Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId) { return cassandraAsyncExecutor.executeReturnApplied(insert.bind() .setString(NAMESPACE, mailboxPath.getNamespace()) .setString(USER, sanitizeUser(mailboxPath.getUser())) .setString(MAILBOX_NAME, mailboxPath.getName()) .setUUID(MAILBOX_ID, mailboxId.asUuid())); } }
CassandraMailboxPathV2DAO { public Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId) { return cassandraAsyncExecutor.executeReturnApplied(insert.bind() .setString(NAMESPACE, mailboxPath.getNamespace()) .setString(USER, sanitizeUser(mailboxPath.getUser())) .setString(MAILBOX_NAME, mailboxPath.getName()) .setUUID(MAILBOX_ID, mailboxId.asUuid())); } @Inject  CassandraMailboxPathV2DAO(Session session, CassandraUtils cassandraUtils,
                                     CassandraConsistenciesConfiguration consistenciesConfiguration); }
CassandraMailboxPathV2DAO { public Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId) { return cassandraAsyncExecutor.executeReturnApplied(insert.bind() .setString(NAMESPACE, mailboxPath.getNamespace()) .setString(USER, sanitizeUser(mailboxPath.getUser())) .setString(MAILBOX_NAME, mailboxPath.getName()) .setUUID(MAILBOX_ID, mailboxId.asUuid())); } @Inject  CassandraMailboxPathV2DAO(Session session, CassandraUtils cassandraUtils,
                                     CassandraConsistenciesConfiguration consistenciesConfiguration); Mono<CassandraIdAndPath> retrieveId(MailboxPath mailboxPath); Flux<CassandraIdAndPath> listUserMailboxes(String namespace, Username user); Flux<CassandraIdAndPath> listAll(); void logGhostMailboxSuccess(CassandraIdAndPath value); void logGhostMailboxFailure(MailboxPath mailboxPath); Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId); Mono<Void> delete(MailboxPath mailboxPath); }
CassandraMailboxPathV2DAO { public Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId) { return cassandraAsyncExecutor.executeReturnApplied(insert.bind() .setString(NAMESPACE, mailboxPath.getNamespace()) .setString(USER, sanitizeUser(mailboxPath.getUser())) .setString(MAILBOX_NAME, mailboxPath.getName()) .setUUID(MAILBOX_ID, mailboxId.asUuid())); } @Inject  CassandraMailboxPathV2DAO(Session session, CassandraUtils cassandraUtils,
                                     CassandraConsistenciesConfiguration consistenciesConfiguration); Mono<CassandraIdAndPath> retrieveId(MailboxPath mailboxPath); Flux<CassandraIdAndPath> listUserMailboxes(String namespace, Username user); Flux<CassandraIdAndPath> listAll(); void logGhostMailboxSuccess(CassandraIdAndPath value); void logGhostMailboxFailure(MailboxPath mailboxPath); Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId); Mono<Void> delete(MailboxPath mailboxPath);  }