Class RunnableOnMaster

  • All Implemented Interfaces:
    Runnable, org.apache.sling.discovery.TopologyEventListener

    @ConsumerType
    public abstract class RunnableOnMaster
    extends Object
    implements org.apache.sling.discovery.TopologyEventListener, Runnable
    Abstact base class for scheduled job to be run only on the cluster master.
    • Constructor Detail

      • RunnableOnMaster

        public RunnableOnMaster()
    • Method Detail

      • runOnMaster

        protected abstract void runOnMaster()
        Run the scheduled job.
      • handleTopologyEvent

        public void handleTopologyEvent​(org.apache.sling.discovery.TopologyEvent te)
        Specified by:
        handleTopologyEvent in interface org.apache.sling.discovery.TopologyEventListener
      • run

        public final void run()
        Specified by:
        run in interface Runnable