Class ClusteredReplicationPauserManager

java.lang.Object
com.atlassian.jira.cluster.cache.pauser.ClusteredReplicationPauserManager
All Implemented Interfaces:
ReplicationPauserManager

@Internal public class ClusteredReplicationPauserManager extends Object implements ReplicationPauserManager
Allows to run "some code" without triggering replication in clustered Jira
  • Constructor Details

    • ClusteredReplicationPauserManager

      public ClusteredReplicationPauserManager()
  • Method Details

    • isReplicationPaused

      public boolean isReplicationPaused()
      Description copied from interface: ReplicationPauserManager
      Checks if replication is paused for current thread
      Specified by:
      isReplicationPaused in interface ReplicationPauserManager
    • pauseReplicationFor

      public void pauseReplicationFor(Runnable codeWillNotTriggerCacheReplication, String logContext)
      Description copied from interface: ReplicationPauserManager
      Disables sending cache replication events for the time of running codeWillNotTriggerCacheReplication. Note that codeWillNotTriggerCacheReplication should be run in the calling thread, i.e. only the code running in the calling thread will have the cache replication paused.
      Specified by:
      pauseReplicationFor in interface ReplicationPauserManager
      Parameters:
      codeWillNotTriggerCacheReplication - - code to be run without cache replication
      logContext - - log context to be able to understand the reason cache replication is paused
    • start

      public void start(String logContext)
      Start pausing the replication context. Make sure stop(String) is called (in finally block) - if not this thread will stop replicate cache operations!
    • stop

      public void stop(String logContext)