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

Examples of org.apache.directory.server.core.partition.Partition


    {
        /** A structure to hold all the partitions */
        DnBranchNode<Partition> partitionLookupTree = new DnBranchNode<Partition>();
       
        DN suffix1 = new DN( "dc=com" );
        Partition partition1 = new JdbmPartition();
        partition1.setSuffix( suffix1.getName() );
       
        partitionLookupTree.add( suffix1, partition1 );
       
        DN suffix2 = new DN( "dc=example, dc=com" );
        Partition partition2 = new JdbmPartition();
        partition2.setSuffix( suffix2.getName() );
       
        try
        {
            partitionLookupTree.add( suffix2, partition2 );
            fail();
View Full Code Here


    {
        /** A structure to hold all the partitions */
        DnBranchNode<Partition> partitionLookupTree = new DnBranchNode<Partition>();
       
        DN suffix1 = new DN( "dc=example1, dc=com" );
        Partition partition1 = new JdbmPartition();
        partition1.setSuffix( suffix1.getName() );
       
        partitionLookupTree.add( suffix1, partition1 );
       
        DN suffix2 = new DN( "dc=example2, dc=com" );
        Partition partition2 = new JdbmPartition();
        partition2.setSuffix( suffix2.getName() );
       
        partitionLookupTree.add( suffix2, partition2 );

        assertNotNull( partitionLookupTree );
       
View Full Code Here

                    LOG.info( "setting the schema manager for partition {}", p.getSuffix() );
                    p.setSchemaManager( schemaManager );
                }
            }
           
            Partition sysPartition = directoryService.getSystemPartition();
           
            if( sysPartition instanceof BTreePartition )
            {
                ( ( BTreePartition ) sysPartition ).setPartitionDir( new File( directoryService.getWorkingDirectory(), sysPartition.getId() ) );
            }

            if( sysPartition.getSchemaManager() == null )
            {
                LOG.info( "setting the schema manager for partition {}", sysPartition.getSuffix() );
                sysPartition.setSchemaManager( schemaManager );
            }
           
            // Start the directory service if not started yet
            LOG.debug( "1. Starting the DirectoryService" );
            directoryService.startup();
View Full Code Here

        // first load the schema
        initSchemaPartition(servletContext);

        // then the system partition
        // this is a MANDATORY partition
        final Partition systemPartition = addPartition("system", ServerDNConstants.SYSTEM_DN);
        service.setSystemPartition(systemPartition);

        // Disable the ChangeLog system
        service.getChangeLog().setEnabled(false);
        service.setDenormalizeOpAttrsEnabled(true);

        // Now we can create as many partitions as we need
        final Partition ispPartition = addPartition("isp", "o=isp");
        addIndex(ispPartition, "objectClass", "ou", "uid");

        // And start the service
        service.startup();
View Full Code Here

        int launchedWindowCount = 0;
           
        for ( String suffix:suffixes )
        {
            DN dn = new DN( suffix );
            Partition partition = nexus.getPartition( dn );
           
            if ( partition instanceof BTreePartition )
            {
                try
                {
View Full Code Here

            {
                TaggableSearchableChangeLogStore tmp = ( TaggableSearchableChangeLogStore ) store;
               
                tmp.createPartition( partitionSuffix, revContainerName, tagContainerName );
               
                Partition partition = tmp.getPartition();
                partition.initialize( );

                service.addPartition( partition );
            }
        }
       
View Full Code Here

                    LOG.info( "setting the schema manager for partition {}", p.getSuffix() );
                    p.setSchemaManager( schemaManager );
                }
            }
           
            Partition sysPartition = directoryService.getSystemPartition();
           
            if( sysPartition instanceof BTreePartition )
            {
                File partitionPath = new File( directoryService.getInstanceLayout().getPartitionsDirectory(), sysPartition.getId() );
                ( ( BTreePartition ) sysPartition ).setPartitionPath( partitionPath.toURI() );
            }

            if( sysPartition.getSchemaManager() == null )
            {
                LOG.info( "setting the schema manager for partition {}", sysPartition.getSuffix() );
                sysPartition.setSchemaManager( schemaManager );
            }
           
            // Start the directory service if not started yet
            LOG.debug( "1. Starting the DirectoryService" );
            directoryService.startup();
View Full Code Here

        }

        nisEntry = connection.lookup( "cn=nis,ou=schema" );
        isNisDisabled = nisEntry.contains( "m-disabled", "TRUE" );

        Partition systemPartition = getService().getSystemPartition();
        DefaultDirectoryServiceFactory.DEFAULT.getPartitionFactory().addIndex( systemPartition, "gidNumber", 100 );
       
        // Restart the service so that the index is created
        getService().shutdown();
        getService().startup();
View Full Code Here

    {
        /** A structure to hold all the partitions */
        DnNode<Partition> partitionLookupTree = new DnNode<Partition>();

        Dn suffix = new Dn( "dc=example, dc=com" );
        Partition partition = new JdbmPartition();
        partition.setSuffix( suffix );

        partitionLookupTree.add( suffix, partition );

        assertNotNull( partitionLookupTree );
        assertTrue( partitionLookupTree.hasChildren() );
View Full Code Here

    {
        /** A structure to hold all the partitions */
        DnNode<Partition> partitionLookupTree = new DnNode<Partition>();

        Dn suffix1 = new Dn( "dc=example, dc=com" );
        Partition partition1 = new JdbmPartition();
        partition1.setSuffix( suffix1 );

        partitionLookupTree.add( suffix1, partition1 );

        Dn suffix2 = new Dn( "ou=system" );
        Partition partition2 = new JdbmPartition();
        partition2.setSuffix( suffix2 );

        partitionLookupTree.add( suffix2, partition2 );

        assertNotNull( partitionLookupTree );
        assertTrue( partitionLookupTree.hasChildren() );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.partition.Partition

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.