View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.model.jmx;
12  
13  import java.util.ArrayList;
14  import java.util.Collection;
15  import java.util.List;
16  
17  /**
18   * The Class Cluster.
19   */
20  public class Cluster {
21  
22    /** The name. */
23    private String name;
24  
25    /** The info. */
26    private String info;
27  
28    /** The manager class name. */
29    private String managerClassName;
30  
31    /** The mcast address. */
32    private String mcastAddress;
33  
34    /** The mcast bind address. */
35    private String mcastBindAddress;
36  
37    /** The mcast cluster domain. */
38    private String mcastClusterDomain;
39  
40    /** The mcast drop time. */
41    private long mcastDropTime;
42  
43    /** The mcast frequency. */
44    private long mcastFrequency;
45  
46    /** The mcast port. */
47    private int mcastPort;
48  
49    /** The mcast so timeout. */
50    private int mcastSoTimeout;
51  
52    /** The mcast ttl. */
53    private int mcastTtl;
54  
55    /** The members. */
56    private List<ClusterSender> members = new ArrayList<>();
57  
58    /** The tcp thread count. */
59    private int tcpThreadCount;
60  
61    /** The tcp listen address. */
62    private String tcpListenAddress;
63  
64    /** The tcp listen port. */
65    private int tcpListenPort;
66  
67    /** The tcp selector timeout. */
68    private long tcpSelectorTimeout;
69  
70    /** The nr of msgs received. */
71    private long nrOfMsgsReceived;
72  
73    /** The total received bytes. */
74    private long totalReceivedBytes;
75  
76    /** The sender ack timeout. */
77    private long senderAckTimeout;
78  
79    /** The sender auto connect. */
80    private boolean senderAutoConnect;
81  
82    /** The sender failure counter. */
83    private long senderFailureCounter;
84  
85    /** The sender nr of requests. */
86    private long senderNrOfRequests;
87  
88    /** The sender replication mode. */
89    private String senderReplicationMode;
90  
91    /** The sender total bytes. */
92    private long senderTotalBytes;
93  
94    /**
95     * Gets the name.
96     *
97     * @return the name
98     */
99    public String getName() {
100     return name;
101   }
102 
103   /**
104    * Sets the name.
105    *
106    * @param name the new name
107    */
108   public void setName(String name) {
109     this.name = name;
110   }
111 
112   /**
113    * Gets the info.
114    *
115    * @return the info
116    */
117   public String getInfo() {
118     return info;
119   }
120 
121   /**
122    * Sets the info.
123    *
124    * @param info the new info
125    */
126   public void setInfo(String info) {
127     this.info = info;
128   }
129 
130   /**
131    * Gets the manager class name.
132    *
133    * @return the manager class name
134    */
135   public String getManagerClassName() {
136     return managerClassName;
137   }
138 
139   /**
140    * Sets the manager class name.
141    *
142    * @param managerClassName the new manager class name
143    */
144   public void setManagerClassName(String managerClassName) {
145     this.managerClassName = managerClassName;
146   }
147 
148   /**
149    * Gets the mcast address.
150    *
151    * @return the mcast address
152    */
153   public String getMcastAddress() {
154     return mcastAddress;
155   }
156 
157   /**
158    * Sets the mcast address.
159    *
160    * @param mcastAddress the new mcast address
161    */
162   public void setMcastAddress(String mcastAddress) {
163     this.mcastAddress = mcastAddress;
164   }
165 
166   /**
167    * Gets the mcast bind address.
168    *
169    * @return the mcast bind address
170    */
171   public String getMcastBindAddress() {
172     return mcastBindAddress;
173   }
174 
175   /**
176    * Sets the mcast bind address.
177    *
178    * @param mcastBindAddress the new mcast bind address
179    */
180   public void setMcastBindAddress(String mcastBindAddress) {
181     this.mcastBindAddress = mcastBindAddress;
182   }
183 
184   /**
185    * Gets the mcast cluster domain.
186    *
187    * @return the mcast cluster domain
188    */
189   public String getMcastClusterDomain() {
190     return mcastClusterDomain;
191   }
192 
193   /**
194    * Sets the mcast cluster domain.
195    *
196    * @param mcastClusterDomain the new mcast cluster domain
197    */
198   public void setMcastClusterDomain(String mcastClusterDomain) {
199     this.mcastClusterDomain = mcastClusterDomain;
200   }
201 
202   /**
203    * Gets the members.
204    *
205    * @return the members
206    */
207   public List<ClusterSender> getMembers() {
208     return members == null ? List.of() : new ArrayList<>(members);
209   }
210 
211   /**
212    * Sets the members.
213    *
214    * @param members the new members
215    */
216   public void setMembers(Collection<ClusterSender> members) {
217     this.members = members == null ? List.of() : new ArrayList<>(members);
218   }
219 
220   /**
221    * Gets the tcp listen address.
222    *
223    * @return the tcp listen address
224    */
225   public String getTcpListenAddress() {
226     return tcpListenAddress;
227   }
228 
229   /**
230    * Sets the tcp listen address.
231    *
232    * @param tcpListenAddress the new tcp listen address
233    */
234   public void setTcpListenAddress(String tcpListenAddress) {
235     this.tcpListenAddress = tcpListenAddress;
236   }
237 
238   /**
239    * Gets the tcp listen port.
240    *
241    * @return the tcp listen port
242    */
243   public int getTcpListenPort() {
244     return tcpListenPort;
245   }
246 
247   /**
248    * Sets the tcp listen port.
249    *
250    * @param tcpListenPort the new tcp listen port
251    */
252   public void setTcpListenPort(int tcpListenPort) {
253     this.tcpListenPort = tcpListenPort;
254   }
255 
256   /**
257    * Gets the tcp selector timeout.
258    *
259    * @return the tcp selector timeout
260    */
261   public long getTcpSelectorTimeout() {
262     return tcpSelectorTimeout;
263   }
264 
265   /**
266    * Sets the tcp selector timeout.
267    *
268    * @param tcpSelectorTimeout the new tcp selector timeout
269    */
270   public void setTcpSelectorTimeout(long tcpSelectorTimeout) {
271     this.tcpSelectorTimeout = tcpSelectorTimeout;
272   }
273 
274   /**
275    * Gets the nr of msgs received.
276    *
277    * @return the nr of msgs received
278    */
279   public long getNrOfMsgsReceived() {
280     return nrOfMsgsReceived;
281   }
282 
283   /**
284    * Sets the nr of msgs received.
285    *
286    * @param nrOfMsgsReceived the new nr of msgs received
287    */
288   public void setNrOfMsgsReceived(long nrOfMsgsReceived) {
289     this.nrOfMsgsReceived = nrOfMsgsReceived;
290   }
291 
292   /**
293    * Gets the sender ack timeout.
294    *
295    * @return the sender ack timeout
296    */
297   public long getSenderAckTimeout() {
298     return senderAckTimeout;
299   }
300 
301   /**
302    * Sets the sender ack timeout.
303    *
304    * @param senderAckTimeout the new sender ack timeout
305    */
306   public void setSenderAckTimeout(long senderAckTimeout) {
307     this.senderAckTimeout = senderAckTimeout;
308   }
309 
310   /**
311    * Checks if is sender auto connect.
312    *
313    * @return true, if is sender auto connect
314    */
315   public boolean isSenderAutoConnect() {
316     return senderAutoConnect;
317   }
318 
319   /**
320    * Sets the sender auto connect.
321    *
322    * @param senderAutoConnect the new sender auto connect
323    */
324   public void setSenderAutoConnect(boolean senderAutoConnect) {
325     this.senderAutoConnect = senderAutoConnect;
326   }
327 
328   /**
329    * Gets the sender failure counter.
330    *
331    * @return the sender failure counter
332    */
333   public long getSenderFailureCounter() {
334     return senderFailureCounter;
335   }
336 
337   /**
338    * Sets the sender failure counter.
339    *
340    * @param senderFailureCounter the new sender failure counter
341    */
342   public void setSenderFailureCounter(long senderFailureCounter) {
343     this.senderFailureCounter = senderFailureCounter;
344   }
345 
346   /**
347    * Gets the sender nr of requests.
348    *
349    * @return the sender nr of requests
350    */
351   public long getSenderNrOfRequests() {
352     return senderNrOfRequests;
353   }
354 
355   /**
356    * Sets the sender nr of requests.
357    *
358    * @param senderNrOfRequests the new sender nr of requests
359    */
360   public void setSenderNrOfRequests(long senderNrOfRequests) {
361     this.senderNrOfRequests = senderNrOfRequests;
362   }
363 
364   /**
365    * Gets the sender replication mode.
366    *
367    * @return the sender replication mode
368    */
369   public String getSenderReplicationMode() {
370     return senderReplicationMode;
371   }
372 
373   /**
374    * Sets the sender replication mode.
375    *
376    * @param senderReplicationMode the new sender replication mode
377    */
378   public void setSenderReplicationMode(String senderReplicationMode) {
379     this.senderReplicationMode = senderReplicationMode;
380   }
381 
382   /**
383    * Gets the sender total bytes.
384    *
385    * @return the sender total bytes
386    */
387   public long getSenderTotalBytes() {
388     return senderTotalBytes;
389   }
390 
391   /**
392    * Sets the sender total bytes.
393    *
394    * @param senderTotalBytes the new sender total bytes
395    */
396   public void setSenderTotalBytes(long senderTotalBytes) {
397     this.senderTotalBytes = senderTotalBytes;
398   }
399 
400   /**
401    * Gets the mcast drop time.
402    *
403    * @return the mcast drop time
404    */
405   public long getMcastDropTime() {
406     return mcastDropTime;
407   }
408 
409   /**
410    * Sets the mcast drop time.
411    *
412    * @param mcastDropTime the new mcast drop time
413    */
414   public void setMcastDropTime(long mcastDropTime) {
415     this.mcastDropTime = mcastDropTime;
416   }
417 
418   /**
419    * Gets the mcast frequency.
420    *
421    * @return the mcast frequency
422    */
423   public long getMcastFrequency() {
424     return mcastFrequency;
425   }
426 
427   /**
428    * Sets the mcast frequency.
429    *
430    * @param mcastFrequency the new mcast frequency
431    */
432   public void setMcastFrequency(long mcastFrequency) {
433     this.mcastFrequency = mcastFrequency;
434   }
435 
436   /**
437    * Gets the mcast port.
438    *
439    * @return the mcast port
440    */
441   public int getMcastPort() {
442     return mcastPort;
443   }
444 
445   /**
446    * Sets the mcast port.
447    *
448    * @param mcastPort the new mcast port
449    */
450   public void setMcastPort(int mcastPort) {
451     this.mcastPort = mcastPort;
452   }
453 
454   /**
455    * Gets the mcast so timeout.
456    *
457    * @return the mcast so timeout
458    */
459   public int getMcastSoTimeout() {
460     return mcastSoTimeout;
461   }
462 
463   /**
464    * Sets the mcast so timeout.
465    *
466    * @param mcastSoTimeout the new mcast so timeout
467    */
468   public void setMcastSoTimeout(int mcastSoTimeout) {
469     this.mcastSoTimeout = mcastSoTimeout;
470   }
471 
472   /**
473    * Gets the mcast ttl.
474    *
475    * @return the mcast ttl
476    */
477   public int getMcastTtl() {
478     return mcastTtl;
479   }
480 
481   /**
482    * Sets the mcast ttl.
483    *
484    * @param mcastTtl the new mcast ttl
485    */
486   public void setMcastTtl(int mcastTtl) {
487     this.mcastTtl = mcastTtl;
488   }
489 
490   /**
491    * Gets the tcp thread count.
492    *
493    * @return the tcp thread count
494    */
495   public int getTcpThreadCount() {
496     return tcpThreadCount;
497   }
498 
499   /**
500    * Sets the tcp thread count.
501    *
502    * @param tcpThreadCount the new tcp thread count
503    */
504   public void setTcpThreadCount(int tcpThreadCount) {
505     this.tcpThreadCount = tcpThreadCount;
506   }
507 
508   /**
509    * Gets the total received bytes.
510    *
511    * @return the total received bytes
512    */
513   public long getTotalReceivedBytes() {
514     return totalReceivedBytes;
515   }
516 
517   /**
518    * Sets the total received bytes.
519    *
520    * @param totalReceivedBytes the new total received bytes
521    */
522   public void setTotalReceivedBytes(long totalReceivedBytes) {
523     this.totalReceivedBytes = totalReceivedBytes;
524   }
525 
526 }