Examples of ListOperationContext


Examples of org.apache.directory.server.core.api.interceptor.context.ListOperationContext

     * Used to encapsulate [de]marshalling of controls before and after list operations.
     */
    protected EntryFilteringCursor doListOperation( Dn target ) throws Exception
    {
        // setup the op context and populate with request controls
        ListOperationContext listContext = new ListOperationContext( session, target );
        listContext.addRequestControls( convertControls( true, requestControls ) );

        // execute list operation
        OperationManager operationManager = service.getOperationManager();
        EntryFilteringCursor results = operationManager.list( listContext );

        // clear the request controls and set the response controls
        requestControls = EMPTY_CONTROLS;
        responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(),
            listContext.getResponseControls() );

        return results;
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.interceptor.context.ListOperationContext

    public EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
        Set<AttributeTypeOptions> returningAttributes ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();

        ListOperationContext listContext = new ListOperationContext( this, dn, returningAttributes );
        listContext.setAliasDerefMode( aliasDerefMode );

        return operationManager.list( listContext );
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.interceptor.context.ListOperationContext

    public EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();

        ListOperationContext listContext = new ListOperationContext( this, dn, returningAttributes );
        listContext.setSizeLimit( sizeLimit );
        listContext.setTimeLimit( timeLimit );
        listContext.setAliasDerefMode( aliasDerefMode );

        return operationManager.list( listContext );
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.interceptor.context.ListOperationContext

     * A List performance test
     */
    @Test
    public void testPerfList() throws Exception
    {
        ListOperationContext listContext = new ListOperationContext( getService().getAdminSession(), new Dn( "ou=system" ) );
        EntryFilteringCursor cursor = getService().getOperationManager().list( listContext );

        assertNotNull( cursor );
        int nb = 0;
       
        while ( cursor.next() )
        {
            Entry entry = cursor.get();
            nb++;
           
            assertNotNull( entry );
        }
       
        cursor.close();
       
        assertEquals( 5, nb );
       
        int nbIterations = 150000;

        long t0 = System.currentTimeMillis();
        long t00 = 0L;
        long tt0 = System.currentTimeMillis();
       
        for ( int i = 0; i < nbIterations; i++ )
        {
            listContext.setCurrentInterceptor( 0 );
           
            if ( i % 1000 == 0 )
            {
                long tt1 = System.currentTimeMillis();

View Full Code Here

Examples of org.apache.directory.server.core.api.interceptor.context.ListOperationContext

    public EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
        Set<AttributeTypeOptions> returningAttributes ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();

        ListOperationContext listContext = new ListOperationContext( this, dn, returningAttributes );
        listContext.setAliasDerefMode( aliasDerefMode );

        return operationManager.list( listContext );
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.interceptor.context.ListOperationContext

    public EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();

        ListOperationContext listContext = new ListOperationContext( this, dn, returningAttributes );
        listContext.setSizeLimit( sizeLimit );
        listContext.setTimeLimit( timeLimit );
        listContext.setAliasDerefMode( aliasDerefMode );

        return operationManager.list( listContext );
    }
View Full Code Here

Examples of org.apache.directory.server.core.interceptor.context.ListOperationContext

     * Used to encapsulate [de]marshalling of controls before and after list operations.
     */
    protected EntryFilteringCursor doListOperation( DN target ) throws Exception
    {
        // setup the op context and populate with request controls
        ListOperationContext opCtx = new ListOperationContext( session, target );
        opCtx.addRequestControls( JndiUtils.fromJndiControls( requestControls ) );

        // execute list operation
        OperationManager operationManager = service.getOperationManager();
        EntryFilteringCursor results = operationManager.list( opCtx );

        // clear the request controls and set the response controls
        requestControls = EMPTY_CONTROLS;
        responseControls = JndiUtils.toJndiControls( opCtx.getResponseControls() );

        return results;
    }
View Full Code Here

Examples of org.apache.directory.server.core.interceptor.context.ListOperationContext

                return attributeTypeList;
            }

            LOG.debug( "{} schema: loading attributeTypes", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            // Loop on all the AttributeTypes and add them to the list
            while ( list.next() )
            {
                ServerEntry result = list.get();
View Full Code Here

Examples of org.apache.directory.server.core.interceptor.context.ListOperationContext

                return comparatorList;
            }

            LOG.debug( "{} schema: loading comparators", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ClonedServerEntry entry = list.get();
View Full Code Here

Examples of org.apache.directory.server.core.interceptor.context.ListOperationContext

                return matchingRuleList;
            }

            LOG.debug( "{} schema: loading matchingRules", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ServerEntry entry = list.get();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.