• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PartitionFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.directory.server.core.factory.PartitionFactory的典型用法代码示例。如果您正苦于以下问题:Java PartitionFactory类的具体用法?Java PartitionFactory怎么用?Java PartitionFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PartitionFactory类属于org.apache.directory.server.core.factory包,在下文中一共展示了PartitionFactory类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addPartition

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * Add a new partition to the directory server.
 *
 * @param partitionName - The name of the partition.
 * @param indexes - The attributes to index.
 * @return This Builder for subsequent changes.
 */
public Builder addPartition(final String id, final String partitionName, final int indexSize, final String ... indexes) throws Exception {
    assertNotStarted();
    if (directoryService == null) {
        throw new IllegalStateException("The Directory service has not been created.");
    }

    SchemaManager schemaManager = directoryService.getSchemaManager();
    PartitionFactory partitionFactory = directoryServiceFactory.getPartitionFactory();
    Partition partition = partitionFactory.createPartition(schemaManager, directoryService.getDnFactory(), id, partitionName, 1000, workingDir);
    for (String current : indexes) {
        partitionFactory.addIndex(partition, current, indexSize);
    }
    partition.initialize();
    directoryService.addPartition(partition);

    return this;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:25,代码来源:LdapService.java


示例2: createPartition

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
private static void createPartition(final DirectoryServiceFactory dsf, final SchemaManager schemaManager, final String id,
        final String suffix, final DirectoryService directoryService, final File workingDir) throws Exception {
    PartitionFactory pf = dsf.getPartitionFactory();
    Partition p = pf.createPartition(schemaManager, id, suffix, 1000, workingDir);
    pf.addIndex(p, "uid", 10);
    pf.addIndex(p, "departmentNumber", 10);
    pf.addIndex(p, "member", 10);
    pf.addIndex(p, "memberOf", 10);
    p.initialize();
    directoryService.addPartition(p);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:12,代码来源:LdapTestSuite.java


示例3: setupDirectoryService

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
public static SetupResult setupDirectoryService(Class<?> testClass) throws Exception {

        // Define a default class DS then
        DirectoryServiceFactory dsf = DefaultDirectoryServiceFactory.class.newInstance();

        SetupResult result = new SetupResult();
        result.directoryService = dsf.getDirectoryService();
        result.directoryService.getChangeLog().setEnabled(true);

        dsf.init("default" + UUID.randomUUID().toString());

        // Apply the class LDIFs
        ApplyLdifFiles applyLdifFiles = testClass.getAnnotation(ApplyLdifFiles.class);
        if (applyLdifFiles != null) {
            LOG.debug("Applying {} to {}", applyLdifFiles.value(), testClass.getName());
            DSAnnotationProcessor.injectLdifFiles(applyLdifFiles.clazz(), result.directoryService, applyLdifFiles.value());
        }

        // check if it has a LdapServerBuilder then use the DS created above
        CreateLdapServer ldapServerAnnotation = testClass.getAnnotation(CreateLdapServer.class);
        if (ldapServerAnnotation != null) {
            result.ldapServer = ServerAnnotationProcessor.instantiateLdapServer(ldapServerAnnotation, result.directoryService);
            result.ldapServer.setDirectoryService(result.directoryService);
            result.ldapServer.start();
        }

        // print out information which partition factory we use
        DirectoryServiceFactory dsFactory = DefaultDirectoryServiceFactory.class.newInstance();
        PartitionFactory partitionFactory = dsFactory.getPartitionFactory();
        LOG.debug("Using partition factory {}", partitionFactory.getClass().getSimpleName());

        return result;
    }
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:34,代码来源:DirectoryServiceBuilder.java


示例4: getPartitionFactory

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public PartitionFactory getPartitionFactory() throws Exception {
    return partitionFactory;
}
 
开发者ID:kawasima,项目名称:bouncr,代码行数:7,代码来源:InMemoryDirectoryServiceFactory.java


示例5: getPartitionFactory

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public PartitionFactory getPartitionFactory() throws Exception {
   return partitionFactory;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:8,代码来源:InMemoryDirectoryServiceFactory.java


示例6: getPartitionFactory

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public PartitionFactory getPartitionFactory()
        throws Exception {
    return partitionFactory;
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:9,代码来源:CarbonDirectoryServiceFactory.java


示例7: getPartitionFactory

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public PartitionFactory getPartitionFactory() throws Exception {
    return partitionFactory;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:8,代码来源:InMemoryDirectoryServiceFactory.java


示例8: InMemoryDirectoryServiceFactory

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * Constructor which uses provided {@link DirectoryService} and {@link PartitionFactory} implementations.
 *
 * @param directoryService must be not-<code>null</code>
 * @param partitionFactory must be not-<code>null</code>
 */
public InMemoryDirectoryServiceFactory(DirectoryService directoryService, PartitionFactory partitionFactory) {
    this.directoryService = directoryService;
    this.partitionFactory = partitionFactory;
}
 
开发者ID:kawasima,项目名称:bouncr,代码行数:11,代码来源:InMemoryDirectoryServiceFactory.java


示例9: InMemoryDirectoryServiceFactory

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * Constructor which uses provided {@link DirectoryService} and {@link PartitionFactory} implementations.
 *
 * @param directoryService must be not-<code>null</code>
 * @param partitionFactory must be not-<code>null</code>
 */
public InMemoryDirectoryServiceFactory(DirectoryService directoryService, PartitionFactory partitionFactory) {
   this.directoryService = directoryService;
   this.partitionFactory = partitionFactory;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:11,代码来源:InMemoryDirectoryServiceFactory.java


示例10: InMemoryDirectoryServiceFactory

import org.apache.directory.server.core.factory.PartitionFactory; //导入依赖的package包/类
/**
 * Constructor which uses provided {@link DirectoryService} and {@link PartitionFactory} implementations.
 * 
 * @param directoryService must be not-<code>null</code>
 * @param partitionFactory must be not-<code>null</code>
 */
public InMemoryDirectoryServiceFactory(DirectoryService directoryService, PartitionFactory partitionFactory) {
    this.directoryService = directoryService;
    this.partitionFactory = partitionFactory;
}
 
开发者ID:kwart,项目名称:ldap-server,代码行数:11,代码来源:InMemoryDirectoryServiceFactory.java



注:本文中的org.apache.directory.server.core.factory.PartitionFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RangeFacetBuilder类代码示例发布时间:2022-05-23
下一篇:
Java BasicCredential类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap