Class ReplayThread

  • All Implemented Interfaces:
    Runnable

    public class ReplayThread
    extends DirectoryThread
    Thread that is used to get message from the replication servers (stored in the updates queue) and replay them in the current server. A configurable number of this thread is created for the whole MultimasterReplication object (i.e: these threads are shared across the ReplicationDomain objects for replaying the updates they receive)
    • Constructor Detail

      • ReplayThread

        public ReplayThread​(BlockingQueue<UpdateToReplay> updateToReplayQueue,
                            ReentrantLock switchQueueLock)
        Constructor for the ReplayThread.
        Parameters:
        updateToReplayQueue - The queue of update messages we have to replay
        switchQueueLock - lock to ensure moving updates from one queue to another is atomic
    • Method Detail

      • shutdown

        public void shutdown()
        Shutdown this replay thread.
      • run

        public void run()
        Run method for this class.
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread