Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public class Messages
public static String promptTitle;
public static String removeComponentFailed;
public static String renameItemFailed;
public static String search;
public static String searchByPv;
public static String totalPVs;
public static String unacknowledgeFailed;
public static String withEnableDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@
*/
private final AtomicReference<List<String>> item_changes = new AtomicReference<>();

/** Set of items that have updated, with iteration order based on when they updated */
private final Set<String> items_to_update = new LinkedHashSet<>();
/** Set of items that have updated, with iteration order based on when they updated
*
* SYNC on access
*/
private final Set<String> item_paths_to_update = new LinkedHashSet<>();

Check warning on line 82 in app/alarm/ui/src/main/java/org/phoebus/applications/alarm/ui/area/AlarmAreaView.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "item_paths_to_update" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AaF9PRxISiAyecBgH3EM&open=AaF9PRxISiAyecBgH3EM&pullRequest=3988
Comment thread
shroffk marked this conversation as resolved.

/** Throttle [5Hz] used for updates of existing items */
private final UpdateThrottle update_throttle = new UpdateThrottle(200, TimeUnit.MILLISECONDS, this::updateItems);
Expand Down Expand Up @@ -165,9 +168,9 @@
if (null == item_name)
return;

synchronized (items_to_update)
synchronized (item_paths_to_update)
{
items_to_update.add(item_name);
item_paths_to_update.add(item_name);
}
update_throttle.trigger();
}
Expand All @@ -178,10 +181,10 @@
final List<String> changed_items = item_changes.getAndSet(null);

final String[] update_array;
synchronized (items_to_update)
synchronized (item_paths_to_update)
{
update_array = items_to_update.toArray(new String[items_to_update.size()]);
items_to_update.clear();
update_array = item_paths_to_update.toArray(new String[item_paths_to_update.size()]);
item_paths_to_update.clear();
}
Platform.runLater(() ->
{
Expand Down
Loading
Loading