//a clone of the tracked resource
Set<DataFileReference> resources;
synchronized (trackedResources) {
resources = new HashSet<DataFileReference>(trackedResources.keySet());
}
DataFileProvider dataFileProvider = getDataFileProvider();
if(dataFileProvider == null){
log.info("Currently no DataFileProvider available");
} else {
log.debug("Track {} resources",resources.size());
for(DataFileReference resoruce : resources){
TrackingState resourceState;
synchronized (trackedResources) {
resourceState = trackedResources.get(resoruce);
}
if(log.isDebugEnabled()){
log.debug(" > {} (state:{})",resoruce.getName(),
resourceState != null ?
resourceState.getTrackingState() != null ?
resourceState.getTrackingState() : "none" :
null);
}
if(resourceState != null){ //might be null if removed in the meantime
STATE state;
if(dataFileProvider.isAvailable(resoruce.getBundleSymbolicName(),
resoruce.getName(), resoruce.getProperties())){
state = STATE.AVAILABLE;
} else {
state = STATE.UNAVAILABLE;
}