Upgrading

This version is source and binary compatible with the 0.9.9 version of the driver.

Changes

Performance

  • For the 1.0.0 release the driver was tested against the 10gen supported legacy driver using the YCSB (Yahoo! Cloud Server Benchmark). The results of the benchmark show clearly that the MongoDB Asynchronous Java Driver has lower latency, lower variability in latency and higher throughput across the benchmark scenarios. The complete results and raw data are available.
  • As part of the performance testing with the YCSB several bottlenecks in the driver were identified and corrected. Of particular note is the replacement of the internal blocking queues with a custom implementation inspired by the Disruptor project. This change significantly reduced the latency for inter-thread messaging.

Functional Changes

  • Updated the driver to exclude replica set members not in a primary or secondary mode and to avoid members that fail to respond to a replica-set status command.

Usability

  • Replaced the Document.queryPath(...) methods with the Document.find(...) and Document.findFirst(...) methods. The Document.find(...) and Document.findFirst(...) methods provide the ability to easily extract a nested elements (or sub-documents) from any level of a document. The Document.queryPath(...) methods have been deprecated but will not be removed until after the 1.1.0 release. See the Getting Started guide for examples using the Document.find(...) and Document.findFirst(...) methods.
  • A new Document.get(Class,String) method has been added to allow easier type safe access to first level elements of a Document.
  • Several methods have been added to both the MongoDatabase and MongoCollection interfaces for common administrative functions. These include:
    • MongoDatabase
      • createCollection(...) - Create a collection.
      • createCappedCollection(...) - Create a capped collection.
      • getProfilingStatus() / setProfilingStatus(...) - Manipulate the database's profiling level.
      • stats() - Return the database statistics.
    • MongoCollection
      • explain(...) - Ask the server to explain how a query will be executed.
      • Find.Builder.setHint(...) - Provide the server a hint on what index to use in executing a query.
      • isCapped() - Return if the collection is capped or not.
      • stats() - Return the collection statistics.
      • updateOptions(...) - Set options on the collection. Currently only 'usePowerOf2Sizes' is supported by the MongoDB server.
      • validate(...) - Validate a collection.

Documentation