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

Introduce interfaces on core classes such as DBCollection, DB, etc

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.5.3
    • API
    • None

    Description

      We're attempting to add some cross-cutting concerns to the DBCollection class (such as profiling and auditing). We wanted to do so using the JDK Proxy, but unfortunately DBCollection is an abstract class rather than an interface, and JDK Proxy only works on interfaces. We then tried decorating DBCollection, which was only possible by writing our class in the com.mongodb package, since DBCollection has some package-protected abstract methods.

      It would be good practice (and will generally assist users in extending the Mongo driver) if core classes, such as DB, DBCollection, etc were exposed as Java Interfaces rather than being abstract classes.

      Attachments

        Activity

          People

            antoine Antoine Girbal
            electric monk Shai Yallin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: