Hi Radhika,
Unfortunately, there is no such API. If you are willing to dive into JanusGraph source code, you can modify StandardTransactionLogProcessor::fixSecondaryFailure method and build JanusGraph by yourself.
You are also welcome to create a feature request on GitHub issues. Probably we should allow users to register a callback method when recovery is done.
Best,
Boxuan