org.sonatype.nexus.proxy.repository.Repository.isIndexable()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(107)

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

Repository.isIndexable介绍

[英]Is Repository indexable?.
[中]存储库是可索引的吗?。

代码示例

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin

/**
 * Index is maintained for the repository. Implies SUPPORTED.
 */
private boolean INDEXABLE(Repository repository) {
 return SUPPORTED(repository) && repository.isIndexable();
}

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

public void reindexRepository( String path, String repositoryId, boolean fullReindex )
  throws NoSuchRepositoryException, IOException
{
  Repository repository = repositoryRegistry.getRepository( repositoryId );
  if ( repository.isIndexable() )
  {
    reindexRepository( repository, fullReindex );
    publishRepositoryIndex( repositoryId );
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

protected void logSkippingRepositoryMessage( Repository repository )
{
  boolean isSupported = isIndexingSupported( repository );
  boolean isIndexed = repository.isIndexable();
  if ( getLogger().isDebugEnabled() )
  {
    StringBuilder sb = new StringBuilder( "Indexing is " );
    if ( !isSupported )
    {
      sb.append( "not " );
    }
    sb.append( "supported on repository \"" + repository.getName() + "\" (ID=\"" + repository.getId() + "\")" );
    if ( isSupported )
    {
      sb.append( " and is set as " );
      if ( !isIndexed )
      {
        sb.append( "not " );
      }
      sb.append( "indexed. " );
    }
    else
    {
      sb.append( ". " );
    }
    sb.append( "Skipping it." );
    getLogger().debug( sb.toString() );
  }
}

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-archetype-plugin

if (repository.isIndexable()) {

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin

private void inspectForIndexerManager(final Event<?> evt) {
 RepositoryItemEvent ievt = (RepositoryItemEvent) evt;
 Repository repository = ievt.getRepository();
 // should we sync at all
 if (repository != null && repository.isIndexable()) {
  try {
   if (ievt instanceof RepositoryItemEventCache || ievt instanceof RepositoryItemEventStore) {
    getIndexerManager().addItemToIndex(repository, ievt.getItem());
   }
   else if (ievt instanceof RepositoryItemEventDelete) {
    getIndexerManager().removeItemFromIndex(repository, ievt.getItem());
   }
  }
  catch (Exception e) // TODO be more specific
  {
   log.error("Could not maintain index for repository {}!", repository.getId(), e);
  }
 }
}

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( repository.isIndexable() )

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

public void publishAllIndex()
  throws IOException
{
  List<Repository> reposes = repositoryRegistry.getRepositories();
  for ( Repository repository : reposes )
  {
    if ( LocalStatus.IN_SERVICE.equals( repository.getLocalStatus() )
      && !repository.getRepositoryKind().isFacetAvailable( GroupRepository.class )
      && repository.isIndexable() )
    {
      publishRepositoryIndex( repository );
    }
  }
  List<GroupRepository> groups = repositoryRegistry.getRepositoriesWithFacet( GroupRepository.class );
  for ( GroupRepository group : groups )
  {
    publishRepositoryIndex( group );
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( !repository.isIndexable() )

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

protected void downloadRepositoryGroupIndex( GroupRepository group )
  throws IOException
{
  List<Repository> members = group.getMemberRepositories();
  for ( Repository repository : members )
  {
    if ( !repository.isIndexable() )
    {
      continue;
    }
    if ( repository.getRepositoryKind().isFacetAvailable( GroupRepository.class ) )
    {
      downloadRepositoryGroupIndex( repository.adaptToFacet( GroupRepository.class ) );
    }
    if ( repository.getRepositoryKind().isFacetAvailable( ProxyRepository.class ) )
    {
      if ( downloadRepositoryIndex( repository.adaptToFacet( ProxyRepository.class ) ) )
      {
        mergeRepositoryGroupIndexWithMember( repository );
      }
    }
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

private void inspectForIndexerManager( Event<?> evt )
{
  try
  {
    RepositoryItemEvent ievt = (RepositoryItemEvent) evt;
    // should we sync at all
    if ( ievt.getRepository().isIndexable() )
    {
      if ( ievt instanceof RepositoryItemEventCache || ievt instanceof RepositoryItemEventStore )
      {
        getIndexerManager().addItemToIndex( ievt.getRepository(), ievt.getItem() );
      }
      else if ( ievt instanceof RepositoryItemEventDelete )
      {
        getIndexerManager().removeItemFromIndex( ievt.getRepository(), ievt.getItem() );
      }
    }
  }
  catch ( Exception e ) // TODO be more specific
  {
    getLogger().error( "Could not maintain index!", e );
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( !repository.isIndexable() )

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( !repository.isIndexable() )

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( !isIndexingSupported( repository ) || !repository.isIndexable() )

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( !repository.isIndexable() )

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin

if (repository.isIndexable()) {

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( !repository.isIndexable() )

代码示例来源:origin: org.sonatype.nexus/nexus-indexer-lucene-app

if ( applicationStatusSource.getSystemStatus().isNexusStarted() && repository.isIndexable() )

相关文章