mongo.set.timeout: Set the timeout value on a mongo connection

Description Usage Arguments See Also Examples

View source: R/mongo.R

Description

Set the timeout value for network operations on a mongo connection. Subsequent network operations will timeout if they take longer than the given number of milliseconds.

Usage

1

Arguments

mongo

(mongo) a mongo connection object.

timeout

(as.integer) number of milliseconds to which to set the timeout value.

See Also

mongo.get.timeout,
mongo.create,
mongo.

Examples

1
2
3
4
5
6
7
mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
    mongo.set.timeout(mongo, 2000L)
    timeout <- mongo.get.timeout(mongo)
    if (timeout != 2000L)
        error("expected timeout of 2000");
}

jonkatz2/rmongodb documentation built on May 19, 2019, 7:30 p.m.