use of com.biglybt.plugin.net.buddy.BuddyPluginBuddy in project BiglyBT by BiglySoftware.
the class BuddyPluginTracker method checkTracking.
protected void checkTracking() {
if (!(plugin_enabled && tracker_enabled)) {
return;
}
List<BuddyPluginBuddy> online;
synchronized (online_buddies) {
online = new ArrayList<>(online_buddies);
}
Set<Download> downloads;
int downloads_id;
synchronized (tracked_downloads) {
boolean downloads_changed = last_processed_download_set_id != download_set_id;
if (downloads_changed) {
last_processed_download_set = new HashSet<>(tracked_downloads);
last_processed_download_set_id = download_set_id;
}
downloads = last_processed_download_set;
downloads_id = last_processed_download_set_id;
}
Map diff_map = new HashMap();
for (int i = 0; i < online.size(); i++) {
BuddyPluginBuddy buddy = (BuddyPluginBuddy) online.get(i);
BuddyTrackingData buddy_data = getBuddyData(buddy);
buddy_data.updateLocal(downloads, downloads_id, diff_map);
}
}
Aggregations