本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.expireCaches
方法的一些代码示例,展示了Repository.expireCaches
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.expireCaches
方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:expireCaches
[英]Expires all the caches used by this repository implementation from path and below. This methods delegates to #expireCaches(ResourceStoreRequest,WalkerFilter) method using null for filter.
[中]从path及以下路径终止此存储库实现使用的所有缓存。此方法将null用作筛选器,委托给#expireCaches(ResourceStoreRequest,WalkerFilter)方法。
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
@Override
public boolean expireMetadataCaches( final ResourceStoreRequest request )
{
return getRepository().expireCaches( request, getMetadataWalkerFilter() );
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
@Override
public void expireCaches( ResourceStoreRequest request )
{
final List<Repository> members = getMemberRepositories();
for ( Repository member : members )
{
member.expireCaches( request );
}
super.expireCaches( request );
}
代码示例来源:origin: org.sonatype.nexus/nexus-app
@Deprecated
public void expireAllCaches( ResourceStoreRequest request )
{
for ( Repository repository : repositoryRegistry.getRepositories() )
{
if ( repository.getLocalStatus().shouldServiceRequest() )
{
repository.expireCaches( request );
}
}
}
代码示例来源:origin: org.sonatype.nexus/nexus-proxy
@Override
public boolean expireMetadataCaches( final ResourceStoreRequest request )
{
boolean cacheChanged = false;
for ( String metadataPath : getMetadataFilePaths() )
{
final ResourceStoreRequest expireRequest = new ResourceStoreRequest( request );
expireRequest.setRequestPath( metadataPath );
boolean expired = getRepository().expireCaches( expireRequest, null );
cacheChanged = cacheChanged || expired;
}
return cacheChanged;
}
代码示例来源:origin: org.sonatype.nexus/nexus-app
@Override
public Object doRun()
throws Exception
{
ResourceStoreRequest req = new ResourceStoreRequest( getResourceStorePath() );
if ( getRepositoryId() != null )
{
getRepositoryRegistry().getRepository( getRepositoryId() ).expireCaches( req );
}
else
{
for ( Repository repository : getRepositoryRegistry().getRepositories() )
{
if ( repository.getLocalStatus().shouldServiceRequest() )
{
repository.expireCaches( req );
}
}
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!