@Override public boolean expireCaches( final ResourceStoreRequest request, final WalkerFilter filter ) { if ( !getLocalStatus().shouldServiceRequest() ) { return false; } // at this level (we are not proxy) expireCaches() actually boils down to "expire NFC" only // we are NOT crawling local storage content to flip the isExpired flags to true on a hosted // repo, since those attributes in case of hosted (or any other non-proxy) repositories does not have any // meaning // 2nd, remove the items from NFC return expireNotFoundCaches( request, filter ); }
@Override public void setLocalStatus( LocalStatus localStatus ) { if ( !localStatus.equals( getLocalStatus() ) ) { LocalStatus oldLocalStatus = getLocalStatus(); super.setLocalStatus( localStatus ); localStatusChanged = true; eventBus().post( new RepositoryEventLocalStatusChanged( this, oldLocalStatus, localStatus ) ); } }
/** * The shadow is delegating it's availability to it's master, but we can still shot down the shadow only. */ @Override public LocalStatus getLocalStatus() { return super.getLocalStatus().shouldServiceRequest() && getMasterRepository().getLocalStatus().shouldServiceRequest() ? LocalStatus.IN_SERVICE : LocalStatus.OUT_OF_SERVICE; }
public void moveItem( boolean fromTask, ResourceStoreRequest from, ResourceStoreRequest to ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException { if ( getLogger().isDebugEnabled() ) { getLogger().debug( getId() + ".moveItem() :: " + from.toString() + " --> " + to.toString() ); } if ( !getLocalStatus().shouldServiceRequest() ) { throw new RepositoryNotAvailableException( this ); } copyItem( fromTask, from, to ); deleteItem( fromTask, from ); }
public Collection<StorageItem> list( boolean fromTask, ResourceStoreRequest request ) throws IllegalOperationException, ItemNotFoundException, StorageException { if ( getLogger().isDebugEnabled() ) { getLogger().debug( getId() + ".list() :: " + request.toString() ); } if ( !getLocalStatus().shouldServiceRequest() ) { throw new RepositoryNotAvailableException( this ); } request.addProcessedRepository( this ); StorageItem item = retrieveItem( fromTask, request ); if ( item instanceof StorageCollectionItem ) { return list( fromTask, (StorageCollectionItem) item ); } else { throw new ItemNotFoundException( request, this ); } }
public Collection<StorageItem> list( boolean fromTask, StorageCollectionItem coll ) throws IllegalOperationException, ItemNotFoundException, StorageException { if ( getLogger().isDebugEnabled() ) { getLogger().debug( getId() + ".list() :: " + coll.getRepositoryItemUid().toString() ); } if ( !getLocalStatus().shouldServiceRequest() ) { throw new RepositoryNotAvailableException( this ); } maintainNotFoundCache( coll.getResourceStoreRequest() ); Collection<StorageItem> items = doListItems( new ResourceStoreRequest( coll ) ); for ( StorageItem item : items ) { item.getItemContext().putAll( coll.getItemContext() ); } return items; }
public boolean recreateAttributes( ResourceStoreRequest request, final Map<String, String> initialData ) if ( !getLocalStatus().shouldServiceRequest() )
if ( !getLocalStatus().shouldServiceRequest() )
if ( !getLocalStatus().shouldServiceRequest() )
throws IllegalOperationException, AccessDeniedException if ( !this.getLocalStatus().shouldServiceRequest() )
if ( !getLocalStatus().shouldServiceRequest() )
@Override public boolean expireNotFoundCaches( final ResourceStoreRequest request, final WalkerFilter filter ) if ( !getLocalStatus().shouldServiceRequest() )
if ( !getLocalStatus().shouldServiceRequest() )