Skip to content

Commit c4301ed

Browse files
committed
Merge pull request #56 from andyqzb/master
override isRunning and isPaused method to fixbug shutdown open replicator
2 parents 9f57e29 + a9613b2 commit c4301ed

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

databus2-relay/databus2-event-producer-or/src/main/java/com/linkedin/databus2/producers/OpenReplicatorEventProducer.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,23 @@ protected ReadEventCycleSummary readEventsFromAllSources(long sinceSCN) throws D
510510
throw new RuntimeException("Not supported !!");
511511
}
512512

513+
/* (non-Javadoc)
514+
* @see com.linkedin.databus2.producers.AbstractEventProducer#isPaused()
515+
*/
516+
@Override
517+
public synchronized boolean isPaused()
518+
{
519+
return _producerThread.isPauseRequested();
520+
}
521+
522+
/* (non-Javadoc)
523+
* @see com.linkedin.databus2.producers.AbstractEventProducer#isRunning()
524+
*/
525+
@Override
526+
public synchronized boolean isRunning()
527+
{
528+
return !_producerThread.isShutdownRequested() && !_producerThread.isPauseRequested();
529+
}
513530

514531
/* (non-Javadoc)
515532
* @see com.linkedin.databus2.producers.AbstractEventProducer#unpause()

0 commit comments

Comments
 (0)