MongoHistoryProvider

public class MongoHistoryProvider extends AbstractHistoryProvider<MongoDataSource> implements MongoRepositoryVersionAware, MAMRepository
Author:andrzej

Fields

historyCollection

protected MongoCollection<Document> historyCollection

Methods

addJoinEvent

public void addJoinEvent(Room room, Date date, JID senderJID, String nickName)

addLeaveEvent

public void addLeaveEvent(Room room, Date date, JID senderJID, String nickName)

addMessage

public void addMessage(Room room, Element message, String body, JID senderJid, String senderNickname, Date time)

addSubjectChange

public void addSubjectChange(Room room, Element message, String subject, JID senderJid, String senderNickname, Date time)

calculateHash

protected byte[] calculateHash(String user)

destroy

public void destroy()

generateId

protected byte[] generateId(BareJID user)

getHistoryMessages

public void getHistoryMessages(Room room, JID senderJID, Integer maxchars, Integer maxstanzas, Integer seconds, Date since, PacketWriter writer)

isPersistent

public boolean isPersistent(Room room)

newQuery

public Query newQuery()

queryItems

public void queryItems(Query query, ItemHandler itemHandler)

removeHistory

public void removeHistory(Room room)

setDataSource

public void setDataSource(MongoDataSource dataSource)

updateSchema

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