Package mungbean

Examples of mungbean.MongoException


    private void validateResponse(T response) {
        int responseId = response.responseTo();
        if (responseId != -1) {
            if (responseId != requestId) {
                throw new MongoException("Received response to unexpected request " + requestId + "!=" + responseId);
            }
        }
    }
View Full Code Here


            transaction = new DBTransaction<T>(message, incrementAndGetCounter());
            return transaction.call(outputStream, inputStream);
        } catch (Exception e) {
            // Close this connection as it's probably invalid
            close();
            throw new MongoException("Error communicating with server", e, transaction);
        }
    }
View Full Code Here

            SingleNodeDbOperationExecutor server = allServers.get(roundRobinCount.incrementAndGet() % numberOfServersAvailable);
            if (server.isAlive()) {
                return server;
            }
        }
        throw new MongoException("No servers available for read!");
    }
View Full Code Here

            if (server.isMaster() && server.isAlive()) {
                currentMaster.set(server);
                return server;
            }
        }
        throw new MongoException("Unable to find master!");
    }
View Full Code Here

TOP

Related Classes of mungbean.MongoException

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.