[felix-site-pub] branch asf-site updated: site build

2021-08-18 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/felix-site-pub.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new c69a38a  site build
c69a38a is described below

commit c69a38a2ca4544b37d65ed72c8d936310d6ce9ee
Author: jenkins 
AuthorDate: Wed Aug 18 11:17:55 2021 +

site build
---
 documentation/news.html |   3 +
 sitemap.xml | 306 
 2 files changed, 156 insertions(+), 153 deletions(-)

diff --git a/documentation/news.html b/documentation/news.html
index 4dc2cb6..ed9dce1 100644
--- a/documentation/news.html
+++ b/documentation/news.html
@@ -495,6 +495,9 @@
 
 
 
+Apache Felix Healthcheck Core 2.0.10, Healthcheck Generalchecks 2.0.8, 
Systemready 0.5.0, Rootcause 0.2.0
+
+
 Apache Felix Configuration Admin 1.9.22 and Http Jetty 4.1.8 (May 7th, 
2021)
 
 
diff --git a/sitemap.xml b/sitemap.xml
index a178ac4..57ca8bc 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2,614 +2,614 @@
 http://www.sitemaps.org/schemas/sitemap/0.9";>
 
 https://felix.apache.org/documentation/community/contributing.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/community/project-info.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/community/projects-using-felix.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/development/coding-standards.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/development/dependencies-file-template.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/development/provisional-osgi-api-policy.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/development/release-management-nexus.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/development/site-how-to.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/development/using-the-osgi-compliance-tests.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/documentation.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/downloads.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/faqs.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/faqs/apache-felix-scr-plugin-faq.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/getting-started.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/index.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 https://felix.apache.org/documentation/license.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/apache-karaf.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/apache-felix-board-report-template.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2007-04.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2007-05.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2007-06.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2007-09.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2007-12.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2008-03.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2008-06.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-reports/board-report-2008-09.html
-2021-07-28T19:46:05.912Z
+2021-08-18T11:17:53.196Z
 
 
 
https://felix.apache.org/documentation/miscellaneous/board-

[felix-antora-site] branch main updated: New releases

2021-08-18 Thread cziegeler
This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/felix-antora-site.git


The following commit(s) were added to refs/heads/main by this push:
 new c731e9f  New releases
c731e9f is described below

commit c731e9fb0a6f6783b6250ffbdd263e07ac938e46
Author: Carsten Ziegeler 
AuthorDate: Wed Aug 18 13:16:03 2021 +0200

New releases
---
 modules/ROOT/pages/news.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/ROOT/pages/news.adoc b/modules/ROOT/pages/news.adoc
index 1d5e7ec..ebcc7fe 100644
--- a/modules/ROOT/pages/news.adoc
+++ b/modules/ROOT/pages/news.adoc
@@ -1,5 +1,6 @@
 = News
 
+* Apache Felix Healthcheck Core 2.0.10, Healthcheck Generalchecks 2.0.8, 
Systemready 0.5.0, Rootcause 0.2.0
 * Apache Felix Configuration Admin 1.9.22 and Http Jetty 4.1.8 (May 7th, 2021)
 * Apache Felix Http Jetty 4.1.6 (March 18th, 2021)
 * Apache Felix Configurator 1.0.14 (March 6th, 2021)


svn commit: r49557 [2/2] - /release/felix/

