Examples of NoAvailableHostsException


Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

        do {
            Iterable<ServiceEndPoint> allEndPoints = getAllEndPoints();
            if (Iterables.isEmpty(allEndPoints)) {
                throw (lastException == null)
                        ? new NoAvailableHostsException()
                        : new NoAvailableHostsException(lastException);
            }

            Iterable<ServiceEndPoint> validEndPoints = getValidEndPoints(allEndPoints);
            if (Iterables.isEmpty(validEndPoints)) {
                throw (lastException == null)
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

     */
    Iterable<ServiceEndPoint> getAllEndPoints() {
        Iterable<ServiceEndPoint> hosts = _hostDiscovery.getHosts();
        if (Iterables.isEmpty(hosts)) {
            // There were no service end points available, we have no choice but to stop trying and just exit.
            throw new NoAvailableHostsException();
        }

        return hosts;
    }
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

        do {
            Iterable<ServiceEndPoint> allEndPoints = getAllEndPoints();
            if (Iterables.isEmpty(allEndPoints)) {
                throw (lastException == null)
                        ? new NoAvailableHostsException()
                        : new NoAvailableHostsException(lastException);
            }

            Iterable<ServiceEndPoint> validEndPoints = getValidEndPoints(allEndPoints);
            if (Iterables.isEmpty(validEndPoints)) {
                throw (lastException == null)
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

     */
    Iterable<ServiceEndPoint> getAllEndPoints() {
        Iterable<ServiceEndPoint> hosts = _hostDiscovery.getHosts();
        if (Iterables.isEmpty(hosts)) {
            // There were no service end points available, we have no choice but to stop trying and just exit.
            throw new NoAvailableHostsException();
        }

        return hosts;
    }
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

                                               final ServiceCallback<S, R> callback) {
        Collection<Future<R>> futures = Lists.newArrayList();

        Iterable<ServiceEndPoint> endPoints = _pool.getAllEndPoints();
        if (Iterables.isEmpty(endPoints)) {
            throw new NoAvailableHostsException();
        }

        for (final ServiceEndPoint endPoint : endPoints) {
            if (!predicate.apply(endPoint)) {
                continue;
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

        do {
            Iterable<ServiceEndPoint> allEndPoints = getAllEndPoints();
            if (Iterables.isEmpty(allEndPoints)) {
                throw (lastException == null)
                        ? new NoAvailableHostsException()
                        : new NoAvailableHostsException(lastException);
            }

            Iterable<ServiceEndPoint> validEndPoints = getValidEndPoints(allEndPoints);
            if (Iterables.isEmpty(validEndPoints)) {
                throw (lastException == null)
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

        do {
            Iterable<ServiceEndPoint> allEndPoints = getAllEndPoints();
            if (Iterables.isEmpty(allEndPoints)) {
                throw (lastException == null)
                        ? new NoAvailableHostsException()
                        : new NoAvailableHostsException(lastException);
            }

            Iterable<ServiceEndPoint> validEndPoints = getValidEndPoints(allEndPoints);
            if (Iterables.isEmpty(validEndPoints)) {
                throw (lastException == null)
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

                                               final ServiceCallback<S, R> callback) {
        Collection<Future<R>> futures = Lists.newArrayList();

        Iterable<ServiceEndPoint> endPoints = _pool.getAllEndPoints();
        if (Iterables.isEmpty(endPoints)) {
            throw new NoAvailableHostsException();
        }

        for (final ServiceEndPoint endPoint : endPoints) {
            if (!predicate.apply(endPoint)) {
                continue;
View Full Code Here

Examples of com.bazaarvoice.ostrich.exceptions.NoAvailableHostsException

     */
    Iterable<ServiceEndPoint> getAllEndPoints() {
        Iterable<ServiceEndPoint> hosts = _hostDiscovery.getHosts();
        if (Iterables.isEmpty(hosts)) {
            // There were no service end points available, we have no choice but to stop trying and just exit.
            throw new NoAvailableHostsException();
        }

        return hosts;
    }
View Full Code Here

Examples of com.netflix.astyanax.connectionpool.exceptions.NoAvailableHostsException

        super(config, monitor);

        this.pools = Lists.newArrayList(pools);

        if (this.pools == null || this.pools.isEmpty()) {
            throw new NoAvailableHostsException("No hosts to borrow from");
        }

        int size = this.pools.size();
        retryCountdown = Math.min(config.getMaxFailoverCount(), size);
        if (retryCountdown < 0)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.