Re: What is a better way to instantiate/set a new field

2015-06-02 Thread Swapnil Patil
Hi Isuru, Thank you for the clarification . I will do the same. Regards, Swapnil On Tue, Jun 2, 2015 at 2:14 PM, Isuru Haththotuwa wrote: > > > On Tue, Jun 2, 2015 at 12:57 PM, Swapnil Patil > wrote: > >> Hi Isuru, >> >> Thanks for suggesstions. >> >> >>> Member class is used in the Topology

Re: What is a better way to instantiate/set a new field

2015-06-02 Thread Isuru Haththotuwa
On Tue, Jun 2, 2015 at 12:57 PM, Swapnil Patil wrote: > Hi Isuru, > > Thanks for suggesstions. > > >> Member class is used in the Topology hierarchy, to represent each member >> of a cluster. For me, the easiest way to find where it has been referenced >> is using the IDE that you are using. For

Re: What is a better way to instantiate/set a new field

2015-06-02 Thread Swapnil Patil
Hi Rajkumar, Thanks for the suggestion. I think this should be optional field. Regards, Swapnil On Mon, Jun 1, 2015 at 4:19 PM, Rajkumar Rajaratnam wrote: > It depends on whether the *instanceId* is mandatory or not. If it is > mandatory, you should modify the existing constructor and have it

Re: What is a better way to instantiate/set a new field

2015-06-02 Thread Swapnil Patil
Hi Isuru, Thanks for suggesstions. > Member class is used in the Topology hierarchy, to represent each member > of a cluster. For me, the easiest way to find where it has been referenced > is using the IDE that you are using. For an example, in IntelliJ Idea, you > can right click on the Member

Re: What is a better way to instantiate/set a new field

2015-06-02 Thread Swapnil Patil
Hi Udara, I want to expose the instanceId in MemberContext class to other components through topology. I have already figured out a way to do so. Now I am adding a new field instanceId in Member class of load.balancer.common.domain. So I just wanted to know how should I instantiate this new field

Re: What is a better way to instantiate/set a new field

2015-06-01 Thread Rajkumar Rajaratnam
It depends on whether the *instanceId* is mandatory or not. If it is mandatory, you should modify the existing constructor and have it in the constructor. If it is not mandatory, you should have a setter. Thanks. On Mon, Jun 1, 2015 at 9:43 PM, Udara Liyanage wrote: > Hi, > > Cloud controller c

Re: What is a better way to instantiate/set a new field

2015-06-01 Thread Isuru Haththotuwa
Hi Swapnil, Member class is used in the Topology hierarchy, to represent each member of a cluster. For me, the easiest way to find where it has been referenced is using the IDE that you are using. For an example, in IntelliJ Idea, you can right click on the Member class's constructor -> click on f

Re: What is a better way to instantiate/set a new field

2015-06-01 Thread Udara Liyanage
Hi, Cloud controller creates a Member object which represents an instance in IaaS. Then it sends an event with the member details so other components get updated. Could you describe what is instanceId you trying to add so we can find a the most suitable approach. On Mon, Jun 1, 2015 at 8:33 PM, S

What is a better way to instantiate/set a new field

2015-06-01 Thread Swapnil Patil
Hi Devs, I am adding a new field in org.apache.stratos.messaging.domain.topology.Member class, called instanceId. For this, what would be a better approach 1. Modifying the existing constructor 2. Adding a new constructor which takes this as an additional argument 3. Just have a setter method.