brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Refactor: deprecate EntityLocal m...
Date Mon, 21 Sep 2015 16:04:23 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/911#discussion_r39989121
  
    --- 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();
    +        
    +        /**
    +         * Adds the given policy to this entity. Also calls policy.setEntity if available.
    +         */
    +        void addPolicy(Policy policy);
    +        
    +        /**
    +         * Adds the given policy to this entity. Also calls policy.setEntity if available.
    +         */
    +        <T extends Policy> T addPolicy(PolicySpec<T> enricher);
    +        
    +        /**
    +         * Removes the given policy from this entity. 
    +         * @return True if the policy existed at this entity; false otherwise
    +         */
    +        boolean removePolicy(Policy policy);
    +    }
    +    
    +    @Beta
    +    public interface EnricherSupport {
    +        /**
    +         * @return an immutable thread-safe view of the enrichers.
    +         */
    +        Collection<Enricher> getEnrichers();
    +        
    +        /**
    +         * Adds the given enricher to this entity. Also calls enricher.setEntity if available.
    +         */
    +        void addEnricher(Enricher enricher);
    +        
    +        /**
    +         * Adds the given enricher to this entity. Also calls enricher.setEntity if available.
    +         */
    +        <T extends Enricher> T addEnricher(EnricherSpec<T> enricher);
    +        
    +        /**
    +         * Removes the given enricher from this entity. 
    +         * @return True if the policy enricher at this entity; false otherwise
    +         */
    +        boolean removeEnricher(Enricher enricher);
    +    }
    +    
    +    @Beta
    +    public interface GroupSupport {
    --- End diff --
    
    What are you thinking of on the generified super interface?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message