2021-08-18 Thread cziegeler
Added: release/felix/org.apache.felix.rootcause-0.2.0.pom
==
--- release/felix/org.apache.felix.rootcause-0.2.0.pom (added)
+++ release/felix/org.apache.felix.rootcause-0.2.0.pom Wed Aug 18 11:14:22 2021
@@ -0,0 +1,203 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+4.0.0
+
+org.apache.felix
+felix-parent
+7
+
+
+
+org.apache.felix.rootcause
+0.2.0
+Apache Felix - Root Cause Analysis
+
+
+8
+UTF-8
+4.11.0
+
+
+
+
scm:git:https://github.com/apache/felix-dev.git
+
scm:git:https://github.com/apache/felix-dev.git
+https://gitbox.apache.org/repos/asf?p=felix-dev.git
+  org.apache.felix.rootcause-0.2.0
+  
+
+
+
+
+biz.aQute.bnd
+bnd-maven-plugin
+5.3.0
+
+
+
+bnd-process
+
+
+
+
+
+org.apache.maven.plugins
+maven-jar-plugin
+
+
+
${project.build.outputDirectory}/META-INF/MANIFEST.MF
+
+
+
+
+org.apache.maven.plugins
+maven-javadoc-plugin
+
+true
+true
+UTF-8
+-Xdoclint:none
+
+
+
+
+
+
+
+
+org.osgi
+osgi.core
+7.0.0
+provided
+
+
+org.osgi
+org.osgi.service.component
+1.4.0
+provided
+
+
+org.osgi
+org.osgi.annotation.versioning
+1.1.1
+provided
+
+ 
+org.osgi
+org.osgi.annotation.bundle
+1.0.0
+provided
+
+
+org.osgi
+org.osgi.service.component.annotations
+1.4.0
+provided
+
+
+org.slf4j
+slf4j-api
+1.7.6
+provided
+
+
+
+
+
+junit
+junit
+4.12
+test
+
+
+org.mockito
+mockito-all
+1.9.5
+test
+
+
+org.apache.servicemix.bundles
+org.apache.servicemix.bundles.hamcrest
+1.3_1
+test
+
+
+
+org.ops4j.pax.exam
+pax-exam-container-native
+${exam.version}
+test
+
+
+
+org.ops4j.pax.exam
+pax-exam-junit4
+${exam.version}
+test
+
+
+
+org.ops4j.pax.exam
+pax-exam-cm
+${exam.version}
+test
+
+
+
+org.ops4j.pax.exam
+pax-exam-link-mvn
+${exam.version}
+test
+
+
+
+org.apache.felix
+org.apache.felix.framework
+6.0.5
+test
+
+
+
+ch.qos.logback
+logback-core
+1.0.13
+test
+
+
+
+ch.qos.logback
+logback-classic
+1.0.13
+test
+
+
+javax.inject
+javax.inject
+1
+test
+
+
+org.ops4j.pax.tinybundles
+tinybundles
+3.0.0
+test
+
+
+org.awaitility
+awaitility
+3.1.0
+test
+
+
+
+

Propchange: release/felix/org.apache.felix.rootcause-0.2.0.pom
--
svn:executable = *

Added: release/felix/org.apache.felix.rootcause-0.2.0.pom.asc
==
--- release/felix/org.apache.felix.rootcause-0.2.0.pom.asc (added)
+++ release/felix/org.apache.felix.rootcause-0.2.0.pom.asc Wed Aug 18 11:14:22 
2021
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEX9UUWovQMXqU3HcTP89Sn/LyegYFAmEY0jgACgkQP89Sn/Ly
+egbLVg//R55niu7seUkhYszQupLCUjs0j0pMk1NovAh8ighrd4ggkDGGyhJKTS9d
+5rfxDTvvdsn6/OAUNKEEUg6G9KgMSWBKXNBbMFsuFPlPvkbapKi61rfWYk5SwWYQ
+DwIzsOCgn5/2Ib25LsZiS5M+d6KwKS8bFU/rFoDa+GkacG4snfVjisGkh1WC4KS8
+b0kJt5ue54UsyqH/T/GgzPS252HzJ8WK4YB5XI8qAeiy88M0H/PF4ra8KkzmZmSd
+TmqM7v1gw8CZG4NZyJG9QbZ

svn commit: r49557 [1/2] - /release/felix/

2021-08-18 Thread cziegeler
Author: cziegeler
Date: Wed Aug 18 11:14:22 2021
New Revision: 49557

Log:
Systemready and HC releases

