Class ReplicationWorker

  • All Implemented Interfaces:
    java.lang.Runnable

    @StatsDoc(name="replication_worker",
              help="replication worker related stats")
    public class ReplicationWorker
    extends java.lang.Object
    implements java.lang.Runnable
    ReplicationWorker will take the fragments one by one from ZKLedgerUnderreplicationManager and replicates to it.
    • Field Detail

      • NUM_OF_EXPONENTIAL_BACKOFF_RETRIALS

        public static final int NUM_OF_EXPONENTIAL_BACKOFF_RETRIALS
        See Also:
        Constant Field Values
      • replicationFailedLedgers

        final com.google.common.cache.LoadingCache<java.lang.Long,​java.util.concurrent.atomic.AtomicInteger> replicationFailedLedgers
      • unableToReadEntriesForReplication

        final com.google.common.cache.LoadingCache<java.lang.Long,​java.util.concurrent.ConcurrentSkipListSet<java.lang.Long>> unableToReadEntriesForReplication
    • Method Detail

      • start

        public void start()
        Start the replication worker.
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • scheduleTaskWithDelay

        void scheduleTaskWithDelay​(java.util.TimerTask timerTask,
                                   long delayPeriod)
      • shutdown

        public void shutdown()
        Stop the replication worker service.
      • isRunning

        public boolean isRunning()
        Gives the running status of ReplicationWorker.