Class MatchingEntryCountRequestControlProperties
java.lang.Object
com.unboundid.ldap.sdk.unboundidds.controls.MatchingEntryCountRequestControlProperties
- All Implemented Interfaces:
Serializable
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public final class MatchingEntryCountRequestControlProperties
extends Object
implements Serializable
This class provides a set of properties that can be used in conjunction with
the
MatchingEntryCountRequestControl.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new matching entry count request control properties object with the default settings.Creates a new matching entry count request control properties object with the settings used for the provided control.Creates a new matching entry count request control properties object that is a copy of the provided properties. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the server should always examine candidate entries in fully-indexed searches to determine whether they would actually be returned to the client in a normal search with the same criteria.Retrieves the short-circuit threshold that the server should use when determining whether to continue with index processing in an attempt to further pare down a candidate set that already has a defined superset of the entries that actually match the filter.intRetrieves the maximum number of candidate entries that should be examined in order to determine accurate count of the number of matching entries.Retrieves the short-circuit threshold that the server should use when determining whether to continue with index processing for evaluation that may be more expensive than what falls into the "fast" category (e.g., substring and range filter components).booleanIndicates whether the server should include debug information in the response control that provides additional information about how the server arrived at the result.booleanIndicates whether the server may include extended response data in the corresponding response control, which may provide information like whether all of the identified candidate entries are within the scope of the search and any unindexed or unevaluated portion of the search filter.booleanIndicates whether the server should internally retrieve and examine all entries within the search scope in order to obtain an exact matching entry count for an unindexed search.voidsetAlwaysExamineCandidates(boolean alwaysExamineCandidates) Specifies whether the server should always examine candidate entries in fully-indexed searches to determine whether they would actually be returned to the client in a normal search with the same criteria.voidsetFastShortCircuitThreshold(Long fastShortCircuitThreshold) Specifies the short-circuit threshold that the server should use when determining whether to continue with index processing in an attempt to further pare down a candidate set that already has a defined superset of entries that actually match the filter.voidsetIncludeDebugInfo(boolean includeDebugInfo) Specifies whether the server should include debug information in the response control that provides additional information about how the server arrived at the result.voidsetIncludeExtendedResponseData(boolean includeExtendedResponseData) Indicates whether the server may include extended response data in the corresponding response control, which may provide information like whether all of the identified candidate entries are within the scope of the search and any unindexed or unevaluated portion of the search filter.voidsetMaxCandidatesToExamine(int maxCandidatesToExamine) Specifies the maximum number of candidate entries that should be examined in order to determine accurate count of the number of matching entries.voidsetProcessSearchIfUnindexed(boolean processSearchIfUnindexed) Specifies whether the server should internally retrieve and examine all entries within the search scope in order to obtain an exact matching entry count for an unindexed search.voidsetSkipResolvingExplodedIndexes(boolean skipResolvingExplodedIndexes) Specifies whether the server should skip the effort of actually retrieving the candidate entry IDs for exploded index keys in which the number of matching entries is known.voidsetSlowShortCircuitThreshold(Long slowShortCircuitThreshold) Specifies the short-circuit threshold that the server should use when determining whether to continue with index processing for evaluation that may be more expensive than what falls into the "fast" category (e.g., substring and range filter components).booleanIndicates whether the server should skip the effort of actually retrieving the candidate entry IDs for exploded index keys in which the number of matching entries is known.toString()Retrieves a string representation of the matching entry count request control properties.voidtoString(StringBuilder buffer) Appends a string representation of the matching entry count request control properties to the provided buffer.
-
Constructor Details
-
MatchingEntryCountRequestControlProperties
Creates a new matching entry count request control properties object with the default settings. -
MatchingEntryCountRequestControlProperties
public MatchingEntryCountRequestControlProperties(@NotNull MatchingEntryCountRequestControlProperties properties) Creates a new matching entry count request control properties object that is a copy of the provided properties.- Parameters:
properties- The properties to use to create the new set of properties.
-
MatchingEntryCountRequestControlProperties
public MatchingEntryCountRequestControlProperties(@NotNull MatchingEntryCountRequestControl control) Creates a new matching entry count request control properties object with the settings used for the provided control.- Parameters:
control- The matching entry count request control to use to initialize this set of properties.
-
-
Method Details
-
getMaxCandidatesToExamine
Retrieves the maximum number of candidate entries that should be examined in order to determine accurate count of the number of matching entries.
For a fully-indexed search, this property will only be used ifalwaysExamineCandidatesis true. If the number of candidate entries identified is less than the maximum number of candidates to examine, then the server will return anEXAMINED_COUNTresult that indicates the number of entries matching the criteria that would actually be returned in a normal search with the same criteria. If the number of candidate entries exceeds the maximum number of candidates to examine, then the server will return anUNEXAMINED_COUNTresult that indicates the number of entries matching the search criteria but that may include entries that would not actually be returned to the client.
For a partially-indexed search, if the upper bound on the number of candidates is less than or equal to the maximum number of candidates to examine, then the server will internally retrieve and examine each of those candidates to determine which of them match the search criteria and would actually be returned to the client, and will then return anEXAMINED_COUNTresult with that count. If the upper bound on the number of candidates is greater than the maximum number of candidates to examine, then the server will return anUPPER_BOUNDresult to indicate that the exact count is not known but an upper bound is available.- Returns:
- The maximum number of candidate entries to examine in order to determine an accurate count of the number of matching entries.
-
setMaxCandidatesToExamine
Specifies the maximum number of candidate entries that should be examined in order to determine accurate count of the number of matching entries.
For a fully-indexed search, this property will only be used ifalwaysExamineCandidatesis true. If the number of candidate entries identified is less than the maximum number of candidates to examine, then the server will return anEXAMINED_COUNTresult that indicates the number of entries matching the criteria that would actually be returned in a normal search with the same criteria. If the number of candidate entries exceeds the maximum number of candidates to examine, then the server will return anUNEXAMINED_COUNTresult that indicates the number of entries matching the search criteria but that may include entries that would not actually be returned to the client.
For a partially-indexed search, if the upper bound on the number of candidates is less than or equal to the maximum number of candidates to examine, then the server will internally retrieve and examine each of those candidates to determine which of them match the search criteria and would actually be returned to the client, and will then return anEXAMINED_COUNTresult with that count. If the upper bound on the number of candidates is greater than the maximum number of candidates to examine, then the server will return anUPPER_BOUNDresult to indicate that the exact count is not known but an upper bound is available.- Parameters:
maxCandidatesToExamine- The maximum number of candidate entries that the server should retrieve and examine to determine whether they actually match the search criteria. If the search is partially indexed and the total number of candidate entries is less than or equal to this value, then these candidate entries will be examined to determine which of them match the search criteria so that an accurate count can be determined. If the search is fully indexed such that the all candidate entries are known to match the search criteria, then the server may still examine each of these entries if the number of candidates is less thanmaxCandidatesToExamineandalwaysExamineCandidatesistruein order to allow the entry count that is returned to be restricted to only those entries that would actually be returned to the client. This will be ignored for searches that are completely unindexed.
The value for this argument must be greater than or equal to zero. If it is zero, then the server will not examine any entries, so a partially-indexed search will only be able to return a count that is an upper bound, and a fully-indexed search will only be able to return an unexamined exact count. If there should be no bound on the number of entries to retrieve, then a value ofInteger.MAX_VALUEmay be specified.
-
alwaysExamineCandidates
Indicates whether the server should always examine candidate entries in fully-indexed searches to determine whether they would actually be returned to the client in a normal search with the same criteria.- Returns:
trueif the server should attempt to internally retrieve and examine matching entries to determine whether they would normally be returned to the client (e.g., that the client has permission to access the entry and that it is not a normally-hidden entry like an LDAP subentry, a replication conflict entry, or a soft-deleted entry), orfalseif the server should return an unverified count.
-
setAlwaysExamineCandidates
Specifies whether the server should always examine candidate entries in fully-indexed searches to determine whether they would actually be returned to the client in a normal search with the same criteria.- Parameters:
alwaysExamineCandidates- Indicates whether the server should always examine candidate entries to determine whether they would actually be returned to the client in a normal search. This will only be used for fully-indexed searches in which the set of matching entries is known. If the value istrueand the number of candidates is smaller thanmaxCandidatesToExamine, then each matching entry will be internally retrieved and examined to determine whether it would be returned to the client based on the details of the search request (e.g., whether the requester has permission to access the entry, whether it's an LDAP subentry, replication conflict entry, soft-deleted entry, or other type of entry that is normally hidden, etc.) so that an exact count can be returned. If this isfalseor the number of candidates exceedsmaxCandidatesToExamine, then the server will only be able to return an unexamined count which may include entries that match the search criteria but that would not normally be returned to the requester.
-
processSearchIfUnindexed
Indicates whether the server should internally retrieve and examine all entries within the search scope in order to obtain an exact matching entry count for an unindexed search. Note that this value will not be considered for completely-indexed or partially-indexed searches, nor for searches in which matching entries should be returned.- Returns:
trueif the server should internally retrieve and examine all entries within the search scope in order to obtain an exact matching entry count for an unindexed search, orfalseif not.
-
setProcessSearchIfUnindexed
Specifies whether the server should internally retrieve and examine all entries within the search scope in order to obtain an exact matching entry count for an unindexed search. Note that this value will not be considered for completely-indexed or partially-indexed searches, nor for searches in which matching entries should be returned.- Parameters:
processSearchIfUnindexed- Indicates whether the server should attempt to determine the number of matching entries if the search criteria is completely unindexed. If this istrueand the requester has the unindexed-search privilege, then the server will iterate through all entries in the scope (which may take a very long time to complete) in order to to determine which of them match the search criteria so that it can return an accurate count. If this isfalseor the requester does not have the unindexed-search privilege, then the server will not spend any time attempting to determine the number of matching entries and will instead return a matching entry count response control indicating that the entry count is unknown.
-
skipResolvingExplodedIndexes
Indicates whether the server should skip the effort of actually retrieving the candidate entry IDs for exploded index keys in which the number of matching entries is known. Skipping the process of accessing an exploded index can allow the server to more quickly arrive at the matching entry count estimate, but that estimate may be less accurate than if it had actually retrieved those candidates.- Returns:
trueif the server should skip the effort of actually retrieving the candidate entry IDs for exploded index keys in which the number of matching entries is known, orfalseif it may retrieve candidates from an exploded index in the course of determining the matching entry count.
-
setSkipResolvingExplodedIndexes
Specifies whether the server should skip the effort of actually retrieving the candidate entry IDs for exploded index keys in which the number of matching entries is known. Skipping the process of accessing an exploded index can allow the server to more quickly arrive at the matching entry count estimate, but that estimate may be less accurate than if it had actually retrieved those candidates.- Parameters:
skipResolvingExplodedIndexes- Indicates whether the server should skip the effort of actually retrieving the candidate entry IDs for exploded index keys in which the number of matching entries is known.
-
getFastShortCircuitThreshold
Retrieves the short-circuit threshold that the server should use when determining whether to continue with index processing in an attempt to further pare down a candidate set that already has a defined superset of the entries that actually match the filter. If the number of entries in that candidate set is less than or equal to the short-circuit threshold, then the server may simply use that candidate set in the course of determining the matching entry count, even if there may be additional processing that can be performed (e.g., further filter components to evaluate) that may allow the server to pare down the results even further. Short-circuiting may allow the server to obtain the matching entry count estimate faster, but may also cause the resulting estimate to be less accurate.
The value returned by this method will be used for cases in which the server is performing the fastest types of index processing. For example, this may include evaluating presence, equality, or approximate match components, which should only require retrieving a single index key to obtain the candidate set.- Returns:
- The short-circuit threshold that should be used for fast index
processing, zero if the server should not short-circuit at all
during fast index processing, or
nullif the server should determine the appropriate fast short-circuit threshold to use.
-
setFastShortCircuitThreshold
Specifies the short-circuit threshold that the server should use when determining whether to continue with index processing in an attempt to further pare down a candidate set that already has a defined superset of entries that actually match the filter. Short-circuiting may allow the server to skip potentially-costly index processing and allow it to obtain the matching entry count estimate faster, but the resulting estimate may be less accurate. The fast short-circuit threshold will be used for index processing that is expected to be very fast (e.g., when performing index lookups for presence, equality, and approximate-match components, which should only require accessing a single index key).- Parameters:
fastShortCircuitThreshold- The short-circuit threshold that the server should use when determining whether to continue with index processing in an attempt to further pare down a candidate set that already has a defined superset of the entries that actually match the filter. A value that is less than or equal to zero indicates that the server should never short circuit when performing fast index processing. A value ofnullindicates that the server should determine the appropriate fast short-circuit threshold to use.
-
getSlowShortCircuitThreshold
Retrieves the short-circuit threshold that the server should use when determining whether to continue with index processing for evaluation that may be more expensive than what falls into the "fast" category (e.g., substring and range filter components).- Returns:
- The short-circuit threshold that the server should use when
determining whether to continue with index processing for
evaluation that may be more expensive than what falls into the
"fast" category, zero if the server should never short circuit
when performing slow index processing, or
nullif the server should determine the appropriate slow short-circuit threshold to use.
-
setSlowShortCircuitThreshold
Specifies the short-circuit threshold that the server should use when determining whether to continue with index processing for evaluation that may be more expensive than what falls into the "fast" category (e.g., substring and range filter components).- Parameters:
slowShortCircuitThreshold- The short-circuit threshold that the server should use when determining whether to continue with index processing for evaluation that may be more expensive than what falls into the "fast" category. A value that is less than or equal to zero indicates that the server should never short circuit when performing slow index processing. A value ofnullindicates that the server should determine the appropriate slow short-circuit threshold to use.
-
includeExtendedResponseData
Indicates whether the server may include extended response data in the corresponding response control, which may provide information like whether all of the identified candidate entries are within the scope of the search and any unindexed or unevaluated portion of the search filter.- Returns:
trueif the server may include extended response data in the corresponding response control, orfalseif not.
-
setIncludeExtendedResponseData
Indicates whether the server may include extended response data in the corresponding response control, which may provide information like whether all of the identified candidate entries are within the scope of the search and any unindexed or unevaluated portion of the search filter.
Note that before setting this totrue, the client should first verify that the server supports this functionality by checking to see ifRootDSE.supportsFeature(java.lang.String)returnstrueforMatchingEntryCountRequestControl.EXTENDED_RESPONSE_DATA_FEATURE_OID. Setting this value totruefor servers that do not support this feature may cause the server to reject the request.- Parameters:
includeExtendedResponseData- Indicates whether the server may include extended response data in the corresponding response control.
-
includeDebugInfo
Indicates whether the server should include debug information in the response control that provides additional information about how the server arrived at the result. If debug information is to be provided, it will be in a human-readable rather than machine-parsable form.- Returns:
trueif the server should include debug information in the response control, orfalseif not.
-
setIncludeDebugInfo
Specifies whether the server should include debug information in the response control that provides additional information about how the server arrived at the result.- Parameters:
includeDebugInfo- Indicates whether the server should include debug information in the response control that provides additional information about how the server arrived at the result.
-
toString
Retrieves a string representation of the matching entry count request control properties. -
toString
Appends a string representation of the matching entry count request control properties to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended. It must not benull.
-