DB interface cleanup, removed unnecessary exceptions.

This commit is contained in:
akwizgran
2016-01-28 15:45:49 +00:00
parent 3837efca6b
commit 225d0ebeef
8 changed files with 50 additions and 101 deletions

View File

@@ -55,14 +55,11 @@ public interface DatabaseComponent {
void addLocalMessage(Message m, ClientId c, Metadata meta, boolean shared)
throws DbException;
/**
* Stores a transport and returns true if the transport was not previously
* in the database.
*/
boolean addTransport(TransportId t, int maxLatency) throws DbException;
/** Stores a transport. */
void addTransport(TransportId t, int maxLatency) throws DbException;
/**
* Stores the given transport keys for a newly added contact.
* Stores transport keys for a newly added contact.
*/
void addTransportKeys(ContactId c, TransportKeys k) throws DbException;

View File

@@ -1,10 +0,0 @@
package org.briarproject.api.db;
/**
* Thrown when a duplicate pseudonym is added to the database. This exception
* may occur due to concurrent updates and does not indicate a database error.
*/
public class LocalAuthorExistsException extends DbException {
private static final long serialVersionUID = -1483877298070151673L;
}

View File

@@ -1,8 +0,0 @@
package org.briarproject.api.db;
/**
* Thrown when a duplicate message is added to the database. This exception may
* occur due to concurrent updates and does not indicate a database error.
*/
public class MessageExistsException extends DbException {
}