com.datastax.driver.core.policies
Class RetryPolicy.RetryDecision

java.lang.Object
  extended by com.datastax.driver.core.policies.RetryPolicy.RetryDecision
Enclosing interface:
RetryPolicy

public static class RetryPolicy.RetryDecision
extends Object

A retry decision to adopt on a Cassandra exception (read/write timeout or unavailable exception).

There is three possible decision:


Nested Class Summary
static class RetryPolicy.RetryDecision.Type
          The type of retry decisions.
 
Method Summary
 ConsistencyLevel getRetryConsistencyLevel()
          The consistency level for a retry decision.
 RetryPolicy.RetryDecision.Type getType()
          The type of this retry decision.
static RetryPolicy.RetryDecision ignore()
          Creates an IGNORE retry decision.
static RetryPolicy.RetryDecision rethrow()
          Creates a RETHROW retry decision.
static RetryPolicy.RetryDecision retry(ConsistencyLevel consistency)
          Creates a RETRY retry decision using the provided consistency level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public RetryPolicy.RetryDecision.Type getType()
The type of this retry decision.

Returns:
the type of this retry decision.

getRetryConsistencyLevel

public ConsistencyLevel getRetryConsistencyLevel()
The consistency level for a retry decision.

Returns:
the consistency level for a retry decision or null if this retry decision is an IGNORE or a RETHROW.

rethrow

public static RetryPolicy.RetryDecision rethrow()
Creates a RETHROW retry decision.

Returns:
a RETHROW retry decision.

retry

public static RetryPolicy.RetryDecision retry(ConsistencyLevel consistency)
Creates a RETRY retry decision using the provided consistency level.

Parameters:
consistency - the consistency level to use for the retry.
Returns:
a RETRY with consistency level consistency retry decision.

ignore

public static RetryPolicy.RetryDecision ignore()
Creates an IGNORE retry decision.

Returns:
an IGNORE retry decision.


Copyright © 2013. All Rights Reserved.