@Test void nextUidShouldIncrementValueByOne() { int nbEntries = 100; LongStream.range(1, nbEntries) .forEach(Throwing.longConsumer(value -> { MessageUid result = uidProvider.nextUid(mailbox); assertThat(value).isEqualTo(result.asLong()); })); }
@Override public MessageUid nextUid(Mailbox mailbox) throws MailboxException { return nextUid(mailbox.getMailboxId()); }
CassandraUidProvider implements UidProvider { @Override public MessageUid nextUid(Mailbox mailbox) throws MailboxException { return nextUid(mailbox.getMailboxId()); } }
CassandraUidProvider implements UidProvider { @Override public MessageUid nextUid(Mailbox mailbox) throws MailboxException { return nextUid(mailbox.getMailboxId()); } @Inject  CassandraUidProvider(Session session, CassandraConfiguration cassandraConfiguration,
                                CassandraConsistenciesConfiguration consistenciesConfiguration); }
CassandraUidProvider implements UidProvider { @Override public MessageUid nextUid(Mailbox mailbox) throws MailboxException { return nextUid(mailbox.getMailboxId()); } @Inject  CassandraUidProvider(Session session, CassandraConfiguration cassandraConfiguration,
                                CassandraConsistenciesConfiguration consistenciesConfiguration); @Override MessageUid nextUid(Mailbox mailbox); @Override MessageUid nextUid(MailboxId mailboxId); Mono<MessageUid> nextUid(CassandraId cassandraId); @Override Optional<MessageUid> lastUid(Mailbox mailbox); }
CassandraUidProvider implements UidProvider { @Override public MessageUid nextUid(Mailbox mailbox) throws MailboxException { return nextUid(mailbox.getMailboxId()); } @Inject  CassandraUidProvider(Session session, CassandraConfiguration cassandraConfiguration,
                                CassandraConsistenciesConfiguration consistenciesConfiguration); @Override MessageUid nextUid(Mailbox mailbox); @Override MessageUid nextUid(MailboxId mailboxId); Mono<MessageUid> nextUid(CassandraId cassandraId); @Override Optional<MessageUid> lastUid(Mailbox mailbox);  }