Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2163

MongoClient user should have ability to use non default factory implementations

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.2
    • Component/s: API, Configuration
    • Labels:
      None

      There is number of public Interfaces with default implementations used in driver code. But there is no ability to change the desired implementation (to inject users extended versions).
      For example:
      DefaultClusterFactory implements ClusterFactory
      is directly instantiating by name at Mongo.java line 682.

      But as mongo-java-driver user I want to have ability to specify my own ClusterFatory implementation (may be providing class name in MongoClientOptions, or using java SPI, or etc).

      Some of the desired interfaces:
      ClusterFactory -> DefaultClusterFactory
      ClusterableServerFactory -> DefaultClusterableServerFactory
      ServerMonitorFactory -> DefaultServerMonitorFactory
      ConnectionPool -> DefaultConnectionPool
      ServerMonitor -> DefaultServerMonitor

      To have ability to integrate with your code and to override some unnecessary behavior.

            Assignee:
            Unassigned Unassigned
            Reporter:
            stepanovdg@gmail.com Dzmitry Stsiapanau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: