You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luca Burgazzoli (JIRA)" <ji...@apache.org> on 2017/05/09 09:15:04 UTC

[jira] [Created] (CAMEL-11244) camel-hazelcast: use string/enum instead of numeric operation type

Luca Burgazzoli created CAMEL-11244:
---------------------------------------

             Summary: camel-hazelcast: use string/enum instead of numeric operation type
                 Key: CAMEL-11244
                 URL: https://issues.apache.org/jira/browse/CAMEL-11244
             Project: Camel
          Issue Type: Improvement
          Components: camel-hazelcast
            Reporter: Luca Burgazzoli
             Fix For: 2.20.0


camel-hazelcast defines the operation using an integer but you can also use a string when configuring the endpoint so it is a mix of styles that we should avoid so it would be nice if we use enum/string everywhere.

{code:java}
HazelcastOperation {
    PUT,
    ...; 
}

HazelcastDefaultEndpoint {
    @UriParam
    private HazelcastOperation defaultOperation;
}
{code}

This difference of types adds some additional maintenance work as one has to maintain:
- [maping|https://github.com/apache/camel/blob/master/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastComponentHelper.java#L27]
- [constants|https://github.com/apache/camel/blob/master/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java#L60-L104]
- [operation enums|https://github.com/apache/camel/blob/master/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastDefaultEndpoint.java#L44-L46] 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)