Package org.togglz.mongodb
Class MongoStateRepository.Builder
java.lang.Object
org.togglz.mongodb.MongoStateRepository.Builder
- Enclosing class:
- MongoStateRepository
Builder for a
MongoStateRepository.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newMongoStateRepositoryusing the current settings.collection(String collection) The name of the collection used by the repository to store the feature state.writeConcern(com.mongodb.WriteConcern writeConcern) TheWriteConcernused when accessing the database.
-
Constructor Details
-
Builder
Creates a new builder for aMongoStateRepository.- Parameters:
client- the client instance to use for connecting to MongoDBdbname- the database name used for storing features state.
-
-
Method Details
-
collection
The name of the collection used by the repository to store the feature state. The default istogglz.- Parameters:
collection- The name of the collection to use
-
writeConcern
TheWriteConcernused when accessing the database. By defaultACKNOWLEDGEDwill be used.- Parameters:
writeConcern- TheWriteConcernto use
-
build
Creates a newMongoStateRepositoryusing the current settings.
-