mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Folded ReadWriteLockDatabaseComponent into its parent.
This commit is contained in:
@@ -264,8 +264,7 @@ interface Database<T> {
|
||||
Rating getRating(T txn, AuthorId a) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the sendability score of the given message. Group messages with
|
||||
* sendability scores greater than zero are eligible to be sent to contacts.
|
||||
* Returns the sendability score of the given group message.
|
||||
* <p>
|
||||
* Locking: messages read.
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,8 +12,8 @@ public class DatabaseModule extends AbstractModule {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(Database.class).to(H2Database.class);
|
||||
bind(DatabaseComponent.class).to(
|
||||
ReadWriteLockDatabaseComponent.class).in(Singleton.class);
|
||||
bind(DatabaseComponent.class).to(DatabaseComponentImpl.class).in(
|
||||
Singleton.class);
|
||||
bind(Password.class).annotatedWith(DatabasePassword.class).toInstance(
|
||||
new Password() {
|
||||
public char[] getPassword() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -119,6 +119,7 @@ public class DatabaseComponentImplTest extends DatabaseComponentTest {
|
||||
context.assertIsSatisfied();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <T> DatabaseComponent createDatabaseComponent(
|
||||
Database<T> database, DatabaseCleaner cleaner) {
|
||||
return createDatabaseComponentImpl(database, cleaner);
|
||||
@@ -126,6 +127,6 @@ public class DatabaseComponentImplTest extends DatabaseComponentTest {
|
||||
|
||||
private <T> DatabaseComponentImpl<T> createDatabaseComponentImpl(
|
||||
Database<T> database, DatabaseCleaner cleaner) {
|
||||
return new ReadWriteLockDatabaseComponent<T>(database, cleaner);
|
||||
return new DatabaseComponentImpl<T>(database, cleaner);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user