| java.lang.Object | |
| ↳ | org.mule.module.mongo.MongoCloudConnector |
Known Direct Subclasses
|
Known Indirect Subclasses
|
MongoDB is an open source, high-performance, schema-free, document-oriented database that manages collections of BSON documents.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | CAPPED_DEFAULT_VALUE | ||||||||||
| String | WRITE_CONCERN_DEFAULT_VALUE | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| autoConnectRetry | This controls whether the system retries automatically on connection errors. | ||||||||||
| client | |||||||||||
| connectTimeout | The connection timeout in milliseconds; this is for establishing the socket connections (open). | ||||||||||
| connectionsPerHost | The number of connections allowed per host (the pool size, per host) | ||||||||||
| database | The database name of the Mongo server | ||||||||||
| fsync | Sets the fsync value of WriteConcern for the connection. | ||||||||||
| host | The host of the Mongo server, it can also be a list of comma separated hosts for replicas | ||||||||||
| maxWaitTime | The max wait time for a blocking thread for a connection from the pool in ms. | ||||||||||
| port | The port of the Mongo server | ||||||||||
| safe | If the driver sends a getLastError command after every update to ensure it succeeded. | ||||||||||
| slaveOk | Specifies if the driver is allowed to read from secondaries or slaves. | ||||||||||
| socketTimeout | The socket timeout. | ||||||||||
| threadsAllowedToBlockForConnectionMultiplier | Multiplier for connectionsPerHost for # of threads that can block | ||||||||||
| w | If set, the w value of WriteConcern for the connection is set to this. | ||||||||||
| wtimeout | If set, the wtimeout value of WriteConcern for the connection is set to this. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Convert a BasicBSONList into Json.
| |||||||||||
Method invoked when a
MongoSession needs to be created. | |||||||||||
Counts the number of objects that match the given query.
| |||||||||||
Counts the number of objects that match the given query.
| |||||||||||
Creates a new collection.
| |||||||||||
Creates a new GridFSFile in the database, saving the given content, filename,
contentType, and extraData, and answers it.
| |||||||||||
Creates a new index
| |||||||||||
Convert a DBObject into Map.
| |||||||||||
Convert DBObject to Json.
| |||||||||||
Method invoked when the
MongoSession is to be destroyed. | |||||||||||
Deletes a collection and all the objects it contains.
| |||||||||||
Drops an existing index
| |||||||||||
Executes a command on the database
| |||||||||||
Answers if a collection exists given its name
| |||||||||||
Lists all the files that match the given query
| |||||||||||
Lists all the files that match the given query
| |||||||||||
Finds all objects that match a given query.
| |||||||||||
Finds all objects that match a given query.
| |||||||||||
Answers the first file that matches the given query.
| |||||||||||
Answers the first file that matches the given query.
| |||||||||||
Finds the first object that matches a given query.
| |||||||||||
Finds the first object that matches a given query.
| |||||||||||
Answers an inputstream to the contents of the first file that matches the
given query.
| |||||||||||
Answers an inputstream to the contents of the first file that matches the
given queryAttributes.
| |||||||||||
Inserts an object in a collection, setting its id if necessary.
| |||||||||||
Inserts an object in a collection, setting its id if necessary.
| |||||||||||
Convert JSON to DBObject.
| |||||||||||
Lists names of collections available at this database
| |||||||||||
Lists all the files that match the given query, sorting them by filename.
| |||||||||||
Lists all the files that match the given query, sorting them by filename.
| |||||||||||
List existent indices in a collection
| |||||||||||
Transforms a collection into a collection of aggregated groups, by applying a
supplied element-mapping function to each element, that transforms each one
into a key-value pair, grouping the resulting pairs by key, and finally
reducing values in each group applying a suppling 'reduce' function.
| |||||||||||
Convert a BasicBSONList into Json.
| |||||||||||
Removes all the files that match the given query.
| |||||||||||
Removes all the files that match the given query.
| |||||||||||
Removes all the objects that match the a given optional query.
| |||||||||||
Removes all the objects that match the a given optional query.
| |||||||||||
Inserts or updates an object based on its object _id.
| |||||||||||
Inserts or updates an object based on its object _id.
| |||||||||||
Updates objects that matches the given query.
| |||||||||||
Update objects using a mongo function
| |||||||||||
Update objects using a mongo function
| |||||||||||
Updates objects that matches the given query.
| |||||||||||
Updates objects that matches the given query.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
This controls whether the system retries automatically on connection errors.
The connection timeout in milliseconds; this is for establishing the socket connections (open). 0 is default and infinite.
The number of connections allowed per host (the pool size, per host)
The database name of the Mongo server
Sets the fsync value of WriteConcern for the connection.
The host of the Mongo server, it can also be a list of comma separated hosts for replicas
The max wait time for a blocking thread for a connection from the pool in ms.
The port of the Mongo server
If the driver sends a getLastError command after every update to ensure it succeeded.
Specifies if the driver is allowed to read from secondaries or slaves.
The socket timeout. 0 is default and infinite.
Multiplier for connectionsPerHost for # of threads that can block
If set, the w value of WriteConcern for the connection is set to this.
If set, the wtimeout value of WriteConcern for the connection is set to this.
Convert a BasicBSONList into Json.
| input | The input for this transformer |
|---|
Method invoked when a MongoSession needs to be created.
| username | The username to use for authentication. NOTE: Please use a dummy user if you have disabled Mongo authentication |
|---|---|
| password | The password to use for authentication. NOTE: Please use a dummy password if you have disabled Mongo authentication |
MongoSession| ConnectionException |
|---|
Counts the number of objects that match the given query. If no query is passed, returns the number of elements in the collection
| collection | The target collection |
|---|---|
| query | The optional DBObject query for counting objects. Only objects matching it will be counted. If unspecified, all objects are counted. |
Counts the number of objects that match the given query. If no query is passed, returns the number of elements in the collection
| collection | The target collection |
|---|---|
| queryAttributes | The optional query for counting objects. Only objects matching it will be counted. If unspecified, all objects are counted. |
Creates a new collection. If the collection already exists, a MongoException will be thrown.
| collection | The name of the collection to create |
|---|---|
| capped | If the collection will be capped |
| maxObjects | The maximum number of documents the new collection is able to contain |
| size | The maximum size of the new collection |
Creates a new GridFSFile in the database, saving the given content, filename, contentType, and extraData, and answers it.
| payload | The mandatory content of the new gridfs file. It may be a java.io.File, a byte[] or an InputStream. |
|---|---|
| filename | The mandatory name of new file. |
| contentType | The optional content type of the new file |
| metadata | The optional DBObject metadata of the new content type |
| IOException |
|---|
Creates a new index
| collection | The name of the collection where the index will be created |
|---|---|
| field | The name of the field which will be indexed |
| order | The indexing order |
Convert a DBObject into Map.
| input | The input for this transformer |
|---|
Convert DBObject to Json.
| input | The input for this transformer |
|---|
Deletes a collection and all the objects it contains. If the collection does not exist, does nothing.
| collection | The name of the collection to drop |
|---|
Drops an existing index
| collection | The name of the collection where the index is |
|---|---|
| index | The name of the index to drop |
Executes a command on the database
| commandName | The command to execute on the database |
|---|---|
| commandValue | The value for the command |
Answers if a collection exists given its name
| collection | The name of the collection |
|---|
Lists all the files that match the given query
| query | A DBObject query the optional query |
|---|
Lists all the files that match the given query
| queryAttributes | The optional query attributes |
|---|
Finds all objects that match a given query. If no query is specified, all objects of the collection are retrieved. If no fields object is specified, all fields are retrieved.
| collection | The target collection |
|---|---|
| query | The optional DBObject query object. If unspecified, all documents are returned. |
| fields | Alternative way of passing fields as a literal List |
| numToSkip | Number of objects skip (offset) |
| limit | Limit of objects to return |
Finds all objects that match a given query. If no query is specified, all objects of the collection are retrieved. If no fields object is specified, all fields are retrieved.
| collection | The target collection |
|---|---|
| queryAttributes | The optional query object. If unspecified, all documents are returned. |
| fields | Alternative way of passing fields as a literal List |
| numToSkip | Number of objects skip (offset) |
| limit | Limit of objects to return |
Answers the first file that matches the given query. If no object matches it, a MongoException is thrown.
| query | The DBObject mandatory query |
|---|
Answers the first file that matches the given query. If no object matches it, a MongoException is thrown.
| queryAttributes | The mandatory query |
|---|
Finds the first object that matches a given query. Throws a MongoException if no one matches the given query
| collection | The target collection |
|---|---|
| query | The mandatory DBObject query object that the returned object matches. |
| fields | Alternative way of passing fields as a literal List |
Finds the first object that matches a given query. Throws a MongoException if no one matches the given query
| collection | The target collection |
|---|---|
| queryAttributes | The mandatory query object that the returned object matches. |
| fields | Alternative way of passing fields as a literal List |
Answers an inputstream to the contents of the first file that matches the given query. If no object matches it, a MongoException is thrown.
| query | The DBObject mandatory query |
|---|
Answers an inputstream to the contents of the first file that matches the given queryAttributes. If no object matches it, a MongoException is thrown.
| queryAttributes | The mandatory query attributes |
|---|
Inserts an object in a collection, setting its id if necessary.
| collection | The name of the collection where to insert the given object |
|---|---|
| dbObject | A DBObject instance. |
| writeConcern | The optional write concern of insertion |
Inserts an object in a collection, setting its id if necessary.
A shallow conversion into DBObject is performed - that is, no conversion is performed to its values.| collection | The name of the collection where to insert the given object |
|---|---|
| elementAttributes | Alternative way of specifying the element as a literal Map inside a Mule Flow |
| writeConcern | The optional write concern of insertion |
Convert JSON to DBObject.
| input | The input for this transformer |
|---|
Lists names of collections available at this database
Lists all the files that match the given query, sorting them by filename. If no query is specified, all files are listed.
| query | The DBObject optional query |
|---|
Lists all the files that match the given query, sorting them by filename. If no query is specified, all files are listed.
| queryAttributes | The optional query |
|---|
List existent indices in a collection
| collection | The name of the collection |
|---|
Transforms a collection into a collection of aggregated groups, by applying a supplied element-mapping function to each element, that transforms each one into a key-value pair, grouping the resulting pairs by key, and finally reducing values in each group applying a suppling 'reduce' function.
Each supplied function is coded in JavaScript. Note that the correct way of writing those functions may not be obvious; please consult MongoDB documentation for writing them.| collection | The name of the collection to map and reduce |
|---|---|
| mapFunction | A JavaScript encoded mapping function |
| reduceFunction | A JavaScript encoded reducing function |
| outputCollection | The name of the output collection to write the results, replacing previous collection if existed, mandatory when results may be larger than 16MB. If outputCollection is unspecified, the computation is performed in-memory and not persisted. |
Convert a BasicBSONList into Json.
| input | The input for this transformer |
|---|
Removes all the files that match the given query. If no query is specified, all files are removed
| query | The DBObject optional query |
|---|
Removes all the files that match the given query. If no query is specified, all files are removed
| queryAttributes | The optional query |
|---|
Removes all the objects that match the a given optional query. If query is not specified, all objects are removed. However, please notice that this is normally less performant that dropping the collection and creating it and its indices again
| collection | The collection whose elements will be removed |
|---|---|
| query | The optional DBObject query object. Objects that match it will be removed. |
| writeConcern | The write concern used to remove the object |
Removes all the objects that match the a given optional query. If query is not specified, all objects are removed. However, please notice that this is normally less performant that dropping the collection and creating it and its indices again
| collection | The collection whose elements will be removed |
|---|---|
| queryAttributes | The query object. Objects that match it will be removed. |
| writeConcern | The write concern used to remove the object |
Inserts or updates an object based on its object _id.
| collection | The collection where to insert the object |
|---|---|
| element | The mandatory DBObject object to insert. |
| writeConcern | The write concern used to persist the object |
Inserts or updates an object based on its object _id.
| collection | The collection where to insert the object |
|---|---|
| elementAttributes | The mandatory object to insert. |
| writeConcern | The write concern used to persist the object |
| autoConnectRetry |
|---|
| connectTimeout |
|---|
| connectionsPerHost |
|---|
| database |
|---|
| fsync |
|---|
| host |
|---|
| maxWaitTime |
|---|
| port |
|---|
| safe |
|---|
| slaveOk |
|---|
| socketTimeout |
|---|
| threadsAllowedToBlockForConnectionMultiplier |
|---|
| w |
|---|
| wtimeout |
|---|
Updates objects that matches the given query. If parameter multi is set to false, only the first document matching it will be updated. Otherwise, all the documents matching it will be updated.
| collection | The name of the collection to update |
|---|---|
| query | The DBObject query object used to detect the element to update. |
| element | The DBObject mandatory object that will replace that one which matches the query. |
| upsert | If the database should create the element if it does not exist |
| multi | If all or just the first object matching the query will be updated |
| writeConcern | The write concern used to update |
Update objects using a mongo function
| collection | The name of the collection to update |
|---|---|
| function | The function used to execute the update |
| query | The DBObject query object used to detect the element to update. |
| element | The DBObject mandatory object that will replace that one which matches the query. |
| upsert | If the database should create the element if it does not exist |
| multi | If all or just the first object matching the query will be updated |
| writeConcern | The write concern used to update |
Update objects using a mongo function
| collection | The name of the collection to update |
|---|---|
| function | The function used to execute the update |
| queryAttributes | The query object used to detect the element to update. |
| elementAttributes | The mandatory object that will replace that one which matches the query. |
| upsert | If the database should create the element if it does not exist |
| multi | If all or just the first object matching the query will be updated |
| writeConcern | The write concern used to update |
Updates objects that matches the given query. If parameter multi is set to false, only the first document matching it will be updated. Otherwise, all the documents matching it will be updated.
| collection | The name of the collection to update |
|---|---|
| queryAttributes | The query object used to detect the element to update. |
| elementAttributes | The mandatory object that will replace that one which matches the query. |
| upsert | If the database should create the element if it does not exist |
| multi | If all or just the first object matching the query will be updated |
| writeConcern | The write concern used to update |
Updates objects that matches the given query. If parameter multi is set to false, only the first document matching it will be updated. Otherwise, all the documents matching it will be updated.
| collection | The name of the collection to update |
|---|---|
| queryAttributes | The query object used to detect the element to update. |
| element | The DBObject mandatory object that will replace that one which matches the query. |
| upsert | If the database should create the element if it does not exist |
| multi | If all or just the first object matching the query will be updated |
| writeConcern | The write concern used to update |