ConcurrentHashMap<String, DbRecord> repo;
public ApiService newSession(String db) {
DbRecord rec = repo.get(db);
ApiService api = new ChangesetBuffer(rec.db, rec.coordinator);
if (rec.apiServiceWrapperFn != null)
api = rec.apiServiceWrapperFn.wrapApiService(api);
return api;
}