Package org.apache.directory.server.core.api

Examples of org.apache.directory.server.core.api.CacheService


        SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory ) );
        extractor.extractOrCopy( true );
        LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );

        schemaManager = new DefaultSchemaManager( loader );
        CacheService cacheService = new CacheService();
        cacheService.initialize( null );
        dnFactory = new DefaultDnFactory( schemaManager, cacheService.getCache( "dnCache" ) );

        boolean loaded = schemaManager.loadAllEnabled();

        if ( !loaded )
        {
View Full Code Here


            }
        }

        LOG.info( "using partition dir {}", partitionsDir.getAbsolutePath() );

        CacheService cacheService = new CacheService();
        cacheService.initialize( instanceLayout );

        initSchemaManager( instanceLayout );
        DnFactory dnFactory = new DefaultDnFactory( schemaManager, cacheService.getCache( "dnCache" ) );
        initSchemaLdifPartition( instanceLayout, dnFactory );
        initConfigPartition( instanceLayout, dnFactory, cacheService );

        // Read the configuration
        cpReader = new ConfigPartitionReader( configPartition );
View Full Code Here

  private void initDirectoryService() throws Exception {
    ds = new DefaultDirectoryService();
    ds.setInstanceLayout(new InstanceLayout(workDir));

    CacheService cacheService = new CacheService();
    ds.setCacheService(cacheService);

    // first load the schema
    InstanceLayout instanceLayout = ds.getInstanceLayout();
    File schemaPartitionDirectory = new File(
View Full Code Here

            }
        }

        LOG.info( "using partition dir {}", partitionsDir.getAbsolutePath() );

        CacheService cacheService = new CacheService();
        cacheService.initialize( instanceLayout );

        initSchemaManager( instanceLayout );
        initSchemaLdifPartition( instanceLayout );
        initConfigPartition( instanceLayout, cacheService );
View Full Code Here

        }

        if ( cacheService == null )
        {
            // Initialize a default cache service
            cacheService = new CacheService();
        }

        cacheService.initialize( instanceLayout );

        // Initialize the AP caches
View Full Code Here

            }
        }

        LOG.info( "using partition dir {}", partitionsDir.getAbsolutePath() );

        CacheService cacheService = new CacheService();
        cacheService.initialize( instanceLayout );

        initSchemaManager( instanceLayout );
        initSchemaLdifPartition( instanceLayout );
        initConfigPartition( instanceLayout, cacheService );
View Full Code Here

        // EhCache in disabled-like-mode
        Configuration ehCacheConfig = new Configuration();
        CacheConfiguration defaultCache = new CacheConfiguration("default", 1).eternal(false).timeToIdleSeconds(30)
                .timeToLiveSeconds(30).overflowToDisk(false);
        ehCacheConfig.addDefaultCache(defaultCache);
        CacheService cacheService = new CacheService(new CacheManager(ehCacheConfig));
        directoryService.setCacheService(cacheService);

        // Init the schema
        // SchemaLoader loader = new SingleLdifSchemaLoader();
        SchemaLoader loader = new JarLdifSchemaLoader();
View Full Code Here

  private void build( String name ) throws Exception
  {
    directoryService.setInstanceId( name );
    buildInstanceDirectory( name );

    CacheService cacheService = new CacheService();
    cacheService.initialize( directoryService.getInstanceLayout() );

    directoryService.setCacheService( cacheService );

    // Init the service now
    initSchema();
View Full Code Here

  @SuppressWarnings("unchecked")
  private void initDirectoryService() throws Exception {
    ds = new DefaultDirectoryService();
    ds.setInstanceLayout(new InstanceLayout(workDir));

    CacheService cacheService = new CacheService();
    ds.setCacheService(cacheService);

    // first load the schema
    InstanceLayout instanceLayout = ds.getInstanceLayout();
    File schemaPartitionDirectory = new File(
View Full Code Here

        if ( interceptors == null )
        {
            setDefaultInterceptorConfigurations();
        }

        cacheService = new CacheService();
        cacheService.initialize( this );

        // Initialize the AP caches
        accessControlAPCache = new DnNode<AccessControlAdministrativePoint>();
        collectiveAttributeAPCache = new DnNode<CollectiveAttributeAdministrativePoint>();
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.api.CacheService

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.