Added:
release/felix/org.apache.felix.healthcheck.core-2.0.10-javadoc.jar   (with 
props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-javadoc.jar.asc   
(with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-javadoc.jar.sha1   
(with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-javadoc.jar.sha512   
(with props)

release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.tar.gz   
(with props)

release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.tar.gz.asc
   (with props)

release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.tar.gz.sha1
   (with props)

release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.tar.gz.sha512
   (with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.zip   
(with props)

release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.zip.asc   
(with props)

release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.zip.sha1  
 (with props)

release/felix/org.apache.felix.healthcheck.core-2.0.10-source-release.zip.sha512
   (with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-sources.jar   (with 
props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-sources.jar.asc   
(with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-sources.jar.sha1   
(with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10-sources.jar.sha512   
(with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.jar   (with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.jar.asc   (with 
props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.jar.sha1   (with 
props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.jar.sha512   (with 
props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.pom   (with props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.pom.asc   (with 
props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.pom.sha1   (with 
props)
release/felix/org.apache.felix.healthcheck.core-2.0.10.pom.sha512   (with 
props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-javadoc.jar  
 (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-javadoc.jar.asc  
 (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-javadoc.jar.sha1 
  (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-javadoc.jar.sha512
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.tar.gz
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.tar.gz.asc
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.tar.gz.sha1
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.tar.gz.sha512
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.zip
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.zip.asc
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.zip.sha1
   (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-source-release.zip.sha512
   (with props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-sources.jar  
 (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-sources.jar.asc  
 (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-sources.jar.sha1 
  (with props)

release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8-sources.jar.sha512
   (with props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.jar   (with 
props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.jar.asc   
(with props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.jar.sha1   
(with props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.jar.sha512   
(with props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.pom   (with 
props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.pom.asc   
(with props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.pom.sha1   
(with props)
release/felix/org.apache.felix.healthcheck.generalchecks-2.0.8.pom.sha512   
(with props)
release/felix/org.apache.felix.rootcause-0.2.0-javadoc.jar   (with props)
release/felix/org.apache.felix.rootcause-0.2.0-javadoc.jar.asc   (with 
props)
release/felix/org.apache.felix.rootcause-0.2.0-javadoc.jar.sha1   (with 
props)
release/felix/org.apache.felix.rootcause-0.2.0-javad

[felix-dev] branch master updated: FELIX-6444 Contribute a compatible implementation of OSGi Features

2021-08-18 Thread davidb
This is an automated email from the ASF dual-hosted git repository.

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
 new d381c9c  FELIX-6444 Contribute a compatible implementation of OSGi 
Features
 new 6eff0d0  Merge pull request #88 from bosschaert/features-contribution
d381c9c is described below

commit d381c9c52b2148606c79a1c10d410a1a2a98b9ea
Author: David Bosschaert 
AuthorDate: Thu Aug 12 16:20:55 2021 +0100

FELIX-6444 Contribute a compatible implementation of OSGi Features

This implementation was initially made in the Apache Sling Whiteboard
component at
https://github.com/apache/sling-whiteboard/tree/master/osgi-featuremodel
---
 features/pom.xml   | 141 
 .../felix/feature/impl/ArtifactBuilderImpl.java|  95 +
 .../felix/feature/impl/BuilderFactoryImpl.java |  59 +++
 .../felix/feature/impl/BundleBuilderImpl.java  |  95 +
 .../feature/impl/ConfigurationBuilderImpl.java | 125 +++
 .../felix/feature/impl/ExtensionBuilderImpl.java   | 151 
 .../felix/feature/impl/FeatureBuilderImpl.java | 275 ++
 .../felix/feature/impl/FeatureServiceImpl.java | 399 +
 .../java/org/apache/felix/feature/impl/IDImpl.java | 214 +++
 .../felix/feature/impl/FeatureServiceImplTest.java | 295 +++
 .../src/test/resources/features/test-exfeat1.json  |  26 ++
 .../src/test/resources/features/test-exfeat2.json  |   9 +
 .../src/test/resources/features/test-feature.json  |  28 ++
 .../src/test/resources/features/test-feature2.json |  19 +
 14 files changed, 1931 insertions(+)

diff --git a/features/pom.xml b/features/pom.xml
new file mode 100644
index 000..cd4f4d6
--- /dev/null
+++ b/features/pom.xml
@@ -0,0 +1,141 @@
+
+
+http://maven.apache.org/POM/4.0.0";
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+   4.0.0
+   
+   org.apache.felix
+   felix-parent
+   7
+   
+   
+
+   org.apache.felix.feature
+   0.0.1-SNAPSHOT
+   jar
+
+   OSGi Feature Model API
+
+
+  11
+
+
+   
+ 
+   sonatype.snapshots
+   OSGi Snapshot
+   https://oss.sonatype.org/content/repositories/snapshots
+ 
+
+
+   
+   
+
+biz.aQute.bnd
+bnd-maven-plugin
+5.3.0
+
+
+
+bnd-process
+
+
+
+
+   
+   org.apache.maven.plugins
+   maven-jar-plugin
+   
+   
+   
${project.build.outputDirectory}/META-INF/MANIFEST.MF
+   
+   
+   
+   
+   org.apache.rat
+   apache-rat-plugin
+   
+   
+   *.md
+   
src/main/resources/META-INF/services/*
+   
+   
+   
+   
+   
+   
+   
+   org.osgi
+   osgi.annotation
+   8.0.0
+   provided
+   
+   
+   org.osgi
+   osgi.core
+   8.0.0
+   provided
+   
+   
+   org.osgi
+   org.osgi.service.feature
+   1.0.0-SNAPSHOT
+   provided
+   
+   
+   org.osgi
+   org.osgi.util.function
+   1.0.0
+   provided
+   
+   
+   org.apache.geronimo.specs
+   geronimo-json_1.1_spec
+   1.3
+   provided
+   
+   
+   org.apache.felix
+   org.apache.felix.converter
+   1.0.18
+   provided
+   
+
+org.apache.felix
+org.apache.felix.cm.json
+1.0.6
+provided
+
+
+   
+ 

[felix-dev] branch master updated: FELIX-6448 : Simplify result cache for components check

2021-08-18 Thread cziegeler
This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
 new 57cd739  FELIX-6448 : Simplify result cache for components check
57cd739 is described below

commit 57cd739ddce7c7261b0397b6eae12b1e673f8586
Author: Carsten Ziegeler 
AuthorDate: Wed Aug 18 09:16:49 2021 +0200

FELIX-6448 : Simplify result cache for components check
---
 .../felix/hc/generalchecks/DsComponentsCheck.java  | 143 ++---
 1 file changed, 69 insertions(+), 74 deletions(-)

diff --git 
a/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/DsComponentsCheck.java
 
b/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/DsComponentsCheck.java
index 34df30e..a406e39 100644
--- 
a/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/DsComponentsCheck.java
+++ 
b/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/DsComponentsCheck.java
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.felix.hc.annotation.HealthCheckService;
@@ -56,8 +57,6 @@ public class DsComponentsCheck implements HealthCheck {
 public static final String HC_NAME = "DS Components Ready Check";
 public static final String HC_DEFAULT_TAG = "systemalive";
 
-private static final Result INVALID = new Result(Result.Status.CRITICAL, 
"invalid");
-
 @ObjectClassDefinition(name = "Health Check: "
 + HC_NAME, description = "System ready check that checks a list of 
DS components and provides root cause analysis in case of errors")
 public @interface Config {
@@ -87,100 +86,96 @@ public class DsComponentsCheck implements HealthCheck {
 
 volatile ServiceComponentRuntime scr;
 
+private final AtomicBoolean refreshCache = new AtomicBoolean();
+
 private final AtomicReference cache = new AtomicReference<>();
 
 @Activate
 public void activate(final BundleContext ctx, final Config config) throws 
InterruptedException {
 componentsList = Arrays.asList(config.components_list());
 statusForMissing = config.statusForMissing();
-this.cache.set(INVALID);
+this.refreshCache.set(false); // cache is empty
 LOG.debug("Activated DS Components HC for componentsList={}", 
componentsList);
 }
 
 @Override
 public Result execute() {
-Result result = null;
-while ( result == null ) {
-this.cache.compareAndSet(INVALID, null);
-result = this.cache.get();
-if ( result == INVALID ) {
-result = null; // repeat
-} else if ( result == null ) {
-FormattingResultLog log = new FormattingResultLog();
-
-Collection componentDescriptionDTOs = 
null;
-try {
-componentDescriptionDTOs = 
scr.getComponentDescriptionDTOs();
-} catch ( final Throwable e) {
-log.temporarilyUnavailable("Exception while getting ds 
component dtos {}", e.getMessage(), e);
-}
-if ( componentDescriptionDTOs != null ) {
-final List watchedComps = new 
LinkedList();
-final List missingComponents = new 
LinkedList(componentsList);
-for (final ComponentDescriptionDTO desc : 
componentDescriptionDTOs) {
-if (componentsList.contains(desc.name)) {
-watchedComps.add(desc);
-missingComponents.remove(desc.name);
-}
-}
-for (final String missingComp : missingComponents) {
-log.info("No component with name {} is registered in 
SCR runtime", missingComp);
+Result result = this.cache.get();
+if ( result == null || this.refreshCache.compareAndSet(true, false) ) {
+FormattingResultLog log = new FormattingResultLog();
+
+Collection componentDescriptionDTOs = 
null;
+try {
+componentDescriptionDTOs = scr.getComponentDescriptionDTOs();
+} catch ( final Throwable e) {
+log.temporarilyUnavailable("Exception while getting ds 
component dtos {}", e.getMessage(), e);
+}
+if ( componentDescriptionDTOs != null ) {
+final List watchedComps = new 
LinkedList();
+final List missingComponents = new 
LinkedList(componentsList);
+for (final ComponentDescriptionDTO desc : 
componentDescriptionDTOs) {
+if (componentsList.contains(desc.name)) {
+

[felix-dev] branch master updated: FELIX-6448 : Simplify result cache for components check

2021-08-18 Thread cziegeler
This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
 new ef866c1  FELIX-6448 : Simplify result cache for components check
ef866c1 is described below

commit ef866c181ff90e9f5f55b85ec48e49b059a4a239
Author: Carsten Ziegeler 
AuthorDate: Wed Aug 18 09:12:55 2021 +0200

FELIX-6448 : Simplify result cache for components check
---
 .../felix/systemready/impl/ComponentsCheck.java| 65 ++
 1 file changed, 29 insertions(+), 36 deletions(-)

diff --git 
a/systemready/src/main/java/org/apache/felix/systemready/impl/ComponentsCheck.java
 
b/systemready/src/main/java/org/apache/felix/systemready/impl/ComponentsCheck.java
index eab264f..2812d23 100644
--- 
a/systemready/src/main/java/org/apache/felix/systemready/impl/ComponentsCheck.java
+++ 
b/systemready/src/main/java/org/apache/felix/systemready/impl/ComponentsCheck.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
 
@@ -36,7 +37,6 @@ import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.ConfigurationPolicy;
 import org.osgi.service.component.annotations.Reference;
-import org.osgi.service.component.annotations.ReferencePolicyOption;
 import org.osgi.service.component.runtime.ServiceComponentRuntime;
 import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO;
 import org.osgi.service.metatype.annotations.AttributeDefinition;
@@ -55,8 +55,6 @@ public class ComponentsCheck implements SystemReadyCheck {
 
 public static final String PID = 
"org.apache.felix.systemready.impl.ComponentsCheck";
 
-private static final CheckStatus INVALID = new CheckStatus("invalid", 
StateType.READY, CheckStatus.State.RED, "invalid");
-
 @ObjectClassDefinition(
 name="DS Components System Ready Check",
 description="System ready check that checks a list of DS 
components"
@@ -81,6 +79,8 @@ public class ComponentsCheck implements SystemReadyCheck {
 
 private ServiceComponentRuntime scr;
 
+private final AtomicBoolean refreshCache = new AtomicBoolean();
+
 private final AtomicReference cache = new AtomicReference<>();
 
 @Activate
@@ -88,7 +88,7 @@ public class ComponentsCheck implements SystemReadyCheck {
 this.analyzer = new DSRootCause(scr);
 this.type = config.type();
 this.componentsList = Arrays.asList(config.components_list());
-this.cache.set(INVALID);
+this.refreshCache.set(false); // cache is empty
 }
 
 @Override
@@ -111,37 +111,30 @@ public class ComponentsCheck implements SystemReadyCheck {
 
 @Override
 public CheckStatus getStatus() {
-CheckStatus result = null;
-
-while ( result == null ) {
-this.cache.compareAndSet(INVALID, null);
-result = this.cache.get();
-if ( result == INVALID ) {
-result = null; // repeat
-} else if ( result == null ) {
-final List watchedComps = 
getComponents(scr.getComponentDescriptionDTOs());
-if ( watchedComps == null ) {
-result = new CheckStatus(getName(), type, 
CheckStatus.State.RED, "Exception while checking ds component dtos.");
-} else if (watchedComps.size() < componentsList.size()) {
-final List missed = new 
ArrayList<>(this.componentsList);
-for(final DSComp c : watchedComps) {
-missed.remove(c.desc.name);
-}
-result = new CheckStatus(getName(), type, 
CheckStatus.State.RED, "Not all named components could be found, missing : " + 
missed);
-} else {
-try {
-final StringBuilder details = new StringBuilder();
-watchedComps.stream().forEach(dsComp -> 
addDetails(dsComp, details));
-final CheckStatus.State state = 
CheckStatus.State.worstOf(watchedComps.stream().map(this::status));
-result = new CheckStatus(getName(), type, state, 
details.toString());
-} catch (Throwable e) {
-// exception might occur on shutdown or startup
-log.warn("Exception while checking ds component dtos 
{}", e.getMessage(), e);
-result = new CheckStatus(getName(), type, 
CheckStatus.State.RED, "Exception while checking ds component dtos : " + 
e.getMessage());
-}
+CheckStatus result = this.cache.get();
+