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:
akwizgran
2011-08-14 14:46:12 +02:00
parent 2c13e35dc4
commit 5e0aadd373
12 changed files with 122 additions and 63 deletions

View File

@@ -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);

View File

@@ -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()) {