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

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

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

Partition.initialize介绍

[英]Initializes this partition. isInitialized() will return true if doInit() returns without any errors. destroy() is called automatically as a clean-up process if doInit() throws an exception.
[中]初始化这个分区。如果doInit()返回时没有任何错误,isInitialized()将返回true。如果doInit()引发异常,则会自动调用destroy()作为清理过程。

代码示例

代码示例来源: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: org.apache.directory.server/apacheds-interceptors-changelog

/**
 * Initialize the ChangeLog system. We will initialize the associated store.
 */
@Override
public void init( DirectoryService service ) throws LdapException
{
  if ( enabled )
  {
    if ( store == null )
    {
      // If no store has been defined, create an In Memory store
      store = new MemoryChangeLogStore();
    }
    store.init( service );
    if ( exposed && isTagSearchSupported() )
    {
      TaggableSearchableChangeLogStore tmp = ( TaggableSearchableChangeLogStore ) store;
      tmp.createPartition( partitionSuffix, revContainerName, tagContainerName );
      Partition partition = tmp.getPartition();
      partition.initialize();
      service.addPartition( partition );
    }
  }
  // Flip the protection flag
  storeInitialized = true;
}

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

partition.initialize();

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

partition.initialize();

相关文章