[JAVA-3129] Make all event listener methods default methods Created: 30/Dec/18 Updated: 28/Oct/23 Resolved: 23/Aug/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Monitoring |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | John Stewart (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
With Java 8 as the minimum supported JVM for the 4.0 release, the driver should make all methods in the various event listener interfaces (e.g. ConnectionPoolListener, ClusterListener) default methods, which will allow implementers to declare only the methods for the events in the interface that interest them. For example, implementers of ConnectionPoolListener who are only interested in ConnectionAddedEvent can simply write:
This will also allow us to add new methods to existing event listener interfaces without breaking binary compatibility. |
| Comments |
| Comment by Githook User [ 15/Jan/20 ] |
|
Author: {'name': 'Jeff Yemin', 'username': 'jyemin', 'email': 'jeff.yemin@10gen.com'}Message: Replace use of deprecated event listener adapters Now that all the methods in the event listener interfaces have no-op As a follow-on, replace all internal use of the adapters with
|
| Comment by Githook User [ 15/Jan/20 ] |
|
Author: {'name': 'John Stewart', 'username': 'jstewart-mongo', 'email': 'john.stewart@mongodb.com'}Message: Make all event listener methods default methods
|