/** * Creates a new collection. If the collection already exists, a MongoException will be thrown. * * <p>{@sample.xml ../../../doc/mongo-connector.xml.sample mongo:create-collection} * * @param collection the name of the collection to create * @param capped if the collection will be capped * @param maxObjects the maximum number of documents the new collection is able to contain * @param size the maximum size of the new collection */ @Processor public void createCollection( String collection, @Optional @Default(CAPPED_DEFAULT_VALUE) boolean capped, @Optional Integer maxObjects, @Optional Integer size) { client.createCollection(collection, capped, maxObjects, size); }