Java Code Examples for com.datastax.driver.core.ConsistencyLevel#ALL

The following examples show how to use com.datastax.driver.core.ConsistencyLevel#ALL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LogConsistencyAllRetryPolicy.java    From james-project with Apache License 2.0 5 votes vote down vote up
@Override
public RetryDecision onReadTimeout(Statement statement, ConsistencyLevel cl, int requiredResponses, int receivedResponses, boolean dataRetrieved, int nbRetry) {
    if (cl == ConsistencyLevel.ALL) {
        log(statement);
    }
    return DefaultRetryPolicy.INSTANCE.onReadTimeout(statement, cl, requiredResponses, receivedResponses, dataRetrieved, nbRetry);
}
 
Example 2
Source File: LogConsistencyAllRetryPolicy.java    From james-project with Apache License 2.0 5 votes vote down vote up
@Override
public RetryDecision onWriteTimeout(Statement statement, ConsistencyLevel cl, WriteType writeType, int requiredAcks, int receivedAcks, int nbRetry) {
    if (cl == ConsistencyLevel.ALL) {
        log(statement);
    }
    return DefaultRetryPolicy.INSTANCE.onWriteTimeout(statement, cl, writeType, requiredAcks, receivedAcks, nbRetry);
}
 
Example 3
Source File: LogConsistencyAllRetryPolicy.java    From james-project with Apache License 2.0 5 votes vote down vote up
@Override
public RetryDecision onUnavailable(Statement statement, ConsistencyLevel cl, int requiredReplica, int aliveReplica, int nbRetry) {
    if (cl == ConsistencyLevel.ALL) {
        log(statement);
    }
    return DefaultRetryPolicy.INSTANCE.onUnavailable(statement, cl, requiredReplica, aliveReplica, nbRetry);
}
 
Example 4
Source File: LogConsistencyAllRetryPolicy.java    From james-project with Apache License 2.0 5 votes vote down vote up
@Override
public RetryDecision onRequestError(Statement statement, ConsistencyLevel cl, DriverException e, int nbRetry) {
    if (cl == ConsistencyLevel.ALL) {
        log(statement);
    }
    return DefaultRetryPolicy.INSTANCE.onRequestError(statement, cl, e, nbRetry);
}