org.apache.directory.server.core.api.partition.Partition.setId()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(232)

本文整理了Java中org.apache.directory.server.core.api.partition.Partition.setId()方法的一些代码示例,展示了Partition.setId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Partition.setId()方法的具体详情如下:
包路径:org.apache.directory.server.core.api.partition.Partition
类名称:Partition
方法名:setId

Partition.setId介绍

[英]Sets the unique identifier for this partition.
[中]设置此分区的唯一标识符。

代码示例

代码示例来源:origin: ctco/cukes

private Partition createPartition(String id, String suffix) throws LdapInvalidDnException {
  Partition partition = new AvlPartition(service.getSchemaManager());
  partition.setId(id);
  partition.setSuffixDn(new Dn(suffix));
  return partition;
}

代码示例来源:origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
@Override
protected void doInit() throws LdapException
{
  if ( !initialized )
  {
    // -----------------------------------------------------------------------
    // Load apachemeta schema from within the ldap-schema Jar with all the
    // schema it depends on.  This is a minimal mandatory set of schemas.
    // -----------------------------------------------------------------------
    wrapped.setId( SCHEMA_ID );
    wrapped.setSuffixDn( schemaDN );
    wrapped.setSchemaManager( schemaManager );
    try
    {
      wrapped.initialize();
      synchronizer = new RegistrySynchronizerAdaptor( schemaManager );
    }
    catch ( Exception e )
    {
      LOG.error( I18n.err( I18n.ERR_90 ), e );
      throw new RuntimeException( e );
    }
    schemaModificationDN = new Dn( schemaManager, SchemaConstants.SCHEMA_MODIFICATIONS_DN );
  }
}

代码示例来源:origin: stackoverflow.com

File workingDirectory = ...;

Partition partition = new JdbmPartition();
partition.setId(...);
partition.setSuffix(...);

DirectoryService directoryService = new DefaultDirectoryService();
directoryService.setWorkingDirectory(workingDirectory);
directoryService.addPartition(partition);

LdapService ldapService = new LdapService();
ldapService.setSocketAcceptor(new SocketAcceptor(null));
ldapService.setIpPort(...);
ldapService.setDirectoryService(directoryService);

directoryService.startup();
ldapService.start();

代码示例来源:origin: org.apache.directory.server/apacheds-core-annotations

partition = ( Partition ) constructor.newInstance( new Object[]
  { schemaManager, service.getDnFactory() } );
partition.setId( createPartition.name() );
partition.setSuffixDn( new Dn( schemaManager, createPartition.suffix() ) );

相关文章