RecoveryPolicy

play.api.cache.redis.RecoveryPolicy

Recovery policy triggers when a request fails. Based on the implementation, it may try it again, recover with a default value or just simply log the failure. Either way, it is up to user to define what to do on failure.

Attributes

Since

1.3.0

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def recoverFrom[T](rerun: => Future[T], default: => Future[T], failure: RedisException): Future[T]

When a failure occurs, this method handles it. It may re-run it, return default value, log it or propagate the exception.

When a failure occurs, this method handles it. It may re-run it, return default value, log it or propagate the exception.

Type parameters

T

expected result type

Value parameters

default

default value neutral to the operation

failure

incident report

rerun

failed request (cache operation)

Attributes

Returns

failure recovery or exception

Concrete methods

def name: String

name of the policy used for internal purposes

name of the policy used for internal purposes

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any