This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.discovery.base-1.1.4
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-discovery-base.git

commit 5faa5a7d80f61bc3dcaae1848e43a8f830d87817
Author: Oliver Lietz <[email protected]>
AuthorDate: Wed Feb 17 17:13:28 2016 +0000

    SLING-5485 Remove Launchpad API dependency from Discovery Base
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/base@1730877
 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  6 -----
 .../discovery/base/commons/BaseViewChecker.java    | 29 ++--------------------
 .../sling/discovery/base/commons/package-info.java |  2 +-
 3 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/pom.xml b/pom.xml
index ff8c39d..be03e96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -204,12 +204,6 @@
             <scope>provided</scope>
                </dependency>
         <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.launchpad.api</artifactId>
-                   <version>1.1.0</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
             <version>2.4</version>
diff --git 
a/src/main/java/org/apache/sling/discovery/base/commons/BaseViewChecker.java 
b/src/main/java/org/apache/sling/discovery/base/commons/BaseViewChecker.java
index ce15255..9ebd495 100644
--- a/src/main/java/org/apache/sling/discovery/base/commons/BaseViewChecker.java
+++ b/src/main/java/org/apache/sling/discovery/base/commons/BaseViewChecker.java
@@ -33,8 +33,6 @@ import org.apache.sling.commons.scheduler.Scheduler;
 import org.apache.sling.discovery.base.connectors.BaseConfig;
 import 
org.apache.sling.discovery.base.connectors.announcement.AnnouncementRegistry;
 import org.apache.sling.discovery.base.connectors.ping.ConnectorRegistry;
-import org.apache.sling.launchpad.api.StartupListener;
-import org.apache.sling.launchpad.api.StartupMode;
 import org.apache.sling.settings.SlingSettingsService;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
@@ -49,7 +47,7 @@ import org.slf4j.LoggerFactory;
  * Local heartbeats are stored in the repository. Remote heartbeats are POSTs 
to
  * remote TopologyConnectorServlets.
  */
-public abstract class BaseViewChecker implements ViewChecker, Runnable, 
StartupListener {
+public abstract class BaseViewChecker implements ViewChecker, Runnable {
 
     protected final Logger logger = LoggerFactory.getLogger(this.getClass());
 
@@ -80,9 +78,6 @@ public abstract class BaseViewChecker implements ViewChecker, 
Runnable, StartupL
     /** keep a reference to the component context **/
     protected ComponentContext context;
 
-    /** SLING-2968 : start issuing remote heartbeats only after startup 
finished **/
-    protected boolean startupFinished = false;
-
     /** SLING-3382 : force ping instructs the servlet to start the backoff 
from scratch again **/
     private boolean forcePing;
 
@@ -91,12 +86,6 @@ public abstract class BaseViewChecker implements 
ViewChecker, Runnable, StartupL
 
     protected PeriodicBackgroundJob periodicPingJob;
     
-    public void inform(StartupMode mode, boolean finished) {
-       if (finished) {
-               startupFinished(mode);
-       }
-    }
-    
     protected abstract SlingSettingsService getSlingSettingsService();
 
     protected abstract ResourceResolverFactory getResourceResolverFactory();
@@ -109,17 +98,6 @@ public abstract class BaseViewChecker implements 
ViewChecker, Runnable, StartupL
 
     protected abstract BaseConfig getConnectorConfig();
 
-    public void startupFinished(StartupMode mode) {
-       synchronized(lock) {
-               startupFinished = true;
-               issueHeartbeat();
-       }
-    }
-
-    public void startupProgress(float ratio) {
-       // we dont care
-    }
-
     @Activate
     protected void activate(ComponentContext context) {
        synchronized(lock) {
@@ -130,6 +108,7 @@ public abstract class BaseViewChecker implements 
ViewChecker, Runnable, StartupL
 
                doActivate();
                activated = true;
+            issueHeartbeat();
        }
     }
 
@@ -223,10 +202,6 @@ public abstract class BaseViewChecker implements 
ViewChecker, Runnable, StartupL
             logger.error("issueConnectorPings: connectorRegistry is null");
             return;
         }
-        if (!startupFinished) {
-               logger.debug("issueConnectorPings: not issuing remote heartbeat 
yet, startup not yet finished");
-               return;
-        }
         if (logger.isDebugEnabled()) {
             logger.debug("issueConnectorPings: pinging outgoing topology 
connectors (if there is any) for "+slingId);
         }
diff --git 
a/src/main/java/org/apache/sling/discovery/base/commons/package-info.java 
b/src/main/java/org/apache/sling/discovery/base/commons/package-info.java
index 4b9b304..91962da 100644
--- a/src/main/java/org/apache/sling/discovery/base/commons/package-info.java
+++ b/src/main/java/org/apache/sling/discovery/base/commons/package-info.java
@@ -23,7 +23,7 @@
  *
  * @version 1.1.0
  */
-@Version("1.1.0")
+@Version("2.0.0")
 package org.apache.sling.discovery.base.commons;
 
 import aQute.bnd.annotation.Version;

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to