+ * Locking: identity read. + */ + boolean containsLocalGroup(T txn, GroupId g) throws DbException; + /** * Returns true if the database contains the given message. *
@@ -222,10 +231,11 @@ interface Database
+ * Locking: subscription read.
*/
- Collection
+ * Locking: identity write.
+ */
+ void removeLocalGroup(T txn, GroupId g) throws DbException;
+
/**
* Removes a message (and all associated state) from the database.
*
@@ -797,7 +814,7 @@ interface Database
* Locking: subscription write.
*/
- void setVisibleToAll(T txn, GroupId g, boolean visible) throws DbException;
+ void setVisibleToAll(T txn, GroupId g, boolean all) throws DbException;
/**
* Updates the expiry times of the given messages with respect to the given
diff --git a/briar-core/src/net/sf/briar/db/DatabaseComponentImpl.java b/briar-core/src/net/sf/briar/db/DatabaseComponentImpl.java
index 70aa0adc9..b1048be58 100644
--- a/briar-core/src/net/sf/briar/db/DatabaseComponentImpl.java
+++ b/briar-core/src/net/sf/briar/db/DatabaseComponentImpl.java
@@ -64,6 +64,7 @@ import net.sf.briar.api.lifecycle.ShutdownManager;
import net.sf.briar.api.messaging.Ack;
import net.sf.briar.api.messaging.Group;
import net.sf.briar.api.messaging.GroupId;
+import net.sf.briar.api.messaging.GroupStatus;
import net.sf.briar.api.messaging.LocalGroup;
import net.sf.briar.api.messaging.Message;
import net.sf.briar.api.messaging.MessageId;
@@ -887,12 +888,12 @@ DatabaseCleaner.Callback {
}
}
- public Collection