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