Merge branch '556-thread-safety-blocking-issues' into 'master'

Forum controller thread safety and tree safety

This branch solves the concurrent forum issues by code restructure and refactoring.

Closes #556 
Closes #552 

See merge request !262
This commit is contained in:
akwizgran
2016-09-29 09:30:51 +00:00
14 changed files with 812 additions and 819 deletions

View File

@@ -16,6 +16,8 @@ public interface MessageTree<T extends MessageTree.MessageNode> {
interface MessageNode {
MessageId getId();
MessageId getParentId();
void setLevel(int level);
void setDescendantCount(int descendantCount);
long getTimestamp();
}

View File

@@ -1,12 +1,10 @@
package org.briarproject.api.forum;
import org.briarproject.api.clients.MessageTree;
import org.briarproject.api.clients.PostHeader;
import org.briarproject.api.identity.Author;
import org.briarproject.api.sync.MessageId;
public class ForumPostHeader extends PostHeader
implements MessageTree.MessageNode {
public class ForumPostHeader extends PostHeader {
public ForumPostHeader(MessageId id, MessageId parentId, long timestamp,
Author author, Author.Status authorStatus, boolean read) {