Class MongoStateRepository

  • All Implemented Interfaces:
    StateRepository

    public class MongoStateRepository
    extends Object
    implements StateRepository

    A state repository which stores the feature state in a MongoDB database.

    The class provides a builder which can be used to configure the repository:

     StateRepository repository = MongoStateRepository
         .newBuilder(mongoClient, "mydb")
         .collection("togglz")
         .writeConcern(WriteConcern.REPLICA_ACKNOWLEDGED)
         .build();
     
    Author:
    Christian Kaltepoth