mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
Moved the subscription and transport timestamps out of the contacts
table so it's not necessary to hold a write lock on the (heavily used) contacts table to update them.
This commit is contained in:
@@ -20,7 +20,7 @@ class SubscriptionWriterImpl implements SubscriptionWriter {
|
||||
w = writerFactory.createWriter(out);
|
||||
}
|
||||
|
||||
public void writeSubscriptionUpdate(Map<Group, Long> subs, long timestamp)
|
||||
public void writeSubscriptions(Map<Group, Long> subs, long timestamp)
|
||||
throws IOException {
|
||||
w.writeUserDefinedTag(Tags.SUBSCRIPTION_UPDATE);
|
||||
w.writeMap(subs);
|
||||
|
||||
@@ -20,9 +20,8 @@ class TransportWriterImpl implements TransportWriter {
|
||||
w = writerFactory.createWriter(out);
|
||||
}
|
||||
|
||||
public void writeTransportUpdate(
|
||||
Map<String, Map<String, String>> transports, long timestamp)
|
||||
throws IOException {
|
||||
public void writeTransports(Map<String, Map<String, String>> transports,
|
||||
long timestamp) throws IOException {
|
||||
w.writeUserDefinedTag(Tags.TRANSPORT_UPDATE);
|
||||
w.writeListStart();
|
||||
for(Entry<String, Map<String, String>> e : transports.entrySet()) {
|
||||
|
||||
Reference in New Issue
Block a user