Package org.apache.directory.server.core.partition.impl.avl

Examples of org.apache.directory.server.core.partition.impl.avl.AvlPartition


        if ( !( partition instanceof AvlPartition ) )
        {
            throw new IllegalArgumentException( "Partition must be a AvlPartition" );
        }

        AvlPartition avlPartition = ( AvlPartition ) partition;
        Set<Index<?, Entry, Long>> indexedAttributes = avlPartition.getIndexedAttributes();

        AvlIndex<Object, Entry> index = new AvlIndex<Object, Entry>( attributeId );
        //index.setCacheSize( cacheSize );

        indexedAttributes.add( index );
        avlPartition.setIndexedAttributes( indexedAttributes );
    }
View Full Code Here


    @Before
    public void createStore() throws Exception
    {

        // initialize the partition
        partition = new AvlPartition( schemaManager );
        partition.setId( "example" );
        partition.setSyncOnWrite( false );

        partition.addIndex( new AvlIndex<String, Entry>( SchemaConstants.OU_AT_OID ) );
        partition.addIndex( new AvlIndex<String, Entry>( SchemaConstants.UID_AT_OID ) );
View Full Code Here

            service.setShutdownHookEnabled(true);

            final InstanceLayout il = new InstanceLayout(getWorkingDirectory());
            service.setInstanceLayout(il);

            final AvlPartition partition = new AvlPartition(
                    service.getSchemaManager());
            partition.setId("ApacheDS");
            partition.setSuffixDn(new Dn(service.getSchemaManager(),
                    getRoot()));
            partition.initialize();
            service.addPartition(partition);

            server = new LdapServer();
            server.setTransports(new TcpTransport("localhost", getServerPort()));
            server.setDirectoryService(service);
View Full Code Here

     * {@inheritDoc}
     */
    protected void doInit() throws InvalidNameException, Exception
    {
        // Initializing the wrapped partition
        setWrappedPartition( new AvlPartition() );
        setId( "config" );
        setSuffix( new Dn( "ou=config" ) );
        wrappedPartition.setSchemaManager( schemaManager );
        wrappedPartition.initialize();

View Full Code Here

     */
    public AvlPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize,
        File workingDirectory )
        throws Exception
    {
        AvlPartition partition = new AvlPartition( schemaManager );
        partition.setId( id );
        partition.setSuffixDn( new Dn( suffix ) );
        partition.setCacheSize( 500 );
        partition.setPartitionPath( workingDirectory.toURI() );

        return partition;
    }
View Full Code Here

        if ( !( partition instanceof AvlPartition ) )
        {
            throw new IllegalArgumentException( "Partition must be a AvlPartition" );
        }

        AvlPartition avlPartition = ( AvlPartition ) partition;
        Set<Index<?, Entry, Long>> indexedAttributes = avlPartition.getIndexedAttributes();

        AvlIndex<Object, Entry> index = new AvlIndex<Object, Entry>( attributeId );
        //index.setCacheSize( cacheSize );

        indexedAttributes.add( index );
        avlPartition.setIndexedAttributes( indexedAttributes );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.partition.impl.avl.AvlPartition

Copyright © 2018 www.massapicom. 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.