Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Allow to add several instances of a subsystem in a deployment specification #31

Closed
jachinte opened this issue Jul 18, 2016 · 1 comment

Comments

@jachinte
Copy link
Collaborator

jachinte commented Jul 18, 2016

Parameterized subsystems are made to be reusable, this means one should be able to instantiate the same subsystem several times for the same deployment. That is, one should not only set a subsystem instance, but also add many of them.

To consider: should the set method be replaced by an add method? the associated semantics regarding subsystems with parameters should be maintained: if a subsystem has parameters, an instance with no parameters should be used. If an instance with arguments is added, the first one should not be used.

Example:

for (i : 1..4) { // 4 instances of the Sub subsystem
    // (elements within Sub should be deployed 4 times)
    add(new com.company.Sub("node" + i, "another-param"))
}
start(true)
@jachinte
Copy link
Collaborator Author

jachinte commented Aug 12, 2016

NOTICE: with this change, subsystem instances must be added explicitely in order to include a subsystem in the deployment. This means that instances with empty constructor are no longer added automatically.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant