Java Code Examples for org.apache.directory.server.core.factory.JdbmPartitionFactory

The following examples show how to use org.apache.directory.server.core.factory.JdbmPartitionFactory. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: syncope   Source File: ApacheDSStartStopListener.java    License: Apache License 2.0 6 votes vote down vote up
private void initSystemPartition() throws Exception {
    JdbmPartitionFactory partitionFactory = new JdbmPartitionFactory();

    Partition systemPartition = partitionFactory.createPartition(
            service.getSchemaManager(),
            service.getDnFactory(),
            "system",
            ServerDNConstants.SYSTEM_DN,
            500,
            new File(service.getInstanceLayout().getPartitionsDirectory(), "system"));
    systemPartition.setSchemaManager(service.getSchemaManager());

    partitionFactory.addIndex(systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100);

    service.setSystemPartition(systemPartition);
}
 
Example 2
Source Project: cloudstack   Source File: EmbeddedLdapServer.java    License: Apache License 2.0 5 votes vote down vote up
protected void createBasePartition() throws Exception {
    JdbmPartitionFactory jdbmPartitionFactory = new JdbmPartitionFactory();
    setBasePartition(jdbmPartitionFactory.createPartition(getDirectoryService().getSchemaManager(), getDirectoryService().getDnFactory(), getBasePartitionName(), getBaseStructure(), getBaseCacheSize(), getBasePartitionPath()));
    addSchemaExtensions();
    createBaseIndices();
    getDirectoryService().addPartition(getBasePartition());
}
 
Example 3
public ApacheDirectoryPartitionManager(DirectoryService directoryService, String wd) {
    this.directoryService = directoryService;
    this.workingDirectory = wd;
    this.partitionFactory = new JdbmPartitionFactory();
}