MongoMsgRepository

public class MongoMsgRepository extends MsgRepository<ObjectId, MongoDataSource> implements MongoRepositoryVersionAware
Author:andrzej

Methods

deleteMessage

protected void deleteMessage(ObjectId dbId)

deleteMessagesToJID

public int deleteMessagesToJID(List<String> db_ids, XMPPResourceConnection session)

getMessageExpired

public Element getMessageExpired(long time, boolean delete)

getMessagesCount

public Map<Enum, Long> getMessagesCount(JID to)

getMessagesList

public List<Element> getMessagesList(JID to)

initRepository

public void initRepository(String resource_uri, Map<String, String> params)

loadExpiredQueue

protected void loadExpiredQueue(int max)

loadExpiredQueue

protected void loadExpiredQueue(Date expired)

loadMessagesToJID

public Queue<Element> loadMessagesToJID(XMPPResourceConnection session, boolean delete)

loadMessagesToJID

public Queue<Element> loadMessagesToJID(XMPPResourceConnection session, boolean delete, OfflineMessagesProcessor proc)

loadMessagesToJID

public Queue<Element> loadMessagesToJID(List<String> db_ids, XMPPResourceConnection session, boolean delete, OfflineMessagesProcessor proc)

setDataSource

public void setDataSource(MongoDataSource dataSource)

storeMessage

public boolean storeMessage(JID from, JID to, Date expired, Element msg, NonAuthUserRepository userRepo)

updateSchema

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