/** * {@inheritDoc} */ @Override public int getTimeLimit() { return getDecorated().getTimeLimit(); }
/** * {@inheritDoc} */ @Override public int getTimeLimit() { return getDecorated().getTimeLimit(); }
/** * {@inheritDoc} */ @Override public int getTimeLimit() { return getDecorated().getTimeLimit(); }
/** * {@inheritDoc} */ @Override public int getTimeLimit() { return getDecorated().getTimeLimit(); }
/** * Create an instance of the container with the SearchRequest and its limit. * * @param searchRequest The SearchRequest instance * @param cursor The cursor to process */ public SearchRequestContainer( SearchRequest searchRequest, Cursor<Entry> cursor ) { this.searchRequest = searchRequest; this.cursor = cursor; this.sizeLimit = searchRequest.getSizeLimit(); this.timeLimit = searchRequest.getTimeLimit() * 1000L; // Time limit is in seconds. Translate that to milliseconds // Initialize the count and current time count = 0; initialTime = System.currentTimeMillis(); }
/** * {@inheritDoc} */ @Override public SearchCursor search( SearchRequest searchRequest ) throws LdapException { if ( searchRequest == null ) { String msg = I18n.err( I18n.ERR_04130_CANNOT_PROCESS_NULL_SEARCH_REQ ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } SearchFuture searchFuture = searchAsync( searchRequest ); long searchTimeout = getTimeout( timeout, searchRequest.getTimeLimit() ); return new SearchCursorImpl( searchFuture, searchTimeout, TimeUnit.MILLISECONDS ); }
/** * {@inheritDoc} */ @Override public SearchCursor search( SearchRequest searchRequest ) throws LdapException { if ( searchRequest == null ) { String msg = I18n.err( I18n.ERR_04130_CANNOT_PROCESS_NULL_SEARCH_REQ ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } SearchFuture searchFuture = searchAsync( searchRequest ); long searchTimeout = getTimeout( timeout, searchRequest.getTimeLimit() ); return new SearchCursorImpl( searchFuture, searchTimeout, TimeUnit.MILLISECONDS ); }
/** * {@inheritDoc} */ @Override public SearchCursor search( SearchRequest searchRequest ) throws LdapException { if ( searchRequest == null ) { String msg = I18n.err( I18n.ERR_04130_CANNOT_PROCESS_NULL_SEARCH_REQ ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } SearchFuture searchFuture = searchAsync( searchRequest ); long searchTimeout = getTimeout( timeout, searchRequest.getTimeLimit() ); return new SearchCursorImpl( searchFuture, searchTimeout, TimeUnit.MILLISECONDS ); }
if ( session.getCoreSession().isAnAdministrator() && req.getTimeLimit() == NO_TIME_LIMIT ) if ( ldapServer.getMaxTimeLimit() == NO_TIME_LIMIT && req.getTimeLimit() == NO_TIME_LIMIT ) if ( req.getTimeLimit() == 0 ) if ( ldapServer.getMaxTimeLimit() >= req.getTimeLimit() ) cursor.setClosureMonitor( new SearchTimeLimitingMonitor( req.getTimeLimit(), TimeUnit.SECONDS ) ); return;
if ( session.getCoreSession().isAnAdministrator() && req.getTimeLimit() == NO_TIME_LIMIT ) if ( ldapServer.getMaxTimeLimit() == NO_TIME_LIMIT && req.getTimeLimit() == NO_TIME_LIMIT ) if ( req.getTimeLimit() == 0 ) if ( ldapServer.getMaxTimeLimit() >= req.getTimeLimit() ) cursor.setClosureMonitor( new SearchTimeLimitingMonitor( req.getTimeLimit(), TimeUnit.SECONDS ) ); return;
hash = hash * 17 + getDecorated().getScope().hashCode(); hash = hash * 17 + Long.valueOf( getDecorated().getSizeLimit() ).hashCode(); hash = hash * 17 + getDecorated().getTimeLimit(); hash = hash * 17 + ( getDecorated().getTypesOnly() ? 0 : 1 );
if ( req.getTimeLimit() != timeLimit )
hash = hash * 17 + getDecorated().getScope().hashCode(); hash = hash * 17 + Long.valueOf( getDecorated().getSizeLimit() ).hashCode(); hash = hash * 17 + getDecorated().getTimeLimit(); hash = hash * 17 + ( getDecorated().getTypesOnly() ? 0 : 1 );
hash = hash * 17 + getDecorated().getScope().hashCode(); hash = hash * 17 + Long.valueOf( getDecorated().getSizeLimit() ).hashCode(); hash = hash * 17 + getDecorated().getTimeLimit(); hash = hash * 17 + ( getDecorated().getTypesOnly() ? 0 : 1 );
/** * Creates a new instance of SearchOperationContext. * * @param session The session to use * @param searchRequest The SearchRequest to process */ public SearchOperationContext( CoreSession session, SearchRequest searchRequest ) { super( session, searchRequest.getBase(), searchRequest.getAttributes().toArray( StringConstants.EMPTY_STRINGS ) ); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) ); } this.filter = searchRequest.getFilter(); this.abandoned = searchRequest.isAbandoned(); this.aliasDerefMode = searchRequest.getDerefAliases(); this.requestControls = searchRequest.getControls(); this.scope = searchRequest.getScope(); this.sizeLimit = searchRequest.getSizeLimit(); this.timeLimit = searchRequest.getTimeLimit(); this.typesOnly = searchRequest.getTypesOnly(); throwReferral = !requestControls.containsKey( ManageDsaIT.OID ); }
if ( req.getTimeLimit() != timeLimit )
if ( req.getTimeLimit() != timeLimit )
if ( request.getTimeLimit() != previousSearchRequest.getTimeLimit() )
if ( request.getTimeLimit() != 0 ) element.addAttribute( "timeLimit", Integer.toString( request.getTimeLimit() ) );