Github user robertgmoss commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/911#discussion_r39991699
--- Diff: api/src/main/java/org/apache/brooklyn/api/entity/Entity.java ---
@@ -314,4 +361,80 @@
*/
<T> void emit(Sensor<T> sensor, T value);
}
+
+ @Beta
+ public interface PolicySupport {
+ /**
+ * @return an immutable thread-safe view of the policies.
+ */
+ Collection<Policy> getPolicies();
--- End diff --
The other benefit is that it can be used in the enhanced for loop, e.g.
`for(Policy p : policies())`. The implementation could just return the
`Iterator` from the `Collection` that is currently constructed for
`getPolicies()`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---