|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler
@Service(value={HeartbeatHandler.class,org.apache.sling.launchpad.api.StartupListener.class}) public class HeartbeatHandler
The heartbeat handler is responsible and capable of issuing both local and remote heartbeats and registers a periodic job with the scheduler for doing so.
Local heartbeats are stored in the repository. Remote heartbeats are POSTs to remote TopologyConnectorServlets.
Constructor Summary | |
---|---|
HeartbeatHandler()
|
Method Summary | |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
|
protected void |
deactivate()
|
void |
inform(org.apache.sling.launchpad.api.StartupMode mode,
boolean finished)
|
void |
initialize(DiscoveryServiceImpl discoveryService,
String initialVotingId)
The initialize method is called by the DiscoveryServiceImpl.activate as we require the discoveryService (and the discoveryService has a reference on us - but we cant have circular references in osgi). |
void |
run()
|
void |
startupFinished(org.apache.sling.launchpad.api.StartupMode mode)
|
void |
startupProgress(float ratio)
|
void |
triggerHeartbeat()
Trigger the issuance of the next heartbeat asap instead of at next heartbeat interval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HeartbeatHandler()
Method Detail |
---|
public void inform(org.apache.sling.launchpad.api.StartupMode mode, boolean finished)
inform
in interface org.apache.sling.launchpad.api.StartupListener
public void startupFinished(org.apache.sling.launchpad.api.StartupMode mode)
startupFinished
in interface org.apache.sling.launchpad.api.StartupListener
public void startupProgress(float ratio)
startupProgress
in interface org.apache.sling.launchpad.api.StartupListener
@Activate protected void activate(org.osgi.service.component.ComponentContext context)
@Deactivate protected void deactivate()
public void initialize(DiscoveryServiceImpl discoveryService, String initialVotingId)
The initialVotingId is used to avoid an unnecessary topologyChanged event when switching form isolated to established view but with only the local instance in the view.
public void run()
run
in interface Runnable
public void triggerHeartbeat()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |