MongoMessageArchiveRepository

public class MongoMessageArchiveRepository extends AbstractMessageArchiveRepository<QueryCriteria, MongoDataSource, MongoMessageArchiveRepository.MongoDBAddMessageAdditionalDataProvider> implements MongoRepositoryVersionAware
Author:andrzej

Methods

archiveMessage

protected void archiveMessage(BareJID ownerJid, BareJID buddyJid, Date timestamp, Element msg, String stableIdStr, String stanzaId, String refStableId, Set<String> tags, MongoDBAddMessageAdditionalDataProvider additionParametersProvider)

archiveMessage

public void archiveMessage(BareJID owner, JID buddy, Date timestamp, Element msg, String stableId, Set tags)

createCriteriaDocument

public Document createCriteriaDocument(QueryCriteria query)

deleteExpiredMessages

public void deleteExpiredMessages(BareJID owner, LocalDateTime before)

getStableId

public String getStableId(BareJID owner, BareJID buddy, String stanzaId)

getTags

public List<String> getTags(BareJID owner, String startsWith, QueryCriteria criteria)

newQuery

public QueryCriteria newQuery()

queryCollections

public void queryCollections(QueryCriteria query, CollectionHandler<QueryCriteria, Collection> collectionHandler)

queryItems

public void queryItems(QueryCriteria query, ItemHandler<QueryCriteria, MAMRepository.Item> itemHandler)

removeItems

public void removeItems(BareJID owner, String with, Date start, Date end)

setDataSource

public void setDataSource(MongoDataSource dataSource)

updateSchema

public SchemaLoader.Result updateSchema(Optional<Version> oldVersion, Version newVersion)