Package org.apache.cassandra.exceptions

Examples of org.apache.cassandra.exceptions.ReadTimeoutException


        {
            throw new AssertionError(ex);
        }

        if (!success)
            throw new ReadTimeoutException(consistencyLevel, received.get(), blockfor, resolver.isDataPresent());

        return blockfor == 1 ? resolver.getData() : resolver.resolve();
    }
View Full Code Here


        {
            throw new AssertionError(ex);
        }

        if (!success)
            throw new ReadTimeoutException(consistencyLevel, received.get(), blockfor, resolver.isDataPresent());

        return blockfor == 1 ? resolver.getData() : resolver.resolve();
    }
View Full Code Here

        {
            throw new AssertionError(ex);
        }

        if (!success)
            throw new ReadTimeoutException(consistencyLevel, received.get(), blockfor, resolver.isDataPresent());

        return blockfor == 1 ? resolver.getData() : resolver.resolve();
    }
View Full Code Here

    public TResolved get() throws ReadTimeoutException, DigestMismatchException
    {
        if (!await(command.getTimeout(), TimeUnit.MILLISECONDS))
        {
            ReadTimeoutException ex = new ReadTimeoutException(consistencyLevel, received.get(), blockfor, resolver.isDataPresent());
            if (logger.isDebugEnabled())
                logger.debug("Read timeout: {}", ex.toString());
            throw ex;
        }

        return blockfor == 1 ? resolver.getData() : resolver.resolve();
    }
View Full Code Here

        {
            // Same as for writes, see AbstractWriteResponseHandler
            int acks = received.get();
            if (resolver.isDataPresent() && acks >= blockfor)
                acks = blockfor - 1;
            ReadTimeoutException ex = new ReadTimeoutException(consistencyLevel, received.get(), blockfor, resolver.isDataPresent());
            if (logger.isDebugEnabled())
                logger.debug("Read timeout: {}", ex.toString());
            throw ex;
        }

        return blockfor == 1 ? resolver.getData() : resolver.resolve();
    }
View Full Code Here

                        case READ_TIMEOUT:
                            assert err.error instanceof ReadTimeoutException;
                            if (manager.configuration().isMetricsEnabled())
                                metrics().getErrorMetrics().getReadTimeouts().inc();

                            ReadTimeoutException rte = (ReadTimeoutException)err.error;
                            ConsistencyLevel rcl = ConsistencyLevel.from(rte.consistency);
                            retry = retryPolicy.onReadTimeout(query, rcl, rte.blockFor, rte.received, rte.dataPresent, queryRetries);
                            break;
                        case WRITE_TIMEOUT:
                            assert err.error instanceof WriteTimeoutException;
View Full Code Here

                        case READ_TIMEOUT:
                            assert err.error instanceof ReadTimeoutException;
                            if (metricsEnabled())
                                metrics().getErrorMetrics().getReadTimeouts().inc();

                            ReadTimeoutException rte = (ReadTimeoutException)err.error;
                            ConsistencyLevel rcl = ConsistencyLevel.from(rte.consistency);
                            retry = retryPolicy.onReadTimeout(query, rcl, rte.blockFor, rte.received, rte.dataPresent, queryRetries);
                            break;
                        case WRITE_TIMEOUT:
                            assert err.error instanceof WriteTimeoutException;
View Full Code Here

    public TResolved get() throws ReadTimeoutException, DigestMismatchException
    {
        if (!await(command.getTimeout(), TimeUnit.MILLISECONDS))
        {
            // Same as for writes, see AbstractWriteResponseHandler
            ReadTimeoutException ex = new ReadTimeoutException(consistencyLevel, received, blockfor, resolver.isDataPresent());

            if (logger.isDebugEnabled())
                logger.debug("Read timeout: {}", ex.toString());
            throw ex;
        }

        return blockfor == 1 ? resolver.getData() : resolver.resolve();
    }
View Full Code Here

        {
            throw new AssertionError(ex);
        }

        if (!success)
            throw new ReadTimeoutException(consistencyLevel, received.get(), blockfor, resolver.isDataPresent());

        return blockfor == 1 ? resolver.getData() : resolver.resolve();
    }
View Full Code Here

                        case READ_TIMEOUT:
                            assert err.error instanceof ReadTimeoutException;
                            if (manager.configuration().isMetricsEnabled())
                                metrics().getErrorMetrics().getReadTimeouts().inc();

                            ReadTimeoutException rte = (ReadTimeoutException)err.error;
                            ConsistencyLevel rcl = ConsistencyLevel.from(rte.consistency);
                            retry = retryPolicy.onReadTimeout(query, rcl, rte.blockFor, rte.received, rte.dataPresent, queryRetries);
                            break;
                        case WRITE_TIMEOUT:
                            assert err.error instanceof WriteTimeoutException;
View Full Code Here

TOP

Related Classes of org.apache.cassandra.exceptions.ReadTimeoutException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.