Examples of AvlPartition


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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ((Partition)store).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( false );
View Full Code Here

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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ((Partition)store).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( false );
View Full Code Here

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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ((Partition)store).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( true );
View Full Code Here

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

    @Before
    public void createStore() throws Exception
    {
        // initialize the partition
        partition = new AvlPartition( schemaManager );
        partition.setId( "example" );
        partition.setSyncOnWrite( false );

        partition.addIndex( new AvlIndex( SchemaConstants.OU_AT_OID ) );
        partition.addIndex( new AvlIndex( SchemaConstants.UID_AT_OID ) );
View Full Code Here

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


    @Test
    public void testSimplePropertiesUnlocked() throws Exception
    {
        AvlPartition avlPartition = new AvlPartition( schemaManager );
        avlPartition.setSyncOnWrite( true ); // for code coverage

        assertNull( avlPartition.getAliasIndex() );
        avlPartition.addIndex( new AvlIndex<String, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) );
        assertNotNull( avlPartition.getAliasIndex() );

        assertEquals( 0, avlPartition.getCacheSize() );

        assertNull( avlPartition.getPresenceIndex() );
        avlPartition.addIndex( new AvlIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID ) );
        assertNotNull( avlPartition.getPresenceIndex() );

        assertNull( avlPartition.getId() );
        avlPartition.setId( "foo" );
        assertEquals( "foo", avlPartition.getId() );

        assertNull( avlPartition.getRdnIndex() );
        avlPartition.addIndex( new AvlRdnIndex( ApacheSchemaConstants.APACHE_RDN_AT_OID ) );
        assertNotNull( avlPartition.getRdnIndex() );

        assertNull( avlPartition.getOneAliasIndex() );
        avlPartition.addIndex( new AvlIndex<Long, Entry>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) );
        assertNotNull( avlPartition.getOneAliasIndex() );

        assertNull( avlPartition.getSubAliasIndex() );
        avlPartition.addIndex( new AvlIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID ) );
        assertNotNull( avlPartition.getSubAliasIndex() );

        assertNull( avlPartition.getSuffixDn() );
        avlPartition.setSuffixDn( EXAMPLE_COM );
        assertEquals( "dc=example,dc=com", avlPartition.getSuffixDn().getName() );

        assertNotNull( avlPartition.getSuffixDn() );

        assertFalse( avlPartition.getUserIndices().hasNext() );
        avlPartition.addIndex( new AvlIndex<Object, Entry>( "2.5.4.3" ) );
        assertTrue( avlPartition.getUserIndices().hasNext() );

        assertNull( avlPartition.getPartitionPath() );
        avlPartition.setPartitionPath( new File( "." ).toURI() );
        assertNull( avlPartition.getPartitionPath() );

        assertFalse( avlPartition.isInitialized() );
        assertFalse( avlPartition.isSyncOnWrite() );
        avlPartition.setSyncOnWrite( false );
        assertFalse( avlPartition.isSyncOnWrite() );

        avlPartition.sync();
        avlPartition.destroy();
    }
View Full Code Here

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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ( ( Partition ) store ).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( false );
View Full Code Here

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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ( ( Partition ) store ).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( false );
View Full Code Here

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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ( ( Partition ) store ).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( false );
View Full Code Here

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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ( ( Partition ) store ).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( false );
View Full Code Here

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

        wkdir.delete();
        wkdir = new File( wkdir.getParentFile(), getClass().getSimpleName() );
        wkdir.mkdirs();

        // initialize the store
        store = new AvlPartition( schemaManager );
        ( ( Partition ) store ).setId( "example" );
        store.setCacheSize( 10 );
        store.setPartitionPath( wkdir.toURI() );
        store.setSyncOnWrite( false );
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.