Skip to content

Conversation

@artem-v
Copy link
Contributor

@artem-v artem-v commented Sep 7, 2019

Motivation

Provide shorted api for cluster configuration. Existing approach is not handy when client needs to define only some portion of config and not all the properties.

Updated

new ClusterImpl()
  .transport(opts -> opts.port(port))
  .membership(opts -> opts.seedMembers(addresses))

instead of previous approach:

new ClusterImpl()
  .config(config -> 
    config.transport(opts -> opts.port(port)))
    config.membership(opts -> opts.seedMembers(addresses))

@ronenhamias
Copy link
Member

maybe not instead but in addition?

@artem-v
Copy link
Contributor Author

artem-v commented Sep 7, 2019

maybe not instead but in addition?

yes
client still has .config(UnaryOperator) and constructor with ClusterConfig, these methods left unchanged

@artem-v artem-v merged commit e030b3b into develop Sep 8, 2019
@artem-v artem-v deleted the create-shorter-configuration-api branch September 8, 2019 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants