Class/Object

com.mongodb.spark.config

WriteConfig

Related Docs: object WriteConfig | package config

Permalink

case class WriteConfig(databaseName: String, collectionName: String, connectionString: Option[String] = None, replaceDocument: Boolean = WriteConfig.DefaultReplaceDocument, maxBatchSize: Int = WriteConfig.DefaultMaxBatchSize, localThreshold: Int = ..., writeConcernConfig: WriteConcernConfig = WriteConcernConfig.Default, shardKey: Option[String] = None, forceInsert: Boolean = WriteConfig.DefaultForceInsert, ordered: Boolean = WriteConfig.DefautOrdered) extends MongoCollectionConfig with MongoClassConfig with Product with Serializable

Write Configuration for writes to MongoDB

databaseName

the database name

collectionName

the collection name

connectionString

the optional connection string used in the creation of this configuration.

replaceDocument

replaces the whole document, when saving a Dataset that contains an _id field. If false only updates / sets the fields declared in the Dataset.

maxBatchSize

the maxBatchSize when performing a bulk update/insert. Defaults to 512.

localThreshold

the local threshold in milliseconds used when choosing among multiple MongoDB servers to send a request. Only servers whose ping time is less than or equal to the server with the fastest ping time plus the local threshold will be chosen.

writeConcernConfig

the write concern configuration

shardKey

an optional shardKey in extended form: "{key: 1, key2: 1}". Used when upserting DataSets in sharded clusters.

forceInsert

if true forces the writes to be inserts, even if a Dataset contains an _id field. Default false.

ordered

configures the bulk operation ordered property. Defaults to true

Since

1.0

Linear Supertypes
Product, Equals, MongoClassConfig, MongoCollectionConfig, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WriteConfig
  2. Product
  3. Equals
  4. MongoClassConfig
  5. MongoCollectionConfig
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WriteConfig(databaseName: String, collectionName: String, connectionString: Option[String] = None, replaceDocument: Boolean = WriteConfig.DefaultReplaceDocument, maxBatchSize: Int = WriteConfig.DefaultMaxBatchSize, localThreshold: Int = ..., writeConcernConfig: WriteConcernConfig = WriteConcernConfig.Default, shardKey: Option[String] = None, forceInsert: Boolean = WriteConfig.DefaultForceInsert, ordered: Boolean = WriteConfig.DefautOrdered)

    Permalink

    databaseName

    the database name

    collectionName

    the collection name

    connectionString

    the optional connection string used in the creation of this configuration.

    replaceDocument

    replaces the whole document, when saving a Dataset that contains an _id field. If false only updates / sets the fields declared in the Dataset.

    maxBatchSize

    the maxBatchSize when performing a bulk update/insert. Defaults to 512.

    localThreshold

    the local threshold in milliseconds used when choosing among multiple MongoDB servers to send a request. Only servers whose ping time is less than or equal to the server with the fastest ping time plus the local threshold will be chosen.

    writeConcernConfig

    the write concern configuration

    shardKey

    an optional shardKey in extended form: "{key: 1, key2: 1}". Used when upserting DataSets in sharded clusters.

    forceInsert

    if true forces the writes to be inserts, even if a Dataset contains an _id field. Default false.

    ordered

    configures the bulk operation ordered property. Defaults to true

Type Members

  1. type Self = WriteConfig

    Permalink

    Defines Self as a type that can be used to return a copy of the object i.e.

    Defines Self as a type that can be used to return a copy of the object i.e. a different instance of the same type

    Definition Classes
    WriteConfigMongoClassConfig

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asJavaOptions: Map[String, String]

    Permalink

    Creates a map of options representing the configuration

    Creates a map of options representing the configuration

    returns

    the map representing the configuration values

    Definition Classes
    WriteConfigMongoClassConfig
  6. def asOptions: Map[String, String]

    Permalink

    Creates a map of options representing this config.

    Creates a map of options representing this config.

    returns

    the map representing the config

    Definition Classes
    WriteConfigMongoClassConfig
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val collectionName: String

    Permalink

    the collection name

    the collection name

    Definition Classes
    WriteConfigMongoCollectionConfig
  9. val connectionString: Option[String]

    Permalink

    the optional connection string used in the creation of this configuration.

  10. val databaseName: String

    Permalink

    the database name

    the database name

    Definition Classes
    WriteConfigMongoCollectionConfig
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. val forceInsert: Boolean

    Permalink

    if true forces the writes to be inserts, even if a Dataset contains an _id field.

    if true forces the writes to be inserts, even if a Dataset contains an _id field. Default false.

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val localThreshold: Int

    Permalink

    the local threshold in milliseconds used when choosing among multiple MongoDB servers to send a request.

    the local threshold in milliseconds used when choosing among multiple MongoDB servers to send a request. Only servers whose ping time is less than or equal to the server with the fastest ping time plus the local threshold will be chosen.

  17. val maxBatchSize: Int

    Permalink

    the maxBatchSize when performing a bulk update/insert.

    the maxBatchSize when performing a bulk update/insert. Defaults to 512.

  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. val ordered: Boolean

    Permalink

    configures the bulk operation ordered property.

    configures the bulk operation ordered property. Defaults to true

  22. val replaceDocument: Boolean

    Permalink

    replaces the whole document, when saving a Dataset that contains an _id field.

    replaces the whole document, when saving a Dataset that contains an _id field. If false only updates / sets the fields declared in the Dataset.

  23. val shardKey: Option[String]

    Permalink

    an optional shardKey in extended form: "{key: 1, key2: 1}".

    an optional shardKey in extended form: "{key: 1, key2: 1}". Used when upserting DataSets in sharded clusters.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withOption(key: String, value: String): WriteConfig

    Permalink

    Creates a new config with the options applied

    Creates a new config with the options applied

    key

    the configuration key

    value

    the configuration value

    returns

    an updated config

    Definition Classes
    WriteConfigMongoClassConfig
  29. def withOptions(options: Map[String, String]): WriteConfig

    Permalink

    Creates a new config with the options applied

    Creates a new config with the options applied

    options

    a map of options to be applied to the config

    returns

    an updated config

    Definition Classes
    WriteConfigMongoClassConfig
  30. def withOptions(options: Map[String, String]): WriteConfig

    Permalink

    Creates a new config with the options applied

    Creates a new config with the options applied

    options

    a map of options to be applied to the config

    returns

    an updated config

    Definition Classes
    WriteConfigMongoClassConfig
  31. def writeConcern: WriteConcern

    Permalink

    The WriteConcern that this config represents

    The WriteConcern that this config represents

    returns

    the WriteConcern

  32. val writeConcernConfig: WriteConcernConfig

    Permalink

    the write concern configuration

Inherited from Product

Inherited from Equals

Inherited from MongoClassConfig

Inherited from MongoCollectionConfig

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped