-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Move legacy write operations into driver-legacy #1030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * Abstract base class for legacy write operations. | ||
| */ | ||
| public abstract class BaseWriteOperation implements AsyncWriteOperation<WriteConcernResult>, WriteOperation<WriteConcernResult> { | ||
| class LegacyMixedBulkWriteOperation implements WriteOperation<WriteConcernResult> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is no longer abstract, but the doc still says it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| final boolean retryWrites, final List<? extends WriteRequest> writeRequests) { | ||
| this.writeRequests = notNull("writeRequests", writeRequests); | ||
| isTrueArgument("writeRequests not empty", !writeRequests.isEmpty()); | ||
| this.type = writeRequests.get(0).getType(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be nothing preventing writeRequests from containing requests of different types. We can change this by making the constructor private and exposing static methods that take lists of specific types of requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Changes seem uncontroversial, so merging. |
JAVA-4795