brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grkvlt <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #304: Adds a target configuration to the SSH co...
Date Mon, 22 Aug 2016 14:02:02 GMT
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/304#discussion_r75682542
  
    --- Diff: core/src/main/java/org/apache/brooklyn/entity/group/SshCommandMembershipTrackingPolicy.java
---
    @@ -62,6 +69,38 @@
         public static final String EVENT_TYPE = "EVENT_TYPE";
         public static final String MEMBER_ID = "MEMBER_ID";
     
    +    public static enum ExecutionTarget {
    +        ENTITY,
    +        MEMBER,
    +        ALL_MEMBERS;
    +
    +        private static Converter<String, String> converter = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_UNDERSCORE);
    +
    +        public static ExecutionTarget fromString(String name) {
    +            Maybe<ExecutionTarget> parsed = tryFromString(name);
    +            return parsed.get();
    +        }
    +
    +        public static Maybe<ExecutionTarget> tryFromString(String name) {
    --- End diff --
    
    But the methods here are _for_ `TypeCoercions` to work... If I use it, won't there be
an infinite recursion?


---
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