001/* 002 * Copyright 2010-2018 Ping Identity Corporation 003 * All Rights Reserved. 004 */ 005/* 006 * Copyright (C) 2015-2018 Ping Identity Corporation 007 * 008 * This program is free software; you can redistribute it and/or modify 009 * it under the terms of the GNU General Public License (GPLv2 only) 010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) 011 * as published by the Free Software Foundation. 012 * 013 * This program is distributed in the hope that it will be useful, 014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016 * GNU General Public License for more details. 017 * 018 * You should have received a copy of the GNU General Public License 019 * along with this program; if not, see <http://www.gnu.org/licenses>. 020 */ 021package com.unboundid.ldap.sdk.unboundidds.monitors; 022 023 024 025import java.util.Collections; 026import java.util.LinkedHashMap; 027import java.util.Map; 028 029import com.unboundid.ldap.sdk.Entry; 030import com.unboundid.util.NotMutable; 031import com.unboundid.util.ThreadSafety; 032import com.unboundid.util.ThreadSafetyLevel; 033 034import static com.unboundid.ldap.sdk.unboundidds.monitors.MonitorMessages.*; 035 036 037 038/** 039 * This class defines a monitor entry that provides general information about 040 * the state of an index in a Directory Server backend. Note that the term 041 * "index" may refer to a number of different things, including attribute 042 * indexes (in which each individual index type will be considered a separate 043 * index, so if "cn" has equality and substring index types then that will be 044 * considered two separate indexes), VLV indexes, and system indexes (for 045 * databases that are maintained internally, like id2entry, dn2id, id2children, 046 * and id2subtree). 047 * <BR> 048 * <BLOCKQUOTE> 049 * <B>NOTE:</B> This class, and other classes within the 050 * {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only 051 * supported for use against Ping Identity, UnboundID, and Alcatel-Lucent 8661 052 * server products. These classes provide support for proprietary 053 * functionality or for external specifications that are not considered stable 054 * or mature enough to be guaranteed to work in an interoperable way with 055 * other types of LDAP servers. 056 * </BLOCKQUOTE> 057 * <BR> 058 * The set of index monitor entries published by the directory server can be 059 * obtained using the {@link MonitorManager#getIndexMonitorEntries} method. 060 * Specific methods are available for accessing the associated monitor data 061 * (e.g., {@link IndexMonitorEntry#getBackendID} to retrieve the backend ID), 062 * and there are also methods for accessing this information in a generic manner 063 * (e.g., {@link IndexMonitorEntry#getMonitorAttributes} to retrieve all of 064 * the monitor attributes). See the {@link MonitorManager} class documentation 065 * for an example that demonstrates the use of the generic API for accessing 066 * monitor data. 067 */ 068@NotMutable() 069@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 070public final class IndexMonitorEntry 071 extends MonitorEntry 072{ 073 /** 074 * The structural object class used in index monitor entries. 075 */ 076 static final String INDEX_MONITOR_OC = "ds-index-monitor-entry"; 077 078 079 080 /** 081 * The name of the attribute that contains the index name. 082 */ 083 private static final String ATTR_INDEX_NAME = "ds-index-name"; 084 085 086 087 /** 088 * The name of the attribute that contains the backend ID. 089 */ 090 private static final String ATTR_BACKEND_ID = "ds-index-backend-id"; 091 092 093 094 /** 095 * The name of the attribute that contains the backend base DN. 096 */ 097 private static final String ATTR_BASE_DN = "ds-index-backend-base-dn"; 098 099 100 101 /** 102 * The name of the attribute that contains the name of the associated 103 * attribute type. 104 */ 105 private static final String ATTR_INDEX_ATTR = "ds-index-attribute-type"; 106 107 108 109 /** 110 * The name of the attribute that contains the name of the associated 111 * attribute index type. 112 */ 113 private static final String ATTR_INDEX_TYPE = "ds-index-type"; 114 115 116 117 /** 118 * The name of the attribute that contains the string representation of a 119 * filter used for the index. 120 */ 121 private static final String ATTR_INDEX_FILTER = "ds-index-filter"; 122 123 124 125 /** 126 * The name of the attribute that indicates whether the index is trusted. 127 */ 128 private static final String ATTR_INDEX_TRUSTED = "ds-index-trusted"; 129 130 131 132 /** 133 * The name of the attribute that contains the index entry limit. 134 */ 135 private static final String ATTR_ENTRY_LIMIT = "ds-index-entry-limit"; 136 137 138 139 /** 140 * The name of the attribute that contains the number of index keys for which 141 * the entry count has exceeded the limit since the index DB was opened. 142 */ 143 private static final String ATTR_EXCEEDED_COUNT = 144 "ds-index-exceeded-entry-limit-count-since-db-open"; 145 146 147 148 /** 149 * The name of the attribute that contains the number of unique index keys 150 * accessed by search operations that are near (typically, within 80% of) the 151 * index entry limit since the index DB was opened. 152 */ 153 private static final String ATTR_SEARCH_KEYS_NEAR_LIMIT = 154 "ds-index-unique-keys-near-entry-limit-accessed-by-search-since-db-open"; 155 156 157 158 /** 159 * The name of the attribute that contains the number of unique index keys 160 * accessed by search operations that are over the index entry limit since the 161 * index DB was opened. 162 */ 163 private static final String ATTR_SEARCH_KEYS_OVER_LIMIT = 164 "ds-index-unique-keys-exceeding-entry-limit-accessed-by-search-since-" + 165 "db-open"; 166 167 168 169 /** 170 * The name of the attribute that contains the number of unique index keys 171 * accessed by write operations that are near (typically, within 80% of) the 172 * index entry limit since the index DB was opened. 173 */ 174 private static final String ATTR_WRITE_KEYS_NEAR_LIMIT = 175 "ds-index-unique-keys-near-entry-limit-accessed-by-write-since-db-open"; 176 177 178 179 /** 180 * The name of the attribute that contains the number of unique index keys 181 * accessed by write operations that are over the index entry limit since the 182 * index DB was opened. 183 */ 184 private static final String ATTR_WRITE_KEYS_OVER_LIMIT = 185 "ds-index-unique-keys-exceeding-entry-limit-accessed-by-write-since-" + 186 "db-open"; 187 188 189 190 /** 191 * The name of the attribute that indicates whether a matching count should be 192 * maintained for a key that has exceeded the entry limit. 193 */ 194 private static final String ATTR_MAINTAIN_COUNT = 195 "ds-index-maintain-count"; 196 197 198 199 /** 200 * The name of the attribute that indicates whether the index was fully 201 * primed. 202 */ 203 private static final String ATTR_FULLY_PRIMED = 204 "ds-index-fully-primed-at-backend-open"; 205 206 207 208 /** 209 * The name of the attribute that contains a reason explaining why the prime 210 * was not completed. 211 */ 212 private static final String ATTR_PRIME_INCOMPLETE_REASON = 213 "ds-index-prime-incomplete-reason"; 214 215 216 217 /** 218 * The name of the attribute that contains information about an exception that 219 * was encountered while performing the prime. 220 */ 221 private static final String ATTR_PRIME_EXCEPTION = 222 "ds-index-prime-exception"; 223 224 225 226 /** 227 * The name of the attribute that contains the number of keys that were 228 * primed when the backend was opened. 229 */ 230 private static final String ATTR_PRIMED_KEYS = 231 "ds-index-num-primed-keys-at-backend-open"; 232 233 234 235 /** 236 * The name of the attribute that contains the number of times the index has 237 * been updated since the database was opened. 238 */ 239 private static final String ATTR_WRITE_COUNT = 240 "ds-index-write-count-since-db-open"; 241 242 243 244 /** 245 * The name of the attribute that contains the number of keys deleted from the 246 * index since the database was opened. 247 */ 248 private static final String ATTR_DELETE_COUNT = 249 "ds-index-remove-count-since-db-open"; 250 251 252 253 /** 254 * The name of the attribute that contains the number of read operations 255 * against the index since the database was opened. 256 */ 257 private static final String ATTR_READ_COUNT = 258 "ds-index-read-count-since-db-open"; 259 260 261 262 /** 263 * The name of the attribute that contains the number of read operations 264 * performed during search filter evaluation since the database was opened. 265 */ 266 private static final String ATTR_READ_FOR_SEARCH_COUNT = 267 "ds-index-read-for-search-count-since-db-open"; 268 269 270 271 /** 272 * The name of the attribute that contains the number of cursors created for 273 * the index. 274 */ 275 private static final String ATTR_CURSOR_COUNT = 276 "ds-index-open-cursor-count-since-db-open"; 277 278 279 280 /** 281 * The serial version UID for this serializable class. 282 */ 283 private static final long serialVersionUID = 9182830448328951893L; 284 285 286 287 // Indicates whether the index was fully primed when the backend came online. 288 private final Boolean fullyPrimed; 289 290 // Indicates whether the index should be considered trusted. 291 private final Boolean indexTrusted; 292 293 // Indicates whether to maintain a count of matching entries even when the ID 294 // list is not maintained. 295 private final Boolean maintainCount; 296 297 // The index entry limit for the index. 298 private final Long entryLimit; 299 300 // The number of keys that have exceeded the entry limit since coming online. 301 private final Long exceededCount; 302 303 // The number of cursors created in the index since coming online. 304 private final Long numCursors; 305 306 // The number of index keys deleted from the index since coming online. 307 private final Long numDeletes; 308 309 // The number of reads from the index since coming online. 310 private final Long numReads; 311 312 // The number of reads as a result of filter processing from the index since 313 // coming online. 314 private final Long numReadsForSearch; 315 316 // The number of writes to the index since coming online. 317 private final Long numWrites; 318 319 // The number of keys that were primed when the backend came online. 320 private final Long primedKeys; 321 322 // The number of keys near the index entry limit that have been accessed by 323 // search operations since the index came online. 324 private final Long searchKeysNearLimit; 325 326 // The number of keys over the index entry limit that have been accessed by 327 // search operations since the index came online. 328 private final Long searchKeysOverLimit; 329 330 // The number of keys near the index entry limit that have been accessed by 331 // write operations since the index came online. 332 private final Long writeKeysNearLimit; 333 334 // The number of keys over the index entry limit that have been accessed by 335 // write operations since the index came online. 336 private final Long writeKeysOverLimit; 337 338 // The name of the associated attribute type. 339 private final String attributeType; 340 341 // The name of the associated backend ID. 342 private final String backendID; 343 344 // The base DN for the associated backend. 345 private final String baseDN; 346 347 // The filter for the associated index. 348 private final String indexFilter; 349 350 // The index name for the associated index. 351 private final String indexName; 352 353 // The index name of the index type for the index. 354 private final String indexType; 355 356 // Information about an exception caught during prime processing. 357 private final String primeException; 358 359 // Information about the reason the prime was not completed. 360 private final String primeIncompleteReason; 361 362 363 364 /** 365 * Creates a new index monitor entry from the provided entry. 366 * 367 * @param entry The entry to be parsed as an index monitor entry. It must 368 * not be {@code null}. 369 */ 370 public IndexMonitorEntry(final Entry entry) 371 { 372 super(entry); 373 374 fullyPrimed = getBoolean(ATTR_FULLY_PRIMED); 375 indexTrusted = getBoolean(ATTR_INDEX_TRUSTED); 376 maintainCount = getBoolean(ATTR_MAINTAIN_COUNT); 377 entryLimit = getLong(ATTR_ENTRY_LIMIT); 378 exceededCount = getLong(ATTR_EXCEEDED_COUNT); 379 numCursors = getLong(ATTR_CURSOR_COUNT); 380 numDeletes = getLong(ATTR_DELETE_COUNT); 381 numReads = getLong(ATTR_READ_COUNT); 382 numReadsForSearch = getLong(ATTR_READ_FOR_SEARCH_COUNT); 383 numWrites = getLong(ATTR_WRITE_COUNT); 384 primedKeys = getLong(ATTR_PRIMED_KEYS); 385 searchKeysNearLimit = getLong(ATTR_SEARCH_KEYS_NEAR_LIMIT); 386 searchKeysOverLimit = getLong(ATTR_SEARCH_KEYS_OVER_LIMIT); 387 writeKeysNearLimit = getLong(ATTR_WRITE_KEYS_NEAR_LIMIT); 388 writeKeysOverLimit = getLong(ATTR_WRITE_KEYS_OVER_LIMIT); 389 attributeType = getString(ATTR_INDEX_ATTR); 390 backendID = getString(ATTR_BACKEND_ID); 391 baseDN = getString(ATTR_BASE_DN); 392 indexFilter = getString(ATTR_INDEX_FILTER); 393 indexName = getString(ATTR_INDEX_NAME); 394 indexType = getString(ATTR_INDEX_TYPE); 395 primeException = getString(ATTR_PRIME_EXCEPTION); 396 primeIncompleteReason = getString(ATTR_PRIME_INCOMPLETE_REASON); 397 } 398 399 400 401 /** 402 * Retrieves the name of the index database. 403 * 404 * @return The name of the index database, or {@code null} if it was not 405 * included in the monitor entry. 406 */ 407 public String getIndexName() 408 { 409 return indexName; 410 } 411 412 413 414 /** 415 * Retrieves the backend ID for the associated backend. 416 * 417 * @return The backend ID for the associated backend, or {@code null} if it 418 * was not included in the monitor entry. 419 */ 420 public String getBackendID() 421 { 422 return backendID; 423 } 424 425 426 427 /** 428 * Retrieves the base DN for the data with which the index is associated. 429 * 430 * @return The base DN for the data with which the index is associated, or 431 * {@code null} if it was not included in the monitor entry. 432 */ 433 public String getBaseDN() 434 { 435 return baseDN; 436 } 437 438 439 440 /** 441 * Retrieves the name of the attribute type with which the index is 442 * associated. It will only be available for attribute indexes. 443 * 444 * @return The name of the attribute type with which the index is associated, 445 * or {@code null} if it was not included in the monitor entry. 446 */ 447 public String getAttributeType() 448 { 449 return attributeType; 450 } 451 452 453 454 /** 455 * Retrieves the name of the attribute index type. It will only be available 456 * for attribute indexes. 457 * 458 * @return The name of the attribute index type, or {@code null} if it was 459 * not included in the monitor entry. 460 */ 461 public String getAttributeIndexType() 462 { 463 return indexType; 464 } 465 466 467 468 /** 469 * Retrieves the filter used for the index. It will only be available for 470 * filter indexes. 471 * 472 * @return The filter used for the index, or {@code null} if it was not 473 * included in the monitor entry. 474 */ 475 public String getIndexFilter() 476 { 477 return indexFilter; 478 } 479 480 481 482 /** 483 * Indicates whether the index may be considered trusted. It will only be 484 * available for attribute indexes. 485 * 486 * @return {@code true} if the index may be considered trusted, 487 * {@code false} if it is not trusted, or {@code null} if it was not 488 * included in the monitor entry. 489 */ 490 public Boolean isIndexTrusted() 491 { 492 return indexTrusted; 493 } 494 495 496 497 /** 498 * Retrieves the index entry limit, which is the maximum number of entries 499 * that will be allowed to match a key before the ID list for that key will 500 * stop being maintained. 501 * 502 * @return The index entry limit, or {@code null} if was not included in the 503 * monitor entry. 504 */ 505 public Long getIndexEntryLimit() 506 { 507 return entryLimit; 508 } 509 510 511 512 /** 513 * Retrieves the number of index keys which have stopped being maintained 514 * because the number of matching entries has exceeded the entry limit since 515 * the index was brought online. 516 * 517 * @return The number of index keys which have exceeded the entry limit since 518 * the index was brought online, or {@code null} if it was not 519 * included in the monitor entry. 520 */ 521 public Long getEntryLimitExceededCountSinceComingOnline() 522 { 523 return exceededCount; 524 } 525 526 527 528 /** 529 * Retrieves the number of unique index keys near (typically, within 80% of) 530 * the index entry limit that have been accessed by search operations since 531 * the index was brought online. 532 * 533 * @return The number of unique index keys near the index entry limit that 534 * have been accessed by search operations since the index was 535 * brought online, or {@code null} if it was not included in the 536 * entry. 537 */ 538 public Long getUniqueKeysNearEntryLimitAccessedBySearchSinceComingOnline() 539 { 540 return searchKeysNearLimit; 541 } 542 543 544 545 /** 546 * Retrieves the number of unique index keys over the index entry limit that 547 * have been accessed by search operations since the index was brought online. 548 * 549 * @return The number of unique index keys over the index entry limit that 550 * have been accessed by search operations since the index was 551 * brought online, or {@code null} if it was not included in the 552 * entry. 553 */ 554 public Long getUniqueKeysOverEntryLimitAccessedBySearchSinceComingOnline() 555 { 556 return searchKeysOverLimit; 557 } 558 559 560 561 /** 562 * Retrieves the number of unique index keys near (typically, within 80% of) 563 * the index entry limit that have been accessed by add, delete, modify, or 564 * modify DN operations since the index was brought online. 565 * 566 * @return The number of unique index keys near the index entry limit that 567 * have been accessed by write operations since the index was 568 * brought online, or {@code null} if it was not included in the 569 * entry. 570 */ 571 public Long getUniqueKeysNearEntryLimitAccessedByWriteSinceComingOnline() 572 { 573 return writeKeysNearLimit; 574 } 575 576 577 578 /** 579 * Retrieves the number of unique index keys over the index entry limit that 580 * have been accessed by add, delete, modify, or modify DN operations since 581 * the index was brought online. 582 * 583 * @return The number of unique index keys over the index entry limit that 584 * have been accessed by write operations since the index was 585 * brought online, or {@code null} if it was not included in the 586 * entry. 587 */ 588 public Long getUniqueKeysOverEntryLimitAccessedByWriteSinceComingOnline() 589 { 590 return writeKeysOverLimit; 591 } 592 593 594 595 /** 596 * Indicates whether the count of matching entries will be maintained for 597 * index keys that have exceeded the entry limit. In that case, the entry IDs 598 * for the matching entries will not be available, but the number of matching 599 * entries will be. 600 * 601 * @return {@code true} if the count of matching entries will be maintained 602 * for index keys that have exceeded the entry limit, {@code false} 603 * if not, or {@code null} if it was not included in the monitor 604 * entry. 605 */ 606 public Boolean maintainCountForExceededKeys() 607 { 608 return maintainCount; 609 } 610 611 612 613 /** 614 * Indicates whether this index was fully primed when it was brought online. 615 * 616 * @return {@code true} if the index was fully primed when it was brought 617 * online, {@code false} if not, or {@code null} if it was not 618 * included in the monitor entry. 619 */ 620 public Boolean fullyPrimedWhenBroughtOnline() 621 { 622 return fullyPrimed; 623 } 624 625 626 627 /** 628 * Retrieves information about the reason that the index was not fully primed 629 * when the backend was brought online (e.g., the database cache became full, 630 * the prime took too long to complete, or an exception was caught during 631 * processing). 632 * 633 * @return Information about the reason that the index was not fully primed 634 * when the backend was brought online, or {@code null} if it was not 635 * included in the monitor entry. 636 */ 637 public String getPrimeIncompleteReason() 638 { 639 return primeIncompleteReason; 640 } 641 642 643 644 /** 645 * Retrieves information about any exception caught during prime processing. 646 * 647 * @return Information about any exception caught during prime processing, or 648 * {@code null} if it was not included in the monitor entry. 649 */ 650 public String getPrimeException() 651 { 652 return primeException; 653 } 654 655 656 657 /** 658 * Retrieves the number of index keys that were primed when the index was 659 * brought online. 660 * 661 * @return The number of index keys that were primed when the backend was 662 * brought online, or {@code null} if it was not included in the 663 * monitor entry. 664 */ 665 public Long getKeysPrimedWhenBroughtOnline() 666 { 667 return primedKeys; 668 } 669 670 671 672 /** 673 * Retrieves the number of index keys that have been inserted or replaced 674 * since the index was brought online. 675 * 676 * @return The number of index keys that have been inserted or replaced since 677 * the index was brought online, or {@code null} if it was not 678 * included in the monitor entry. 679 */ 680 public Long getKeysWrittenSinceComingOnline() 681 { 682 return numWrites; 683 } 684 685 686 687 /** 688 * Retrieves the number of index keys that have been deleted since the index 689 * was brought online. 690 * 691 * @return The number of index keys that have been deleted since the index 692 * was brought online, or {@code null} if it was not included in the 693 * monitor entry. 694 */ 695 public Long getKeysDeletedSinceComingOnline() 696 { 697 return numDeletes; 698 } 699 700 701 702 /** 703 * Retrieves the number of index keys that have been read since the index was 704 * brought online. 705 * 706 * @return The number of index keys that have been read since the index was 707 * brought online, or {@code null} if it was not included in the 708 * monitor entry. 709 */ 710 public Long getKeysReadSinceComingOnline() 711 { 712 return numReads; 713 } 714 715 716 717 /** 718 * Retrieves the number of index reads that have been initiated because the 719 * associated attribute type was included in the filter for a search operation 720 * with a non-base scope since the index was brought online. 721 * 722 * @return The number of index reads that have been initiated as a result of 723 * filter processing, or {@code null} if it was not included in the 724 * monitor entry. 725 */ 726 public Long getFilterInitiatedReadsSinceComingOnline() 727 { 728 return numReadsForSearch; 729 } 730 731 732 733 /** 734 * Retrieves the number of cursors created in the index for reading ranges of 735 * keys. Cursors may be used for processing in a variety of contexts, 736 * including processing for substring or range searches, subtree deletes, 737 * stream values operations, etc. 738 * 739 * @return The number of cursors created in the index for reading ranges of 740 * keys, or {@code null} if it was not included in the monitor entry. 741 */ 742 public Long getCursorsCreatedSinceComingOnline() 743 { 744 return numCursors; 745 } 746 747 748 749 /** 750 * {@inheritDoc} 751 */ 752 @Override() 753 public String getMonitorDisplayName() 754 { 755 return INFO_INDEX_MONITOR_DISPNAME.get(); 756 } 757 758 759 760 /** 761 * {@inheritDoc} 762 */ 763 @Override() 764 public String getMonitorDescription() 765 { 766 return INFO_INDEX_MONITOR_DESC.get(); 767 } 768 769 770 771 /** 772 * {@inheritDoc} 773 */ 774 @Override() 775 public Map<String,MonitorAttribute> getMonitorAttributes() 776 { 777 final LinkedHashMap<String,MonitorAttribute> attrs = 778 new LinkedHashMap<String,MonitorAttribute>(19); 779 780 if (indexName != null) 781 { 782 addMonitorAttribute(attrs, 783 ATTR_INDEX_NAME, 784 INFO_INDEX_DISPNAME_INDEX_NAME.get(), 785 INFO_INDEX_DESC_INDEX_NAME.get(), 786 indexName); 787 } 788 789 if (backendID != null) 790 { 791 addMonitorAttribute(attrs, 792 ATTR_BACKEND_ID, 793 INFO_INDEX_DISPNAME_BACKEND_ID.get(), 794 INFO_INDEX_DESC_BACKEND_ID.get(), 795 backendID); 796 } 797 798 if (baseDN != null) 799 { 800 addMonitorAttribute(attrs, 801 ATTR_BASE_DN, 802 INFO_INDEX_DISPNAME_BASE_DN.get(), 803 INFO_INDEX_DESC_BASE_DN.get(), 804 baseDN); 805 } 806 807 if (attributeType != null) 808 { 809 addMonitorAttribute(attrs, 810 ATTR_INDEX_ATTR, 811 INFO_INDEX_DISPNAME_ATTR_TYPE.get(), 812 INFO_INDEX_DESC_ATTR_TYPE.get(), 813 attributeType); 814 } 815 816 if (indexType != null) 817 { 818 addMonitorAttribute(attrs, 819 ATTR_INDEX_TYPE, 820 INFO_INDEX_DISPNAME_INDEX_TYPE.get(), 821 INFO_INDEX_DESC_INDEX_TYPE.get(), 822 indexType); 823 } 824 825 if (indexFilter != null) 826 { 827 addMonitorAttribute(attrs, 828 ATTR_INDEX_FILTER, 829 INFO_INDEX_DISPNAME_FILTER.get(), 830 INFO_INDEX_DESC_FILTER.get(), 831 indexFilter); 832 } 833 834 if (indexTrusted != null) 835 { 836 addMonitorAttribute(attrs, 837 ATTR_INDEX_TRUSTED, 838 INFO_INDEX_DISPNAME_TRUSTED.get(), 839 INFO_INDEX_DESC_TRUSTED.get(), 840 indexTrusted); 841 } 842 843 if (entryLimit != null) 844 { 845 addMonitorAttribute(attrs, 846 ATTR_ENTRY_LIMIT, 847 INFO_INDEX_DISPNAME_ENTRY_LIMIT.get(), 848 INFO_INDEX_DESC_ENTRY_LIMIT.get(), 849 entryLimit); 850 } 851 852 if (exceededCount != null) 853 { 854 addMonitorAttribute(attrs, 855 ATTR_EXCEEDED_COUNT, 856 INFO_INDEX_DISPNAME_EXCEEDED_COUNT.get(), 857 INFO_INDEX_DESC_EXCEEDED_COUNT.get(), 858 exceededCount); 859 } 860 861 if (searchKeysNearLimit != null) 862 { 863 addMonitorAttribute(attrs, 864 ATTR_SEARCH_KEYS_NEAR_LIMIT, 865 INFO_INDEX_DISPNAME_SEARCH_KEYS_NEAR_LIMIT.get(), 866 INFO_INDEX_DESC_SEARCH_KEYS_NEAR_LIMIT.get(), 867 searchKeysNearLimit); 868 } 869 870 if (searchKeysOverLimit != null) 871 { 872 addMonitorAttribute(attrs, 873 ATTR_SEARCH_KEYS_OVER_LIMIT, 874 INFO_INDEX_DISPNAME_SEARCH_KEYS_OVER_LIMIT.get(), 875 INFO_INDEX_DESC_SEARCH_KEYS_OVER_LIMIT.get(), 876 searchKeysOverLimit); 877 } 878 879 if (writeKeysNearLimit != null) 880 { 881 addMonitorAttribute(attrs, 882 ATTR_WRITE_KEYS_NEAR_LIMIT, 883 INFO_INDEX_DISPNAME_WRITE_KEYS_NEAR_LIMIT.get(), 884 INFO_INDEX_DESC_WRITE_KEYS_NEAR_LIMIT.get(), 885 writeKeysNearLimit); 886 } 887 888 if (writeKeysOverLimit != null) 889 { 890 addMonitorAttribute(attrs, 891 ATTR_WRITE_KEYS_OVER_LIMIT, 892 INFO_INDEX_DISPNAME_WRITE_KEYS_OVER_LIMIT.get(), 893 INFO_INDEX_DESC_WRITE_KEYS_OVER_LIMIT.get(), 894 writeKeysOverLimit); 895 } 896 897 if (maintainCount != null) 898 { 899 addMonitorAttribute(attrs, 900 ATTR_MAINTAIN_COUNT, 901 INFO_INDEX_DISPNAME_MAINTAIN_COUNT.get(), 902 INFO_INDEX_DESC_MAINTAIN_COUNT.get(), 903 maintainCount); 904 } 905 906 if (fullyPrimed != null) 907 { 908 addMonitorAttribute(attrs, 909 ATTR_FULLY_PRIMED, 910 INFO_INDEX_DISPNAME_FULLY_PRIMED.get(), 911 INFO_INDEX_DESC_FULLY_PRIMED.get(), 912 fullyPrimed); 913 } 914 915 if (primeIncompleteReason != null) 916 { 917 addMonitorAttribute(attrs, 918 ATTR_PRIME_INCOMPLETE_REASON, 919 INFO_INDEX_DISPNAME_PRIME_INCOMPLETE_REASON.get(), 920 INFO_INDEX_DESC_PRIME_INCOMPLETE_REASON.get(), 921 primeIncompleteReason); 922 } 923 924 if (primeException != null) 925 { 926 addMonitorAttribute(attrs, 927 ATTR_PRIME_EXCEPTION, 928 INFO_INDEX_DISPNAME_PRIME_EXCEPTION.get(), 929 INFO_INDEX_DESC_PRIME_EXCEPTION.get(), 930 primeException); 931 } 932 933 if (primedKeys != null) 934 { 935 addMonitorAttribute(attrs, 936 ATTR_PRIMED_KEYS, 937 INFO_INDEX_DISPNAME_PRIMED_KEYS.get(), 938 INFO_INDEX_DESC_PRIMED_KEYS.get(), 939 primedKeys); 940 } 941 942 if (numWrites != null) 943 { 944 addMonitorAttribute(attrs, 945 ATTR_WRITE_COUNT, 946 INFO_INDEX_DISPNAME_WRITE_COUNT.get(), 947 INFO_INDEX_DESC_WRITE_COUNT.get(), 948 numWrites); 949 } 950 951 if (numDeletes != null) 952 { 953 addMonitorAttribute(attrs, 954 ATTR_DELETE_COUNT, 955 INFO_INDEX_DISPNAME_DELETE_COUNT.get(), 956 INFO_INDEX_DESC_DELETE_COUNT.get(), 957 numDeletes); 958 } 959 960 if (numReads != null) 961 { 962 addMonitorAttribute(attrs, 963 ATTR_READ_COUNT, 964 INFO_INDEX_DISPNAME_READ_COUNT.get(), 965 INFO_INDEX_DESC_READ_COUNT.get(), 966 numReads); 967 } 968 969 if (numReadsForSearch != null) 970 { 971 addMonitorAttribute(attrs, 972 ATTR_READ_FOR_SEARCH_COUNT, 973 INFO_INDEX_DISPNAME_FILTER_INITIATED_READ_COUNT.get(), 974 INFO_INDEX_DESC_FILTER_INITIATED_READ_COUNT.get(), 975 numReadsForSearch); 976 } 977 978 if (numCursors != null) 979 { 980 addMonitorAttribute(attrs, 981 ATTR_CURSOR_COUNT, 982 INFO_INDEX_DISPNAME_CURSOR_COUNT.get(), 983 INFO_INDEX_DESC_CURSOR_COUNT.get(), 984 numCursors); 985 } 986 987 return Collections.unmodifiableMap(attrs); 988 } 989}