public static class MongoStateRepository.Builder extends Object
MongoStateRepository.| Constructor and Description |
|---|
Builder(com.mongodb.MongoClient client,
String dbname)
Creates a new builder for a
MongoStateRepository. |
| Modifier and Type | Method and Description |
|---|---|
MongoStateRepository |
build()
Creates a new
MongoStateRepository using the current settings. |
MongoStateRepository.Builder |
collection(String collection)
The name of the collection used by the repository to store the feature state.
|
MongoStateRepository.Builder |
writeConcern(com.mongodb.WriteConcern writeConcern)
The
WriteConcern used when accessing the database. |
public Builder(com.mongodb.MongoClient client,
String dbname)
MongoStateRepository.client - the client instance to use for connecting to MongoDBdbname - the database name used for storing features state.public MongoStateRepository.Builder collection(String collection)
togglz.collection - The name of the collection to usepublic MongoStateRepository.Builder writeConcern(com.mongodb.WriteConcern writeConcern)
WriteConcern used when accessing the database. By default ACKNOWLEDGED will be used.writeConcern - The WriteConcern to usepublic MongoStateRepository build()
MongoStateRepository using the current settings.Copyright © 2018. All Rights Reserved.