@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class MatchingEntryCountResponseControl extends Control implements DecodeableControl
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.
MatchingEntryCountResponse ::= SEQUENCE { entryCount CHOICE { examinedCount [0] INTEGER, unexaminedCount [1] INTEGER, upperBound [2] INTEGER, unknown [3] NULL, ... } debugInfo [0] SEQUENCE OF OCTET STRING OPTIONAL, searchIndexed [1] BOOLEAN DEFAULT TRUE, ... }
MatchingEntryCountRequestControl
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
MATCHING_ENTRY_COUNT_RESPONSE_OID
The OID (1.3.6.1.4.1.30221.2.5.37) for the matching entry count response
control.
|
Constructor and Description |
---|
MatchingEntryCountResponseControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new matching entry count response control decoded from the given
generic control contents.
|
Modifier and Type | Method and Description |
---|---|
static MatchingEntryCountResponseControl |
createExactCountResponse(int count,
boolean examined,
boolean searchIndexed,
java.util.Collection<java.lang.String> debugInfo)
Creates a new matching entry count response control for the case in which
the exact number of matching entries is known.
|
static MatchingEntryCountResponseControl |
createExactCountResponse(int count,
boolean examined,
java.util.Collection<java.lang.String> debugInfo)
Creates a new matching entry count response control for the case in which
the exact number of matching entries is known.
|
static MatchingEntryCountResponseControl |
createUnknownCountResponse(java.util.Collection<java.lang.String> debugInfo)
Creates a new matching entry count response control for the case in which
the server was unable to make any meaningful determination about the number
of entries matching the search criteria.
|
static MatchingEntryCountResponseControl |
createUpperBoundResponse(int upperBound,
boolean searchIndexed,
java.util.Collection<java.lang.String> debugInfo)
Creates a new matching entry count response control for the case in which
the exact number of matching entries is not known, but the server was able
to determine an upper bound on the number of matching entries.
|
static MatchingEntryCountResponseControl |
createUpperBoundResponse(int upperBound,
java.util.Collection<java.lang.String> debugInfo)
Creates a new matching entry count response control for the case in which
the exact number of matching entries is not known, but the server was able
to determine an upper bound on the number of matching entries.
|
MatchingEntryCountResponseControl |
decodeControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new instance of this decodeable control from the provided
information.
|
static MatchingEntryCountResponseControl |
get(SearchResult result)
Extracts a matching entry count response control from the provided search
result.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
MatchingEntryCountType |
getCountType()
Retrieves the matching entry count type for the response control.
|
int |
getCountValue()
Retrieves the matching entry count value for the response control.
|
java.util.List<java.lang.String> |
getDebugInfo()
Retrieves a list of messages with debug information about the processing
performed by the server in the course of obtaining the matching entry
count.
|
boolean |
searchIndexed()
Indicates whether the server considers the search criteria to be indexed
and therefore it could be processed more efficiently than examining all
entries with a full database scan.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, toString, writeTo
public static final java.lang.String MATCHING_ENTRY_COUNT_RESPONSE_OID
public MatchingEntryCountResponseControl(java.lang.String oid, boolean isCritical, ASN1OctetString value) throws LDAPException
oid
- The OID for the control.isCritical
- Indicates whether this control should be marked
critical.value
- The encoded value for the control.LDAPException
- If a problem occurs while attempting to decode the
generic control as a matching entry count response
control.public static MatchingEntryCountResponseControl createExactCountResponse(int count, boolean examined, java.util.Collection<java.lang.String> debugInfo)
count
- The exact number of entries matching the associated
search criteria. It must be greater than or equal to
zero.examined
- Indicates whether the server examined the entries to
exclude those entries that would not be returned to the
client in a normal search with the same criteria.debugInfo
- An optional list of messages providing debug information
about the processing performed by the server. It may be
null
or empty if no debug messages should be
included.public static MatchingEntryCountResponseControl createExactCountResponse(int count, boolean examined, boolean searchIndexed, java.util.Collection<java.lang.String> debugInfo)
count
- The exact number of entries matching the associated
search criteria. It must be greater than or equal
to zero.examined
- Indicates whether the server examined the entries to
exclude those entries that would not be returned to
the client in a normal search with the same
criteria.searchIndexed
- Indicates whether the search criteria is considered
at least partially indexed and could be processed
more efficiently than examining all entries with a
full database scan.debugInfo
- An optional list of messages providing debug
information about the processing performed by the
server. It may be null
or empty if no debug
messages should be included.public static MatchingEntryCountResponseControl createUpperBoundResponse(int upperBound, java.util.Collection<java.lang.String> debugInfo)
upperBound
- The upper bound on the number of entries that match the
associated search criteria. It must be greater than
zero.debugInfo
- An optional list of messages providing debug
information about the processing performed by the
server. It may be null
or empty if no debug
messages should be included.public static MatchingEntryCountResponseControl createUpperBoundResponse(int upperBound, boolean searchIndexed, java.util.Collection<java.lang.String> debugInfo)
upperBound
- The upper bound on the number of entries that match
the associated search criteria. It must be greater
than zero.searchIndexed
- Indicates whether the search criteria is considered
at least partially indexed and could be processed
more efficiently than examining all entries with a
full database scan.debugInfo
- An optional list of messages providing debug
information about the processing performed by the
server. It may be null
or empty if no debug
messages should be included.public static MatchingEntryCountResponseControl createUnknownCountResponse(java.util.Collection<java.lang.String> debugInfo)
debugInfo
- An optional list of messages providing debug information
about the processing performed by the server. It may be
null
or empty if no debug messages should be
included.public MatchingEntryCountType getCountType()
public int getCountValue()
EXAMINED_COUNT
or UNEXAMINED_COUNT
, this is
the exact number of matching entries. For a count type of
UPPER_BOUND
, this is the maximum number of entries that may match
the search criteria, but it may also include entries that do not match the
criteria. For a count type of UNKNOWN
, this will always be -1.public boolean searchIndexed()
true
if the server considers the search criteria to be
indexed, or false
if not.public java.util.List<java.lang.String> getDebugInfo()
public MatchingEntryCountResponseControl decodeControl(java.lang.String oid, boolean isCritical, ASN1OctetString value) throws LDAPException
decodeControl
in interface DecodeableControl
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided information cannot be decoded as a
valid instance of this decodeable control.public static MatchingEntryCountResponseControl get(SearchResult result) throws LDAPException
result
- The search result from which to retrieve the matching entry
count response control.null
if the result did not contain a
matching entry count response control.LDAPException
- If a problem is encountered while attempting to
decode the matching entry count response control
contained in the provided result.public java.lang.String getControlName()
getControlName
in class Control