added a cache to the IdentityManager, changed its signature, modified when and where the author is stored

made the author creation single-threaded again in the LifecycleManager, removed redundant code
This commit is contained in:
Ernir Erlingsson
2016-10-13 11:01:25 +02:00
parent 47d6fc526f
commit eaa393a7ed
45 changed files with 299 additions and 552 deletions

View File

@@ -416,7 +416,7 @@ public class PrivateGroupManagerTest extends BriarIntegrationTest {
byte[] privateKey0 = keyPair0.getPrivate().getEncoded();
author0 = authorFactory
.createLocalAuthor(AUTHOR1, publicKey0, privateKey0);
identityManager0.addLocalAuthor(author0);
identityManager0.registerLocalAuthor(author0);
privateGroup0 =
privateGroupFactory.createPrivateGroup("Testgroup", author0);
groupId0 = privateGroup0.getId();
@@ -426,7 +426,7 @@ public class PrivateGroupManagerTest extends BriarIntegrationTest {
byte[] privateKey1 = keyPair1.getPrivate().getEncoded();
author1 = authorFactory
.createLocalAuthor(AUTHOR2, publicKey1, privateKey1);
identityManager1.addLocalAuthor(author1);
identityManager1.registerLocalAuthor(author1);
}
private void addDefaultContacts() throws DbException {
@@ -531,8 +531,8 @@ public class PrivateGroupManagerTest extends BriarIntegrationTest {
// Start the lifecycle manager and wait for it to finish
lifecycleManager0 = t0.getLifecycleManager();
lifecycleManager1 = t1.getLifecycleManager();
lifecycleManager0.startServices();
lifecycleManager1.startServices();
lifecycleManager0.startServices(AUTHOR1);
lifecycleManager1.startServices(AUTHOR2);
lifecycleManager0.waitForStartup();
lifecycleManager1.waitForStartup();
}