1 23 24 30 31 package com.sun.enterprise.admin.monitor.stats.lb; 32 33 public class InstanceStats implements com.sun.enterprise.admin.monitor.stats.lb.InstanceStatsInterface, com.sun.enterprise.admin.monitor.stats.lb.CommonBean { 34 private java.lang.String _Id; 35 private java.lang.String _Health; 36 private java.lang.String _NumTotalRequests; 37 private java.lang.String _NumActiveRequests; 38 private java.util.List _ApplicationStats = new java.util.ArrayList (); private java.lang.String _ApplicationStatsId; 40 private java.lang.String _ApplicationStatsAverageResponseTime; 41 private java.lang.String _ApplicationStatsMinResponseTime; 42 private java.lang.String _ApplicationStatsMaxResponseTime; 43 private java.lang.String _ApplicationStatsNumFailoverRequests; 44 private java.lang.String _ApplicationStatsNumErrorRequests; 45 private java.lang.String _ApplicationStatsNumActiveRequests; 46 private java.lang.String _ApplicationStatsNumIdempotentUrlRequests; 47 private java.lang.String _ApplicationStatsNumTotalRequests; 48 49 public InstanceStats() { 50 _Id = ""; 51 _Health = ""; 52 _NumTotalRequests = ""; 53 _NumActiveRequests = ""; 54 _ApplicationStatsId = ""; 55 _ApplicationStatsAverageResponseTime = ""; 56 _ApplicationStatsMinResponseTime = ""; 57 _ApplicationStatsMaxResponseTime = ""; 58 _ApplicationStatsNumFailoverRequests = ""; 59 _ApplicationStatsNumErrorRequests = ""; 60 _ApplicationStatsNumActiveRequests = ""; 61 _ApplicationStatsNumIdempotentUrlRequests = ""; 62 _ApplicationStatsNumTotalRequests = ""; 63 } 64 65 public InstanceStats(com.sun.enterprise.admin.monitor.stats.lb.InstanceStats source) { 67 _Id = source._Id; 68 _Health = source._Health; 69 _NumTotalRequests = source._NumTotalRequests; 70 _NumActiveRequests = source._NumActiveRequests; 71 for (java.util.Iterator it = source._ApplicationStats.iterator(); 72 it.hasNext(); ) { 73 _ApplicationStats.add(it.next()); 74 } 75 _ApplicationStatsId = source._ApplicationStatsId; 76 _ApplicationStatsAverageResponseTime = source._ApplicationStatsAverageResponseTime; 77 _ApplicationStatsMinResponseTime = source._ApplicationStatsMinResponseTime; 78 _ApplicationStatsMaxResponseTime = source._ApplicationStatsMaxResponseTime; 79 _ApplicationStatsNumFailoverRequests = source._ApplicationStatsNumFailoverRequests; 80 _ApplicationStatsNumErrorRequests = source._ApplicationStatsNumErrorRequests; 81 _ApplicationStatsNumActiveRequests = source._ApplicationStatsNumActiveRequests; 82 _ApplicationStatsNumIdempotentUrlRequests = source._ApplicationStatsNumIdempotentUrlRequests; 83 _ApplicationStatsNumTotalRequests = source._ApplicationStatsNumTotalRequests; 84 } 85 86 public void setId(java.lang.String value) { 88 _Id = value; 89 } 90 91 public java.lang.String getId() { 92 return _Id; 93 } 94 95 public void setHealth(java.lang.String value) { 97 _Health = value; 98 } 99 100 public java.lang.String getHealth() { 101 return _Health; 102 } 103 104 public void setNumTotalRequests(java.lang.String value) { 106 _NumTotalRequests = value; 107 } 108 109 public java.lang.String getNumTotalRequests() { 110 return _NumTotalRequests; 111 } 112 113 public void setNumActiveRequests(java.lang.String value) { 115 _NumActiveRequests = value; 116 } 117 118 public java.lang.String getNumActiveRequests() { 119 return _NumActiveRequests; 120 } 121 122 public void setApplicationStats(boolean[] value) { 124 if (value == null) 125 value = new boolean[0]; 126 _ApplicationStats.clear(); 127 for (int i = 0; i < value.length; ++i) { 128 _ApplicationStats.add((value[i] ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE)); 129 } 130 } 131 132 public void setApplicationStats(int index, boolean value) { 133 _ApplicationStats.set(index, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE)); 134 } 135 136 public boolean[] getApplicationStats() { 137 boolean[] arr = new boolean[_ApplicationStats.size()]; 138 for (int i = 0; i < arr.length; ++i) { 139 arr[i] = ((java.lang.Boolean )_ApplicationStats.get(i)).booleanValue(); 140 } 141 return arr; 142 } 143 144 public java.util.List fetchApplicationStatsList() { 145 return _ApplicationStats; 146 } 147 148 public boolean isApplicationStats(int index) { 149 return ((java.lang.Boolean )_ApplicationStats.get(index)).booleanValue(); 150 } 151 152 public int sizeApplicationStats() { 154 return _ApplicationStats.size(); 155 } 156 157 public int addApplicationStats(boolean value) { 158 _ApplicationStats.add((value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE)); 159 return _ApplicationStats.size()-1; 160 } 161 162 public int removeApplicationStats(boolean value) { 164 int pos = _ApplicationStats.indexOf((value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE)); 165 if (pos >= 0) { 166 _ApplicationStats.remove(pos); 167 } 168 return pos; 169 } 170 171 public void setApplicationStatsId(java.lang.String value) { 173 _ApplicationStatsId = value; 174 } 175 176 public java.lang.String getApplicationStatsId() { 177 return _ApplicationStatsId; 178 } 179 180 public void setApplicationStatsAverageResponseTime(java.lang.String value) { 182 _ApplicationStatsAverageResponseTime = value; 183 } 184 185 public java.lang.String getApplicationStatsAverageResponseTime() { 186 return _ApplicationStatsAverageResponseTime; 187 } 188 189 public void setApplicationStatsMinResponseTime(java.lang.String value) { 191 _ApplicationStatsMinResponseTime = value; 192 } 193 194 public java.lang.String getApplicationStatsMinResponseTime() { 195 return _ApplicationStatsMinResponseTime; 196 } 197 198 public void setApplicationStatsMaxResponseTime(java.lang.String value) { 200 _ApplicationStatsMaxResponseTime = value; 201 } 202 203 public java.lang.String getApplicationStatsMaxResponseTime() { 204 return _ApplicationStatsMaxResponseTime; 205 } 206 207 public void setApplicationStatsNumFailoverRequests(java.lang.String value) { 209 _ApplicationStatsNumFailoverRequests = value; 210 } 211 212 public java.lang.String getApplicationStatsNumFailoverRequests() { 213 return _ApplicationStatsNumFailoverRequests; 214 } 215 216 public void setApplicationStatsNumErrorRequests(java.lang.String value) { 218 _ApplicationStatsNumErrorRequests = value; 219 } 220 221 public java.lang.String getApplicationStatsNumErrorRequests() { 222 return _ApplicationStatsNumErrorRequests; 223 } 224 225 public void setApplicationStatsNumActiveRequests(java.lang.String value) { 227 _ApplicationStatsNumActiveRequests = value; 228 } 229 230 public java.lang.String getApplicationStatsNumActiveRequests() { 231 return _ApplicationStatsNumActiveRequests; 232 } 233 234 public void setApplicationStatsNumIdempotentUrlRequests(java.lang.String value) { 236 _ApplicationStatsNumIdempotentUrlRequests = value; 237 } 238 239 public java.lang.String getApplicationStatsNumIdempotentUrlRequests() { 240 return _ApplicationStatsNumIdempotentUrlRequests; 241 } 242 243 public void setApplicationStatsNumTotalRequests(java.lang.String value) { 245 _ApplicationStatsNumTotalRequests = value; 246 } 247 248 public java.lang.String getApplicationStatsNumTotalRequests() { 249 return _ApplicationStatsNumTotalRequests; 250 } 251 252 public void writeNode(java.io.Writer out, String nodeName, String indent) throws java.io.IOException { 253 out.write(indent); 254 out.write("<"); 255 out.write(nodeName); 256 if (_Id != null) { 258 out.write(" id"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _Id, true); 261 out.write("'"); } 263 if (_Health != null) { 265 out.write(" health"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _Health, true); 268 out.write("'"); } 270 if (_NumTotalRequests != null) { 272 out.write(" num-total-requests"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _NumTotalRequests, true); 275 out.write("'"); } 277 if (_NumActiveRequests != null) { 279 out.write(" num-active-requests"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _NumActiveRequests, true); 282 out.write("'"); } 284 out.write(">\n"); 285 String nextIndent = indent + " "; 286 for (java.util.Iterator it = _ApplicationStats.iterator(); 287 it.hasNext(); ) { 288 boolean element = ((java.lang.Boolean )it.next()).booleanValue(); 289 if (element) { 290 out.write(nextIndent); 291 out.write("<application-stats"); if (_ApplicationStatsId != null) { 294 out.write(" id"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsId, true); 297 out.write("'"); } 299 if (_ApplicationStatsAverageResponseTime != null) { 301 out.write(" average-response-time"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsAverageResponseTime, true); 304 out.write("'"); } 306 if (_ApplicationStatsMinResponseTime != null) { 308 out.write(" min-response-time"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsMinResponseTime, true); 311 out.write("'"); } 313 if (_ApplicationStatsMaxResponseTime != null) { 315 out.write(" max-response-time"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsMaxResponseTime, true); 318 out.write("'"); } 320 if (_ApplicationStatsNumFailoverRequests != null) { 322 out.write(" num-failover-requests"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsNumFailoverRequests, true); 325 out.write("'"); } 327 if (_ApplicationStatsNumErrorRequests != null) { 329 out.write(" num-error-requests"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsNumErrorRequests, true); 332 out.write("'"); } 334 if (_ApplicationStatsNumActiveRequests != null) { 336 out.write(" num-active-requests"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsNumActiveRequests, true); 339 out.write("'"); } 341 if (_ApplicationStatsNumIdempotentUrlRequests != null) { 343 out.write(" num-idempotent-url-requests"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsNumIdempotentUrlRequests, true); 346 out.write("'"); } 348 if (_ApplicationStatsNumTotalRequests != null) { 350 out.write(" num-total-requests"); out.write("='"); com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.writeXML(out, _ApplicationStatsNumTotalRequests, true); 353 out.write("'"); } 355 out.write("/>\n"); } 357 } 358 out.write(indent); 359 out.write("</"+nodeName+">\n"); 360 } 361 362 public void readNode(org.w3c.dom.Node node) { 363 if (node.hasAttributes()) { 364 org.w3c.dom.NamedNodeMap attrs = node.getAttributes(); 365 org.w3c.dom.Attr attr; 366 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("id"); 367 if (attr != null) { 368 _Id = attr.getValue(); 369 } 370 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("health"); 371 if (attr != null) { 372 _Health = attr.getValue(); 373 } 374 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("num-total-requests"); 375 if (attr != null) { 376 _NumTotalRequests = attr.getValue(); 377 } 378 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("num-active-requests"); 379 if (attr != null) { 380 _NumActiveRequests = attr.getValue(); 381 } 382 } 383 org.w3c.dom.NodeList children = node.getChildNodes(); 384 int lastElementType = 0; 385 for (int i = 0, size = children.getLength(); i < size; ++i) { 386 org.w3c.dom.Node childNode = children.item(i); 387 String childNodeName = (childNode.getLocalName() == null ? childNode.getNodeName().intern() : childNode.getLocalName().intern()); 388 String childNodeValue = ""; 389 if (childNode.getFirstChild() != null) { 390 childNodeValue = childNode.getFirstChild().getNodeValue(); 391 } 392 if (childNodeName == "application-stats") { 393 boolean aApplicationStats; 394 if (childNode.getFirstChild() == null) 395 aApplicationStats = true; 396 else 397 aApplicationStats = java.lang.Boolean.valueOf(childNodeValue).booleanValue(); 398 if (childNode.hasAttributes()) { 399 org.w3c.dom.NamedNodeMap attrs = childNode.getAttributes(); 400 org.w3c.dom.Attr attr; 401 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("id"); 402 if (attr != null) { 403 _ApplicationStatsId = attr.getValue(); 404 } 405 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("average-response-time"); 406 if (attr != null) { 407 _ApplicationStatsAverageResponseTime = attr.getValue(); 408 } 409 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("min-response-time"); 410 if (attr != null) { 411 _ApplicationStatsMinResponseTime = attr.getValue(); 412 } 413 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("max-response-time"); 414 if (attr != null) { 415 _ApplicationStatsMaxResponseTime = attr.getValue(); 416 } 417 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("num-failover-requests"); 418 if (attr != null) { 419 _ApplicationStatsNumFailoverRequests = attr.getValue(); 420 } 421 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("num-error-requests"); 422 if (attr != null) { 423 _ApplicationStatsNumErrorRequests = attr.getValue(); 424 } 425 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("num-active-requests"); 426 if (attr != null) { 427 _ApplicationStatsNumActiveRequests = attr.getValue(); 428 } 429 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("num-idempotent-url-requests"); 430 if (attr != null) { 431 _ApplicationStatsNumIdempotentUrlRequests = attr.getValue(); 432 } 433 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("num-total-requests"); 434 if (attr != null) { 435 _ApplicationStatsNumTotalRequests = attr.getValue(); 436 } 437 } 438 _ApplicationStats.add((aApplicationStats ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE)); 439 lastElementType = 4; 440 } 441 else { 442 } 444 } 445 } 446 447 public void validate() throws com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException { 448 boolean restrictionFailure = false; 449 if (getId() == null) { 451 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getId() == null", "id", this); } 453 if (getHealth() == null) { 455 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getHealth() == null", "health", this); } 457 if (getNumTotalRequests() == null) { 459 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getNumTotalRequests() == null", "numTotalRequests", this); } 461 if (getNumActiveRequests() == null) { 463 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getNumActiveRequests() == null", "numActiveRequests", this); } 465 for (int _index = 0; _index < sizeApplicationStats(); ++_index) { 467 boolean element = isApplicationStats(_index); 468 } 469 if (getApplicationStatsId() == null) { 471 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsId() == null", "applicationStatsId", this); } 473 if (getApplicationStatsAverageResponseTime() == null) { 475 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsAverageResponseTime() == null", "applicationStatsAverageResponseTime", this); } 477 if (getApplicationStatsMinResponseTime() == null) { 479 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsMinResponseTime() == null", "applicationStatsMinResponseTime", this); } 481 if (getApplicationStatsMaxResponseTime() == null) { 483 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsMaxResponseTime() == null", "applicationStatsMaxResponseTime", this); } 485 if (getApplicationStatsNumFailoverRequests() == null) { 487 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsNumFailoverRequests() == null", "applicationStatsNumFailoverRequests", this); } 489 if (getApplicationStatsNumErrorRequests() == null) { 491 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsNumErrorRequests() == null", "applicationStatsNumErrorRequests", this); } 493 if (getApplicationStatsNumActiveRequests() == null) { 495 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsNumActiveRequests() == null", "applicationStatsNumActiveRequests", this); } 497 if (getApplicationStatsNumIdempotentUrlRequests() == null) { 499 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsNumIdempotentUrlRequests() == null", "applicationStatsNumIdempotentUrlRequests", this); } 501 if (getApplicationStatsNumTotalRequests() == null) { 503 throw new com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStats.ValidateException("getApplicationStatsNumTotalRequests() == null", "applicationStatsNumTotalRequests", this); } 505 } 506 507 public void changePropertyByName(String name, Object value) { 508 if (name == null) return; 509 name = name.intern(); 510 if (name == "id") 511 setId((java.lang.String )value); 512 else if (name == "health") 513 setHealth((java.lang.String )value); 514 else if (name == "numTotalRequests") 515 setNumTotalRequests((java.lang.String )value); 516 else if (name == "numActiveRequests") 517 setNumActiveRequests((java.lang.String )value); 518 else if (name == "applicationStats") 519 addApplicationStats(((java.lang.Boolean )value).booleanValue()); 520 else if (name == "applicationStats[]") 521 setApplicationStats((boolean[]) value); 522 else if (name == "applicationStatsId") 523 setApplicationStatsId((java.lang.String )value); 524 else if (name == "applicationStatsAverageResponseTime") 525 setApplicationStatsAverageResponseTime((java.lang.String )value); 526 else if (name == "applicationStatsMinResponseTime") 527 setApplicationStatsMinResponseTime((java.lang.String )value); 528 else if (name == "applicationStatsMaxResponseTime") 529 setApplicationStatsMaxResponseTime((java.lang.String )value); 530 else if (name == "applicationStatsNumFailoverRequests") 531 setApplicationStatsNumFailoverRequests((java.lang.String )value); 532 else if (name == "applicationStatsNumErrorRequests") 533 setApplicationStatsNumErrorRequests((java.lang.String )value); 534 else if (name == "applicationStatsNumActiveRequests") 535 setApplicationStatsNumActiveRequests((java.lang.String )value); 536 else if (name == "applicationStatsNumIdempotentUrlRequests") 537 setApplicationStatsNumIdempotentUrlRequests((java.lang.String )value); 538 else if (name == "applicationStatsNumTotalRequests") 539 setApplicationStatsNumTotalRequests((java.lang.String )value); 540 else 541 throw new IllegalArgumentException (name+" is not a valid property name for InstanceStats"); 542 } 543 544 public Object fetchPropertyByName(String name) { 545 if (name == "id") 546 return getId(); 547 if (name == "health") 548 return getHealth(); 549 if (name == "numTotalRequests") 550 return getNumTotalRequests(); 551 if (name == "numActiveRequests") 552 return getNumActiveRequests(); 553 if (name == "applicationStats[]") 554 return getApplicationStats(); 555 if (name == "applicationStatsId") 556 return getApplicationStatsId(); 557 if (name == "applicationStatsAverageResponseTime") 558 return getApplicationStatsAverageResponseTime(); 559 if (name == "applicationStatsMinResponseTime") 560 return getApplicationStatsMinResponseTime(); 561 if (name == "applicationStatsMaxResponseTime") 562 return getApplicationStatsMaxResponseTime(); 563 if (name == "applicationStatsNumFailoverRequests") 564 return getApplicationStatsNumFailoverRequests(); 565 if (name == "applicationStatsNumErrorRequests") 566 return getApplicationStatsNumErrorRequests(); 567 if (name == "applicationStatsNumActiveRequests") 568 return getApplicationStatsNumActiveRequests(); 569 if (name == "applicationStatsNumIdempotentUrlRequests") 570 return getApplicationStatsNumIdempotentUrlRequests(); 571 if (name == "applicationStatsNumTotalRequests") 572 return getApplicationStatsNumTotalRequests(); 573 throw new IllegalArgumentException (name+" is not a valid property name for InstanceStats"); 574 } 575 576 public com.sun.enterprise.admin.monitor.stats.lb.CommonBean[] childBeans(boolean recursive) { 578 java.util.List children = new java.util.LinkedList (); 579 childBeans(recursive, children); 580 com.sun.enterprise.admin.monitor.stats.lb.CommonBean[] result = new com.sun.enterprise.admin.monitor.stats.lb.CommonBean[children.size()]; 581 return (com.sun.enterprise.admin.monitor.stats.lb.CommonBean[]) children.toArray(result); 582 } 583 584 public void childBeans(boolean recursive, java.util.List beans) { 586 } 587 588 public boolean equals(Object o) { 589 if (o == this) 590 return true; 591 if (!(o instanceof com.sun.enterprise.admin.monitor.stats.lb.InstanceStats)) 592 return false; 593 com.sun.enterprise.admin.monitor.stats.lb.InstanceStats inst = (com.sun.enterprise.admin.monitor.stats.lb.InstanceStats) o; 594 if (!(_Id == null ? inst._Id == null : _Id.equals(inst._Id))) 595 return false; 596 if (!(_Health == null ? inst._Health == null : _Health.equals(inst._Health))) 597 return false; 598 if (!(_NumTotalRequests == null ? inst._NumTotalRequests == null : _NumTotalRequests.equals(inst._NumTotalRequests))) 599 return false; 600 if (!(_NumActiveRequests == null ? inst._NumActiveRequests == null : _NumActiveRequests.equals(inst._NumActiveRequests))) 601 return false; 602 if (sizeApplicationStats() != inst.sizeApplicationStats()) 603 return false; 604 for (java.util.Iterator it = _ApplicationStats.iterator(), it2 = inst._ApplicationStats.iterator(); 606 it.hasNext() && it2.hasNext(); ) { 607 boolean element = ((java.lang.Boolean )it.next()).booleanValue(); 608 boolean element2 = ((java.lang.Boolean )it2.next()).booleanValue(); 609 if (!(element == element2)) 610 return false; 611 } 612 if (!(_ApplicationStatsId == null ? inst._ApplicationStatsId == null : _ApplicationStatsId.equals(inst._ApplicationStatsId))) 613 return false; 614 if (!(_ApplicationStatsAverageResponseTime == null ? inst._ApplicationStatsAverageResponseTime == null : _ApplicationStatsAverageResponseTime.equals(inst._ApplicationStatsAverageResponseTime))) 615 return false; 616 if (!(_ApplicationStatsMinResponseTime == null ? inst._ApplicationStatsMinResponseTime == null : _ApplicationStatsMinResponseTime.equals(inst._ApplicationStatsMinResponseTime))) 617 return false; 618 if (!(_ApplicationStatsMaxResponseTime == null ? inst._ApplicationStatsMaxResponseTime == null : _ApplicationStatsMaxResponseTime.equals(inst._ApplicationStatsMaxResponseTime))) 619 return false; 620 if (!(_ApplicationStatsNumFailoverRequests == null ? inst._ApplicationStatsNumFailoverRequests == null : _ApplicationStatsNumFailoverRequests.equals(inst._ApplicationStatsNumFailoverRequests))) 621 return false; 622 if (!(_ApplicationStatsNumErrorRequests == null ? inst._ApplicationStatsNumErrorRequests == null : _ApplicationStatsNumErrorRequests.equals(inst._ApplicationStatsNumErrorRequests))) 623 return false; 624 if (!(_ApplicationStatsNumActiveRequests == null ? inst._ApplicationStatsNumActiveRequests == null : _ApplicationStatsNumActiveRequests.equals(inst._ApplicationStatsNumActiveRequests))) 625 return false; 626 if (!(_ApplicationStatsNumIdempotentUrlRequests == null ? inst._ApplicationStatsNumIdempotentUrlRequests == null : _ApplicationStatsNumIdempotentUrlRequests.equals(inst._ApplicationStatsNumIdempotentUrlRequests))) 627 return false; 628 if (!(_ApplicationStatsNumTotalRequests == null ? inst._ApplicationStatsNumTotalRequests == null : _ApplicationStatsNumTotalRequests.equals(inst._ApplicationStatsNumTotalRequests))) 629 return false; 630 return true; 631 } 632 633 public int hashCode() { 634 int result = 17; 635 result = 37*result + (_Id == null ? 0 : _Id.hashCode()); 636 result = 37*result + (_Health == null ? 0 : _Health.hashCode()); 637 result = 37*result + (_NumTotalRequests == null ? 0 : _NumTotalRequests.hashCode()); 638 result = 37*result + (_NumActiveRequests == null ? 0 : _NumActiveRequests.hashCode()); 639 result = 37*result + ((_ApplicationStats).hashCode()); 640 result = 37*result + (_ApplicationStatsId == null ? 0 : _ApplicationStatsId.hashCode()); 641 result = 37*result + (_ApplicationStatsAverageResponseTime == null ? 0 : _ApplicationStatsAverageResponseTime.hashCode()); 642 result = 37*result + (_ApplicationStatsMinResponseTime == null ? 0 : _ApplicationStatsMinResponseTime.hashCode()); 643 result = 37*result + (_ApplicationStatsMaxResponseTime == null ? 0 : _ApplicationStatsMaxResponseTime.hashCode()); 644 result = 37*result + (_ApplicationStatsNumFailoverRequests == null ? 0 : _ApplicationStatsNumFailoverRequests.hashCode()); 645 result = 37*result + (_ApplicationStatsNumErrorRequests == null ? 0 : _ApplicationStatsNumErrorRequests.hashCode()); 646 result = 37*result + (_ApplicationStatsNumActiveRequests == null ? 0 : _ApplicationStatsNumActiveRequests.hashCode()); 647 result = 37*result + (_ApplicationStatsNumIdempotentUrlRequests == null ? 0 : _ApplicationStatsNumIdempotentUrlRequests.hashCode()); 648 result = 37*result + (_ApplicationStatsNumTotalRequests == null ? 0 : _ApplicationStatsNumTotalRequests.hashCode()); 649 return result; 650 } 651 652 public String toString() { 653 java.io.StringWriter sw = new java.io.StringWriter (); 654 try { 655 writeNode(sw, "InstanceStats", ""); 656 } catch (java.io.IOException e) { 657 } 660 return sw.toString(); 661 } 662 } 663 664 665 734 | Popular Tags |