Skip to content

Clustering-related fixes. #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ <h1>
Monitoring Plugin Changelog
</h1>

<p><b>2.2.0</b> -- (tbd)</p>
<ul>
<li>[<a href='https://issues.igniterealtime.org/browse/OF-2157'>OF-2157</a>] - SequenceManager generated IDs are unreliable whilst clustering.</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/19'>Issue #19</a>] - Monitoring / Archive plugin fails to reconstruct archived stanza</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/137'>Issue #137</a>] - MUC messages duplicated as one-on-one messages</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/138'>Issue #138</a>] - Stanzas not always stored for one-to-one messages whilst clustered</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/139'>Issue #139</a>] - Reduce code complexity</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/141'>Issue #141</a>] - Make Archiver configuration configurable</li>
</ul>

<p><b>2.1.0</b> -- September 10, 2020</p>
<ul>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/72'>Issue #72</a>] - Return chat message bodies in response to xep-0136 requests.</li>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>
<groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>monitoring</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.2.0-SNAPSHOT</version>
<name>Monitoring Plugin</name>
<description>Monitors conversations and statistics of the server.</description>

Expand Down
31 changes: 0 additions & 31 deletions src/java/com/reucon/openfire/plugin/archive/ArchiveFactory.java

This file was deleted.

29 changes: 0 additions & 29 deletions src/java/com/reucon/openfire/plugin/archive/ArchiveManager.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@ public interface ArchiveProperties
{
// TODO: change the below to a separate property to allow archiving but disable/enable XEP-0136
String ENABLED = "conversation.metadataArchiving";
String INDEX_DIR = "archive.indexdir";
// Unnecessary since Open Archive Archive Manager no longer archives messages
String CONVERSATION_TIMEOUT = "conversation.idleTime";
String FORCE_RSM = "archive.FORCE_RSM";
}

This file was deleted.

32 changes: 0 additions & 32 deletions src/java/com/reucon/openfire/plugin/archive/IndexManager.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,18 @@

import com.reucon.openfire.plugin.archive.model.ArchivedMessage;
import com.reucon.openfire.plugin.archive.model.Conversation;
import com.reucon.openfire.plugin.archive.model.Participant;
import com.reucon.openfire.plugin.archive.xep0059.XmppResultSet;
import org.jivesoftware.util.NotFoundException;
import org.xmpp.packet.JID;

import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
* Manages database persistence.
*/
public interface PersistenceManager
{
/**
* Creates a new archived message.
*
* @param message the message to create.
* @return <code>true</code> on success, <code>false</code> otherwise.
*/
boolean createMessage(ArchivedMessage message);

/**
* Selects all messages and passes each message to the given callback for processing.
*
* @param callback callback to process messages.
* @return number of messages processed.
*/
int processAllMessages(ArchivedMessageConsumer callback);

/**
* Creates a new conversation.
*
* @param conversation the conversation to create.
* @return <code>true</code> on success, <code>false</code> otherwise.
*/
boolean createConversation(Conversation conversation);

/**
* Updates the end time of a conversation. The conversation must be persisted.
*
* @param conversation conversation to update with id and endDate attributes not null.
* @return <code>true</code> on success, <code>false</code> otherwise.
*/
boolean updateConversationEnd(Conversation conversation);

/**
* Adds a new participant to a conversation.
*
* @param participant the participant to add.
* @param conversationId id of the conversation to add the participant to.
* @return <code>true</code> on success, <code>false</code> otherwise.
*/
boolean createParticipant(Participant participant, Long conversationId);

List<Conversation> findConversations(String[] participants, Date startDate, Date endDate);

/**
* Searches for conversations.
*
Expand All @@ -85,10 +40,6 @@ public interface PersistenceManager
*/
Collection<ArchivedMessage> findMessages( Date startDate, Date endDate, JID owner, JID with, String query, XmppResultSet xmppResultSet, boolean useStableID) throws NotFoundException;

Collection<Conversation> getActiveConversations(int conversationTimeout);

List<Conversation> getConversations(Collection<Long> conversationIds);

/**
* Returns the conversation with the given owner, with and start time including participants and messages.
*
Expand All @@ -97,13 +48,5 @@ public interface PersistenceManager
* @param start exact start time
* @return the matching conversation or <code>null</code> if none matches.
*/
Conversation getConversation(JID owner, JID with, Date start);

/**
* Returns the conversation with the given id including participants and messages.
*
* @param conversationId id of the conversation to retrieve.
* @return the matching conversation or <code>null</code> if none matches.
*/
Conversation getConversation(Long conversationId);
Conversation getConversation(JID owner, JID with, Date start); // TODO move to ConversationManager?
}
Loading