To decide when to retry a query the Session can use any object which implements the RetryPolicy trait
Session
RetryPolicy