* Locking: contact write, retention write, subscription write, transport * write, window write. */ - ContactId addContact(T txn, String name) throws DbException; + ContactId addContact(T txn, Author remote, AuthorId local) + throws DbException; /** - * Adds an endpoint to the database. + * Stores an endpoint. *
* Locking: window write.
*/
@@ -108,7 +110,7 @@ interface Database
- * Locking: identity write.
+ * Locking: contact write, identity write.
*/
void addLocalAuthor(T txn, LocalAuthor a) throws DbException;
@@ -162,12 +164,13 @@ interface Database
* Locking: transport write, window write.
*/
- boolean addTransport(T txn, TransportId t) throws DbException;
+ boolean addTransport(T txn, TransportId t, long maxLatency)
+ throws DbException;
/**
* Makes the given group visible to the given contact.
@@ -176,6 +179,13 @@ interface Database
+ * Locking: contact read.
+ */
+ boolean containsContact(T txn, AuthorId a) throws DbException;
+
/**
* Returns true if the database contains the given contact.
*
@@ -277,6 +287,13 @@ interface Database
+ * Locking: identitiy read.
+ */
+ LocalAuthor getLocalAuthor(T txn, AuthorId a) throws DbException;
+
/**
* Returns all pseudonyms that the user can use to sign messages.
*
@@ -291,6 +308,14 @@ interface Database
+ * Locking: transport read.
+ */
+ Map
@@ -509,6 +534,13 @@ interface Database
+ * Locking: transport read.
+ */
+ Map
+ * Locking: transport write.
+ */
+ void setRemoteProperties(T txn, ContactId c,
+ Map