Fix PSC causing lag via selective update broadcasting (#28)

* Fix PSC causing lag via selective update broadcasting

* add logging, update key

* Fix current pipeline setting selective send

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
Banks T
2020-07-17 01:37:18 -04:00
committed by GitHub
parent 53783d88d7
commit bac09bf430
3 changed files with 19 additions and 5 deletions

View File

@@ -30,8 +30,11 @@ public class OutgoingUIEvent<T> extends DataChangeEvent<T> {
this.updateType = updateType;
}
@SuppressWarnings("unchecked")
public OutgoingUIEvent(UIUpdateType updateType, String dataKey, HashMap<String, Object> data) {
this(updateType, dataKey, (T) data.get(dataKey));
public static OutgoingUIEvent<HashMap<String, Object>> wrappedOf(
UIUpdateType uiUpdateType, String commandName, String propertyName, Object value) {
HashMap<String, Object> data = new HashMap<>();
data.put(propertyName, value);
return new OutgoingUIEvent<>(uiUpdateType, commandName, data);
}
}