@Test void deleteShouldNotThrowOnUnknownMessageUid() { assertThatCode(() -> testee.delete(session, mailbox.getMailboxId(), Lists.newArrayList(MESSAGE_UID_1)).block()) .doesNotThrowAnyException(); }
@Override public Mono<Void> delete(MailboxSession session, MailboxId mailboxId, Collection<MessageUid> expungedUids) { return elasticSearchIndexer .delete(expungedUids.stream() .map(uid -> indexIdFor(mailboxId, uid)) .collect(toImmutableList()), routingKeyFactory.from(mailboxId)) .then(); }
ElasticSearchListeningMessageSearchIndex extends ListeningMessageSearchIndex { @Override public Mono<Void> delete(MailboxSession session, MailboxId mailboxId, Collection<MessageUid> expungedUids) { return elasticSearchIndexer .delete(expungedUids.stream() .map(uid -> indexIdFor(mailboxId, uid)) .collect(toImmutableList()), routingKeyFactory.from(mailboxId)) .then(); } }
ElasticSearchListeningMessageSearchIndex extends ListeningMessageSearchIndex { @Override public Mono<Void> delete(MailboxSession session, MailboxId mailboxId, Collection<MessageUid> expungedUids) { return elasticSearchIndexer .delete(expungedUids.stream() .map(uid -> indexIdFor(mailboxId, uid)) .collect(toImmutableList()), routingKeyFactory.from(mailboxId)) .then(); } @Inject  ElasticSearchListeningMessageSearchIndex(MailboxSessionMapperFactory factory,
                                                    @Named(MailboxElasticSearchConstants.InjectionNames.MAILBOX) ElasticSearchIndexer indexer,
                                                    ElasticSearchSearcher searcher, MessageToElasticSearchJson messageToElasticSearchJson,
                                                    SessionProvider sessionProvider, RoutingKey.Factory<MailboxId> routingKeyFactory); }
ElasticSearchListeningMessageSearchIndex extends ListeningMessageSearchIndex { @Override public Mono<Void> delete(MailboxSession session, MailboxId mailboxId, Collection<MessageUid> expungedUids) { return elasticSearchIndexer .delete(expungedUids.stream() .map(uid -> indexIdFor(mailboxId, uid)) .collect(toImmutableList()), routingKeyFactory.from(mailboxId)) .then(); } @Inject  ElasticSearchListeningMessageSearchIndex(MailboxSessionMapperFactory factory,
                                                    @Named(MailboxElasticSearchConstants.InjectionNames.MAILBOX) ElasticSearchIndexer indexer,
                                                    ElasticSearchSearcher searcher, MessageToElasticSearchJson messageToElasticSearchJson,
                                                    SessionProvider sessionProvider, RoutingKey.Factory<MailboxId> routingKeyFactory); @Override Group getDefaultGroup(); @Override EnumSet<SearchCapabilities> getSupportedCapabilities(EnumSet<MessageCapabilities> messageCapabilities); @Override Stream<MessageUid> search(MailboxSession session, Mailbox mailbox, SearchQuery searchQuery); @Override Flux<MessageId> search(MailboxSession session, Collection<MailboxId> mailboxIds, SearchQuery searchQuery, long limit); @Override Mono<Void> add(MailboxSession session, Mailbox mailbox, MailboxMessage message); @Override Mono<Void> delete(MailboxSession session, MailboxId mailboxId, Collection<MessageUid> expungedUids); @Override Mono<Void> deleteAll(MailboxSession session, MailboxId mailboxId); @Override Mono<Void> update(MailboxSession session, MailboxId mailboxId, List<UpdatedFlags> updatedFlagsList); @Override Mono<Flags> retrieveIndexedFlags(Mailbox mailbox, MessageUid uid); }
ElasticSearchListeningMessageSearchIndex extends ListeningMessageSearchIndex { @Override public Mono<Void> delete(MailboxSession session, MailboxId mailboxId, Collection<MessageUid> expungedUids) { return elasticSearchIndexer .delete(expungedUids.stream() .map(uid -> indexIdFor(mailboxId, uid)) .collect(toImmutableList()), routingKeyFactory.from(mailboxId)) .then(); } @Inject  ElasticSearchListeningMessageSearchIndex(MailboxSessionMapperFactory factory,
                                                    @Named(MailboxElasticSearchConstants.InjectionNames.MAILBOX) ElasticSearchIndexer indexer,
                                                    ElasticSearchSearcher searcher, MessageToElasticSearchJson messageToElasticSearchJson,
                                                    SessionProvider sessionProvider, RoutingKey.Factory<MailboxId> routingKeyFactory); @Override Group getDefaultGroup(); @Override EnumSet<SearchCapabilities> getSupportedCapabilities(EnumSet<MessageCapabilities> messageCapabilities); @Override Stream<MessageUid> search(MailboxSession session, Mailbox mailbox, SearchQuery searchQuery); @Override Flux<MessageId> search(MailboxSession session, Collection<MailboxId> mailboxIds, SearchQuery searchQuery, long limit); @Override Mono<Void> add(MailboxSession session, Mailbox mailbox, MailboxMessage message); @Override Mono<Void> delete(MailboxSession session, MailboxId mailboxId, Collection<MessageUid> expungedUids); @Override Mono<Void> deleteAll(MailboxSession session, MailboxId mailboxId); @Override Mono<Void> update(MailboxSession session, MailboxId mailboxId, List<UpdatedFlags> updatedFlagsList); @Override Mono<Flags> retrieveIndexedFlags(Mailbox mailbox, MessageUid uid);  }