001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008-2010 Sun Microsystems, Inc. 015 * Portions Copyright 2014-2016 ForgeRock AS. 016 */ 017package org.opends.guitools.controlpanel.datamodel; 018 019import java.io.File; 020import java.io.IOException; 021import java.util.ArrayList; 022import java.util.Collection; 023import java.util.Collections; 024import java.util.Date; 025import java.util.HashSet; 026import java.util.List; 027import java.util.Map; 028import java.util.Set; 029 030import org.opends.guitools.controlpanel.util.ConfigFromDirContext; 031import org.opends.quicksetup.UserData; 032import org.opends.server.schema.SomeSchemaElement; 033import org.opends.server.tools.tasks.TaskEntry; 034import org.forgerock.opendj.ldap.schema.AttributeType; 035import org.forgerock.opendj.ldap.DN; 036import org.opends.server.types.ObjectClass; 037import org.opends.server.types.OpenDsException; 038import org.opends.server.types.Schema; 039 040import com.forgerock.opendj.util.OperatingSystem; 041 042import static org.opends.guitools.controlpanel.datamodel.BasicMonitoringAttributes.*; 043import static org.opends.guitools.controlpanel.util.Utilities.*; 044import static org.opends.server.types.CommonSchemaElements.*; 045 046/** 047 * This is just a class used to provide a data model describing what the 048 * StatusPanelDialog will show to the user. 049 */ 050public class ServerDescriptor 051{ 052 private static String localHostName = UserData.getDefaultHostName(); 053 054 private ServerStatus status; 055 private int openConnections; 056 private Set<BackendDescriptor> backends = new HashSet<>(); 057 private Set<ConnectionHandlerDescriptor> listeners = new HashSet<>(); 058 private ConnectionHandlerDescriptor adminConnector; 059 private Set<DN> administrativeUsers = new HashSet<>(); 060 private String installPath; 061 private String instancePath; 062 private String openDSVersion; 063 private String javaVersion; 064 private ArrayList<OpenDsException> exceptions = new ArrayList<>(); 065 private boolean isWindowsServiceEnabled; 066 private boolean isSchemaEnabled; 067 private Schema schema; 068 069 private CustomSearchResult rootMonitor; 070 private CustomSearchResult jvmMemoryUsage; 071 private CustomSearchResult systemInformation; 072 private CustomSearchResult entryCaches; 073 private CustomSearchResult workQueue; 074 075 private Set<TaskEntry> taskEntries = new HashSet<>(); 076 077 private long runningTime = -1; 078 private boolean isAuthenticated; 079 private String hostName = localHostName; 080 private boolean isLocal = true; 081 082 /** Enumeration indicating the status of the server. */ 083 public enum ServerStatus 084 { 085 /** Server Started. */ 086 STARTED, 087 /** Server Stopped. */ 088 STOPPED, 089 /** Server Starting. */ 090 STARTING, 091 /** Server Stopping. */ 092 STOPPING, 093 /** Not connected to remote. */ 094 NOT_CONNECTED_TO_REMOTE, 095 /** Status Unknown. */ 096 UNKNOWN 097 } 098 099 /** Default constructor. */ 100 public ServerDescriptor() 101 { 102 } 103 104 /** 105 * Return the administrative users. 106 * @return the administrative users. 107 */ 108 public Set<DN> getAdministrativeUsers() 109 { 110 return administrativeUsers; 111 } 112 113 /** 114 * Set the administrative users. 115 * @param administrativeUsers the administrative users to set 116 */ 117 public void setAdministrativeUsers(Set<DN> administrativeUsers) 118 { 119 this.administrativeUsers = Collections.unmodifiableSet(administrativeUsers); 120 } 121 122 /** 123 * Returns whether the schema is enabled or not. 124 * @return <CODE>true</CODE> if the schema is enabled and <CODE>false</CODE> 125 * otherwise. 126 */ 127 public boolean isSchemaEnabled() 128 { 129 return isSchemaEnabled; 130 } 131 132 /** 133 * Sets whether the schema is enabled or not. 134 * @param isSchemaEnabled <CODE>true</CODE> if the schema is enabled and 135 * <CODE>false</CODE> otherwise. 136 */ 137 public void setSchemaEnabled(boolean isSchemaEnabled) 138 { 139 this.isSchemaEnabled = isSchemaEnabled; 140 } 141 142 /** 143 * Return the instance path where the server databases and configuration is 144 * located. 145 * @return the instance path where the server databases and configuration is 146 * located 147 */ 148 public String getInstancePath() 149 { 150 return instancePath; 151 } 152 153 /** 154 * Sets the instance path where the server databases and configuration is 155 * located. 156 * @param instancePath the instance path where the server databases and 157 * configuration is located. 158 */ 159 public void setInstancePath(String instancePath) 160 { 161 this.instancePath = instancePath; 162 } 163 164 /** 165 * Return the install path where the server is installed. 166 * @return the install path where the server is installed. 167 */ 168 public String getInstallPath() 169 { 170 return installPath; 171 } 172 173 /** 174 * Sets the install path where the server is installed. 175 * @param installPath the install path where the server is installed. 176 */ 177 public void setInstallPath(String installPath) 178 { 179 this.installPath = installPath; 180 } 181 182 /** 183 * Returns whether the install and the instance are on the same server 184 * or not. 185 * @return whether the install and the instance are on the same server 186 * or not. 187 */ 188 public boolean sameInstallAndInstance() 189 { 190 boolean sameInstallAndInstance; 191 String instance = getInstancePath(); 192 String install = getInstallPath(); 193 try 194 { 195 if (instance != null) 196 { 197 sameInstallAndInstance = instance.equals(install); 198 if (!sameInstallAndInstance && 199 (isLocal() || OperatingSystem.isWindows())) 200 { 201 File f1 = new File(instance); 202 File f2 = new File(install); 203 sameInstallAndInstance = 204 f1.getCanonicalFile().equals(f2.getCanonicalFile()); 205 } 206 } 207 else 208 { 209 sameInstallAndInstance = install == null; 210 } 211 } 212 catch (IOException ioe) 213 { 214 sameInstallAndInstance = false; 215 } 216 return sameInstallAndInstance; 217 } 218 219 /** 220 * Return the java version used to run the server. 221 * @return the java version used to run the server. 222 */ 223 public String getJavaVersion() 224 { 225 return javaVersion; 226 } 227 228 /** 229 * Set the java version used to run the server. 230 * @param javaVersion the java version used to run the server. 231 */ 232 public void setJavaVersion(String javaVersion) 233 { 234 this.javaVersion = javaVersion; 235 } 236 237 /** 238 * Returns the number of open connection in the server. 239 * @return the number of open connection in the server. 240 */ 241 public int getOpenConnections() 242 { 243 return openConnections; 244 } 245 246 /** 247 * Set the number of open connections. 248 * @param openConnections the number of open connections. 249 */ 250 public void setOpenConnections(int openConnections) 251 { 252 this.openConnections = openConnections; 253 } 254 255 /** 256 * Returns the version of the server. 257 * @return the version of the server. 258 */ 259 public String getOpenDSVersion() 260 { 261 return openDSVersion; 262 } 263 264 /** 265 * Sets the version of the server. 266 * @param openDSVersion the version of the server. 267 */ 268 public void setOpenDSVersion(String openDSVersion) 269 { 270 this.openDSVersion = openDSVersion; 271 } 272 273 /** 274 * Returns the status of the server. 275 * @return the status of the server. 276 */ 277 public ServerStatus getStatus() 278 { 279 return status; 280 } 281 282 /** 283 * Sets the status of the server. 284 * @param status the status of the server. 285 */ 286 public void setStatus(ServerStatus status) 287 { 288 this.status = status; 289 } 290 291 /** 292 * Returns the task entries. 293 * @return the task entries. 294 */ 295 public Set<TaskEntry> getTaskEntries() 296 { 297 return taskEntries; 298 } 299 300 /** 301 * Sets the the task entries. 302 * @param taskEntries the task entries. 303 */ 304 public void setTaskEntries(Set<TaskEntry> taskEntries) 305 { 306 this.taskEntries = Collections.unmodifiableSet(taskEntries); 307 } 308 309 /** {@inheritDoc} */ 310 @Override 311 public boolean equals(Object o) 312 { 313 if (this == o) 314 { 315 return true; 316 } 317 if (!(o instanceof ServerDescriptor)) 318 { 319 return false; 320 } 321 322 ServerDescriptor desc = (ServerDescriptor) o; 323 return desc.getStatus() == getStatus() 324 && desc.isLocal() == isLocal() 325 && desc.isAuthenticated() == isAuthenticated() 326 && desc.getOpenConnections() == getOpenConnections() 327 && areEqual(getInstallPath(), desc.getInstallPath()) 328 && areEqual(getInstancePath(), desc.getInstancePath()) 329 && areEqual(getJavaVersion(), desc.getJavaVersion()) 330 && areEqual(getOpenDSVersion(), desc.getOpenDSVersion()) 331 && areEqual(desc.getAdministrativeUsers(), getAdministrativeUsers()) 332 && areEqual(desc.getConnectionHandlers(), getConnectionHandlers()) 333 && areEqual(desc.getBackends(), getBackends()) 334 && areEqual(desc.getExceptions(), getExceptions()) 335 && desc.isSchemaEnabled() == isSchemaEnabled() 336 && areSchemasEqual(getSchema(), desc.getSchema()) 337 && (!OperatingSystem.isWindows() || desc.isWindowsServiceEnabled() == isWindowsServiceEnabled()) 338 && desc.getTaskEntries().equals(getTaskEntries()); 339 } 340 341 /** {@inheritDoc} */ 342 @Override 343 public int hashCode() 344 { 345 String s = installPath + openDSVersion + javaVersion + isAuthenticated; 346 return status.hashCode() + openConnections + s.hashCode(); 347 } 348 349 /** 350 * Return whether we were authenticated when retrieving the information of 351 * this ServerStatusDescriptor. 352 * @return <CODE>true</CODE> if we were authenticated when retrieving the 353 * information of this ServerStatusDescriptor and <CODE>false</CODE> 354 * otherwise. 355 */ 356 public boolean isAuthenticated() 357 { 358 return isAuthenticated; 359 } 360 361 /** 362 * Sets whether we were authenticated when retrieving the information of 363 * this ServerStatusDescriptor. 364 * @param isAuthenticated whether we were authenticated when retrieving the 365 * information of this ServerStatusDescriptor. 366 */ 367 public void setAuthenticated(boolean isAuthenticated) 368 { 369 this.isAuthenticated = isAuthenticated; 370 } 371 372 /** 373 * Returns the backend descriptors of the server. 374 * @return the backend descriptors of the server. 375 */ 376 public Set<BackendDescriptor> getBackends() 377 { 378 return backends; 379 } 380 381 /** 382 * Sets the backend descriptors of the server. 383 * @param backends the database descriptors to set. 384 */ 385 public void setBackends(Set<BackendDescriptor> backends) 386 { 387 this.backends = Collections.unmodifiableSet(backends); 388 } 389 390 /** 391 * Returns the listener descriptors of the server. 392 * @return the listener descriptors of the server. 393 */ 394 public Set<ConnectionHandlerDescriptor> getConnectionHandlers() 395 { 396 return listeners; 397 } 398 399 /** 400 * Sets the listener descriptors of the server. 401 * @param listeners the listener descriptors to set. 402 */ 403 public void setConnectionHandlers(Set<ConnectionHandlerDescriptor> listeners) 404 { 405 this.listeners = Collections.unmodifiableSet(listeners); 406 } 407 408 /** 409 * Sets the schema of the server. 410 * @param schema the schema of the server. 411 */ 412 public void setSchema(Schema schema) 413 { 414 this.schema = schema; 415 } 416 417 /** 418 * Returns the schema of the server. 419 * @return the schema of the server. 420 */ 421 public Schema getSchema() 422 { 423 return schema; 424 } 425 426 /** 427 * Returns the host name of the server. 428 * @return the host name of the server. 429 */ 430 public String getHostname() 431 { 432 return hostName; 433 } 434 435 /** 436 * Sets the host name of the server. 437 * @param hostName the host name of the server. 438 */ 439 public void setHostname(String hostName) 440 { 441 this.hostName = hostName; 442 } 443 444 /** 445 * Returns <CODE>true</CODE> if we are trying to manage the local host and 446 * <CODE>false</CODE> otherwise. 447 * @return <CODE>true</CODE> if we are trying to manage the local host and 448 * <CODE>false</CODE> otherwise. 449 */ 450 public boolean isLocal() 451 { 452 return isLocal; 453 } 454 455 /** 456 * Sets whether this server represents the local instance or a remote server. 457 * @param isLocal whether this server represents the local instance or a 458 * remote server (in another machine or in another installation on the same 459 * machine). 460 */ 461 public void setIsLocal(boolean isLocal) 462 { 463 this.isLocal = isLocal; 464 } 465 466 /** 467 * Returns the exceptions that occurred while reading the configuration. 468 * @return the exceptions that occurred while reading the configuration. 469 */ 470 public List<OpenDsException> getExceptions() 471 { 472 return Collections.unmodifiableList(exceptions); 473 } 474 475 /** 476 * Sets the exceptions that occurred while reading the configuration. 477 * @param exceptions exceptions that occurred while reading the 478 * configuration. 479 */ 480 public void setExceptions(Collection<OpenDsException> exceptions) 481 { 482 this.exceptions.clear(); 483 this.exceptions.addAll(exceptions); 484 } 485 486 /** 487 * Tells whether the windows service is enabled or not. 488 * @return <CODE>true</CODE> if the windows service is enabled and 489 * <CODE>false</CODE> otherwise. 490 */ 491 public boolean isWindowsServiceEnabled() 492 { 493 return isWindowsServiceEnabled; 494 } 495 496 /** 497 * Sets whether the windows service is enabled or not. 498 * @param isWindowsServiceEnabled <CODE>true</CODE> if the windows service is 499 * enabled and <CODE>false</CODE> otherwise. 500 */ 501 public void setWindowsServiceEnabled(boolean isWindowsServiceEnabled) 502 { 503 this.isWindowsServiceEnabled = isWindowsServiceEnabled; 504 } 505 506 /** 507 * Returns whether the server is running under a windows system or not. 508 * @return whether the server is running under a windows system or not. 509 */ 510 public boolean isWindows() 511 { 512 if (isLocal()) 513 { 514 return OperatingSystem.isWindows(); 515 } 516 CustomSearchResult sr = getSystemInformationMonitor(); 517 if (sr == null) 518 { 519 return false; 520 } 521 String os = getFirstValueAsString(sr, "operatingSystem"); 522 return os != null && OperatingSystem.WINDOWS.equals(OperatingSystem.forName(os)); 523 } 524 525 /** 526 * Method used to compare schemas. 527 * Returns <CODE>true</CODE> if the two schemas are equal and 528 * <CODE>false</CODE> otherwise. 529 * @param schema1 the first schema. 530 * @param schema2 the second schema. 531 * @return <CODE>true</CODE> if the two schemas are equal and 532 * <CODE>false</CODE> otherwise. 533 */ 534 public static boolean areSchemasEqual(Schema schema1, Schema schema2) 535 { 536 if (schema1 == schema2) 537 { 538 return true; 539 } 540 else if (schema2 == null) 541 { 542 return schema1 != null; 543 } 544 else if (schema1 == null) 545 { 546 return false; 547 } 548 549 return areAttributeTypesEqual(schema1, schema2) 550 && areObjectClassesEqual(schema1, schema2) 551 && areEqual(schema1.getMatchingRules(), schema2.getMatchingRules()) 552 && areEqual(schema1.getSyntaxes(), schema2.getSyntaxes()); 553 } 554 555 private static boolean areAttributeTypesEqual(Schema schema1, Schema schema2) 556 { 557 final List<AttributeType> attrs1 = new ArrayList<>(schema1.getAttributeTypes()); 558 final List<AttributeType> attrs2 = new ArrayList<>(schema2.getAttributeTypes()); 559 if (attrs1.size() != attrs2.size()) 560 { 561 return false; 562 } 563 Collections.sort(attrs1); 564 Collections.sort(attrs2); 565 for (int i = 0; i < attrs1.size(); i++) 566 { 567 AttributeType attr1 = attrs1.get(i); 568 AttributeType attr2 = attrs2.get(i); 569 if (attr2 == null || !areAttributesEqual(attr1, attr2)) 570 { 571 return false; 572 } 573 } 574 return true; 575 } 576 577 private static boolean areObjectClassesEqual(Schema schema1, Schema schema2) 578 { 579 final Map<String, ObjectClass> ocs1 = schema1.getObjectClasses(); 580 final Map<String, ObjectClass> ocs2 = schema2.getObjectClasses(); 581 if (ocs1.size() != ocs2.size()) 582 { 583 return false; 584 } 585 for (String name : ocs1.keySet()) 586 { 587 ObjectClass oc1 = ocs1.get(name); 588 ObjectClass oc2 = ocs2.get(name); 589 if (oc2 == null || !areObjectClassesEqual(oc1, oc2)) 590 { 591 return false; 592 } 593 } 594 return true; 595 } 596 597 /** 598 * Method used to compare attributes defined in the schema. 599 * Returns <CODE>true</CODE> if the two schema attributes are equal and 600 * <CODE>false</CODE> otherwise. 601 * @param schema1 the first schema attribute. 602 * @param schema2 the second schema attribute. 603 * @return <CODE>true</CODE> if the two schema attributes are equal and 604 * <CODE>false</CODE> otherwise. 605 */ 606 private static boolean areAttributesEqual(AttributeType attr1, AttributeType attr2) 607 { 608 return attr1.getOID().equals(attr2.getOID()) 609 && attr1.isCollective() == attr2.isCollective() 610 && attr1.isNoUserModification() == attr2.isNoUserModification() 611 && attr1.isObjectClass() == attr2.isObjectClass() 612 && attr1.isObsolete() == attr2.isObsolete() 613 && attr1.isOperational() == attr2.isOperational() 614 && attr1.isSingleValue() == attr2.isSingleValue() 615 && areEqual(attr1.getApproximateMatchingRule(), attr2.getApproximateMatchingRule()) 616 && areEqual(new SomeSchemaElement(attr1).getDefinitionWithFileName(), 617 new SomeSchemaElement(attr2).getDefinitionWithFileName()) 618 && areEqual(attr1.getDescription(), attr2.getDescription()) 619 && areEqual(attr1.getEqualityMatchingRule(), attr2.getEqualityMatchingRule()) 620 && areEqual(attr1.getOrderingMatchingRule(), attr2.getOrderingMatchingRule()) 621 && areEqual(attr1.getSubstringMatchingRule(), attr2.getSubstringMatchingRule()) 622 && areEqual(attr1.getSuperiorType(), attr2.getSuperiorType()) 623 && areEqual(attr1.getSyntax(), attr2.getSyntax()) 624 && areEqual(attr1.getSyntax().getOID(), attr2.getSyntax().getOID()) 625 && areEqual(attr1.getExtraProperties().keySet(), attr2.getExtraProperties().keySet()) 626 && areEqual(toSet(attr1.getNames()), toSet(attr2.getNames())); 627 } 628 629 /** 630 * Method used to compare objectclasses defined in the schema. 631 * Returns <CODE>true</CODE> if the two schema objectclasses are equal and 632 * <CODE>false</CODE> otherwise. 633 * @param schema1 the first schema objectclass. 634 * @param schema2 the second schema objectclass. 635 * @return <CODE>true</CODE> if the two schema objectclasses are equal and 636 * <CODE>false</CODE> otherwise. 637 */ 638 private static boolean areObjectClassesEqual(ObjectClass oc1, ObjectClass oc2) 639 { 640 return oc1.getOID().equals(oc2.getOID()) 641 && oc1.isExtensibleObject() == oc2.isExtensibleObject() 642 && areEqual(getDefinitionWithFileName(oc1), getDefinitionWithFileName(oc2)) 643 && areEqual(oc1.getDescription(), oc2.getDescription()) 644 && areEqual(oc1.getObjectClassType(), oc2.getObjectClassType()) 645 && areEqual(oc1.getOptionalAttributes(), oc2.getOptionalAttributes()) 646 && areEqual(oc1.getRequiredAttributes(), oc2.getRequiredAttributes()) 647 && areEqual(oc1.getSuperiorClasses(), oc2.getSuperiorClasses()) 648 && areEqual(oc1.getExtraProperties().keySet(), oc2.getExtraProperties().keySet()) 649 && areEqual(toSet(oc1.getNormalizedNames()), toSet(oc2.getNormalizedNames())) 650 && areEqual(toSet(oc1.getUserDefinedNames()), toSet(oc2.getUserDefinedNames())); 651 } 652 653 private static Set<Object> toSet(Iterable<?> iterable) 654 { 655 Set<Object> s = new HashSet<>(); 656 for (Object o : iterable) 657 { 658 s.add(o); 659 } 660 return s; 661 } 662 663 /** 664 * Commodity method used to compare two objects that might be 665 * <CODE>null</CODE>. 666 * @param o1 the first object. 667 * @param o2 the second object. 668 * @return if both objects are <CODE>null</CODE> returns true. If not returns 669 * <CODE>true</CODE> if both objects are equal according to the Object.equal 670 * method and <CODE>false</CODE> otherwise. 671 */ 672 private static boolean areEqual(Object o1, Object o2) 673 { 674 if (o1 != null) 675 { 676 return o1.equals(o2); 677 } 678 return o2 == null; 679 } 680 681 /** 682 * Returns the admin connector. 683 * @return the admin connector. 684 */ 685 public ConnectionHandlerDescriptor getAdminConnector() 686 { 687 return adminConnector; 688 } 689 690 /** 691 * Sets the admin connector. 692 * @param adminConnector the admin connector. 693 */ 694 public void setAdminConnector(ConnectionHandlerDescriptor adminConnector) 695 { 696 this.adminConnector = adminConnector; 697 } 698 699 /** 700 * Sets the monitoring entry for the entry caches. 701 * @param entryCaches the monitoring entry for the entry caches. 702 */ 703 public void setEntryCachesMonitor(CustomSearchResult entryCaches) 704 { 705 this.entryCaches = entryCaches; 706 } 707 708 /** 709 * Sets the monitoring entry for the JVM memory usage. 710 * @param jvmMemoryUsage the monitoring entry for the JVM memory usage. 711 */ 712 public void setJvmMemoryUsageMonitor(CustomSearchResult jvmMemoryUsage) 713 { 714 this.jvmMemoryUsage = jvmMemoryUsage; 715 } 716 717 /** 718 * Sets the root entry of the monitoring tree. 719 * @param rootMonitor the root entry of the monitoring tree. 720 */ 721 public void setRootMonitor(CustomSearchResult rootMonitor) 722 { 723 this.rootMonitor = rootMonitor; 724 runningTime = computeRunningTime(rootMonitor); 725 } 726 727 private long computeRunningTime(CustomSearchResult rootMonitor) 728 { 729 if (rootMonitor != null) 730 { 731 try 732 { 733 String start = getFirstValueAsString(rootMonitor, START_DATE.getAttributeName()); 734 String current = getFirstValueAsString(rootMonitor, CURRENT_DATE.getAttributeName()); 735 Date startTime = ConfigFromDirContext.utcParser.parse(start); 736 Date currentTime = ConfigFromDirContext.utcParser.parse(current); 737 return currentTime.getTime() - startTime.getTime(); 738 } 739 catch (Throwable t) 740 { 741 return -1; 742 } 743 } 744 return -1; 745 } 746 747 /** 748 * Returns the running time of the server in milliseconds. Returns -1 if 749 * no running time could be found. 750 * @return the running time of the server in milliseconds. 751 */ 752 public long getRunningTime() 753 { 754 return runningTime; 755 } 756 757 /** 758 * Sets the monitoring entry for the system information. 759 * @param systemInformation entry for the system information. 760 */ 761 public void setSystemInformationMonitor(CustomSearchResult systemInformation) 762 { 763 this.systemInformation = systemInformation; 764 } 765 766 /** 767 * Sets the monitoring entry of the work queue. 768 * @param workQueue entry of the work queue. 769 */ 770 public void setWorkQueueMonitor(CustomSearchResult workQueue) 771 { 772 this.workQueue = workQueue; 773 } 774 775 /** 776 * Returns the monitoring entry for the entry caches. 777 * @return the monitoring entry for the entry caches. 778 */ 779 public CustomSearchResult getEntryCachesMonitor() 780 { 781 return entryCaches; 782 } 783 784 /** 785 * Returns the monitoring entry for the JVM memory usage. 786 * @return the monitoring entry for the JVM memory usage. 787 */ 788 public CustomSearchResult getJvmMemoryUsageMonitor() 789 { 790 return jvmMemoryUsage; 791 } 792 793 /** 794 * Returns the root entry of the monitoring tree. 795 * @return the root entry of the monitoring tree. 796 */ 797 public CustomSearchResult getRootMonitor() 798 { 799 return rootMonitor; 800 } 801 802 /** 803 * Returns the monitoring entry for the system information. 804 * @return the monitoring entry for the system information. 805 */ 806 public CustomSearchResult getSystemInformationMonitor() 807 { 808 return systemInformation; 809 } 810 811 /** 812 * Returns the monitoring entry for the work queue. 813 * @return the monitoring entry for the work queue. 814 */ 815 public CustomSearchResult getWorkQueueMonitor() 816 { 817 return workQueue; 818 } 819}