Package com.mongodb

Class MongoConnectionPoolClearedException

  • All Implemented Interfaces:
    Serializable

    public final class MongoConnectionPoolClearedException
    extends MongoClientException
    An exception that may usually happen as a result of another thread clearing a connection pool. Such clearing usually itself happens as a result of an exception, in which case it may be specified via the Throwable.getCause() method.

    It is always safe to retry an operation that failed with this exception.

    See Also:
    Serialized Form
    • Constructor Detail

      • MongoConnectionPoolClearedException

        public MongoConnectionPoolClearedException​(ServerId connectionPoolServerId,
                                                   @Nullable
                                                   Throwable cause)
        Not part of the public API.
        Parameters:
        connectionPoolServerId - A ServerId specifying the server used by the connection pool that creates a new exception.
        cause - The cause.