[JAVA-2300] Add conversions between ObjectId and ByteBuffer Created: 06/Sep/16 Updated: 27/Nov/16 Resolved: 13/Oct/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.0 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Tom Dyas | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Add conversions to/from java.nio.ByteBuffer via the new putToByteBuffer method and a new constructor. This is useful for users who want to avoid the GC overhead of allocating a byte array when serializing an ObjectId to bytes. A good example of where this is useful is when serializing or deserializing an ObjectId within a larger ByteBuffer where it does not make sense to allocate a byte array for the sole purpose of extracting the ObjectId from the larger buffer. Pull Request: https://github.com/mongodb/mongo-java-driver/pull/368 |
| Comments |
| Comment by Githook User [ 13/Oct/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Replace conditonal logic with calls to Assertions.notNull and Assertions.isTrueArgument |
| Comment by Githook User [ 13/Oct/16 ] |
|
Author: {u'username': u'tdyas', u'name': u'Tom Dyas', u'email': u'tdyas@foursquare.com'}Message: Add conversions to/from java.nio.ByteBuffer via the new putToByteBuffer method and a new |
| Comment by Jeffrey Yemin [ 12/Oct/16 ] |
|
Pull request: https://github.com/mongodb/mongo-java-driver/pull/368 |
| Comment by Tom Dyas [ 07/Oct/16 ] |
|
Any response to this feature? It links to a PR with tests. |