*
* @throws Exception in case of any problems encountered while searching
*/
private ReplicationStatusEnum doSyncSearch( SynchronizationModeEnum syncType, boolean reloadHint ) throws Exception
{
SyncRequestValue syncReq = new SyncRequestValueDecorator( ldapCodecService );
syncReq.setMode( syncType );
syncReq.setReloadHint( reloadHint );
if ( syncCookie != null )
{
LOG.debug( "searching with searchRequest, cookie '{}'", Strings.utf8ToString( syncCookie ) );
syncReq.setCookie( syncCookie );
}
searchRequest.addControl( syncReq );
// Do the search