@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ContentSyncRequestControl extends Control
ContentSyncRequestMode.REFRESH_AND_PERSIST
mode is selected), may
return a large number of entries, and may also return intermediate response
messages. When using this control, it is important to keep the following in
mind:
SearchResultListener
so that entries
will be made available as soon as they are returned rather than having
to wait for the search to complete and/or consuming a large amount of
memory by storing the entries in a list that is only made available
when the search completes. It may be desirable to use an
AsyncSearchResultListener
to perform the
search as an asynchronous operation so that the search request thread
does not block while waiting for the search to complete.ContentSyncStateControl
with the associated entryUUID and
potentially a cookie with an updated sync session state. You should
call getControl(ContentSyncStateControl.SYNC_STATE_OID)
on the
search result entries and references in order to retrieve the control
with the sync state information.SearchRequest.setTimeLimitSeconds(0)
, and an
unlimited client-side timeout using
SearchRequest.setResponseTimeoutMillis(0L)
.SearchRequest.setIntermediateResponseListener
method.SearchResult
(or
LDAPSearchException
if the search ended
with a non-success response) may include a
ContentSyncDoneControl
with updated sync state information.
You should call
getResponseControl(ContentSyncDoneControl.SYNC_DONE_OID)
to
retrieve the control with the sync state information.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SYNC_REQUEST_OID
The OID (1.3.6.1.4.1.4203.1.9.1.1) for the sync request control.
|
Constructor and Description |
---|
ContentSyncRequestControl(boolean isCritical,
ContentSyncRequestMode mode,
ASN1OctetString cookie,
boolean reloadHint)
Creates a new content synchronization request control that may be used to
either retrieve the initial content or an incremental update.
|
ContentSyncRequestControl(ContentSyncRequestMode mode)
Creates a new content synchronization request control that will attempt to
retrieve the initial content for the synchronization using the provided
request mode.
|
ContentSyncRequestControl(ContentSyncRequestMode mode,
ASN1OctetString cookie,
boolean reloadHint)
Creates a new content synchronization request control that may be used to
either retrieve the initial content or an incremental update.
|
ContentSyncRequestControl(Control control)
Creates a new content synchronization request control which is decoded from
the provided generic control.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
ASN1OctetString |
getCookie()
Retrieves a cookie providing state information for an existing
synchronization session, if available.
|
ContentSyncRequestMode |
getMode()
Retrieves the mode for this content synchronization request control, which
indicates whether to retrieve an initial content or an incremental update.
|
boolean |
getReloadHint()
Retrieves the reload hint value for this synchronization request control.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toJSONControl, toString, writeTo
@NotNull public static final java.lang.String SYNC_REQUEST_OID
public ContentSyncRequestControl(@NotNull ContentSyncRequestMode mode)
mode
- The request mode which indicates whether to retrieve only
the initial content or to both retrieve the initial content
and be updated of changes made in the future. It must not
be null
.public ContentSyncRequestControl(@NotNull ContentSyncRequestMode mode, @Nullable ASN1OctetString cookie, boolean reloadHint)
mode
- The request mode which indicates whether to retrieve
only the initial content or to both retrieve the
initial content and be updated of changes made in the
future. It must not be null
.cookie
- A cookie providing state information for an existing
synchronization session. It may be null
to
perform an initial synchronization rather than an
incremental update.reloadHint
- Indicates whether the client wishes to retrieve an
initial content during an incremental update if the
server determines that the client cannot reach
convergence with the server data.public ContentSyncRequestControl(boolean isCritical, @NotNull ContentSyncRequestMode mode, @Nullable ASN1OctetString cookie, boolean reloadHint)
isCritical
- Indicates whether this control should be marked
critical.mode
- The request mode which indicates whether to retrieve
only the initial content or to both retrieve the
initial content and be updated of changes made in the
future. It must not be null
.cookie
- A cookie providing state information for an existing
synchronization session. It may be null
to
perform an initial synchronization rather than an
incremental update.reloadHint
- Indicates whether the client wishes to retrieve an
initial content during an incremental update if the
server determines that the client cannot reach
convergence with the server data.public ContentSyncRequestControl(@NotNull Control control) throws LDAPException
control
- The generic control to be decoded as a content
synchronization request control.LDAPException
- If the provided control cannot be decoded as a
content synchronization request control.@NotNull public ContentSyncRequestMode getMode()
@Nullable public ASN1OctetString getCookie()
null
if none is available and
an initial content should be retrieved.public boolean getReloadHint()
true
if the server should return an initial content rather
than an incremental update if it determines that the client cannot
reach convergence, or false
if it should return an
e-sync refresh required result in that case.@NotNull public java.lang.String getControlName()
getControlName
in class Control