pjfanning opened a new pull request, #1528:
URL: https://github.com/apache/pekko-connectors/pull/1528

   follow up to #1526 
   
   `CouchbaseFlow` and `CouchbaseSink` in the `javadsl` package exposed `T => 
String` (Scala `Function1`) in their public API, making them unusable from Java.
   
   ### `CouchbaseFlow`
   Deprecated Scala-function overloads (since 2.0.0) and added new overloads 
accepting `java.util.function.Function[T, String]` for: `insert`, `replace`, 
`upsert`, `remove`, `exists`, `touchDuration`, `touchInstant`.
   
   Default parameter values are preserved on the deprecated overloads to avoid 
breaking existing Scala callers.
   
   ### `CouchbaseSink`
   Updated the non-deprecated methods to accept `java.util.function.Function[T, 
String]` for: `insert`, `upsert`, `replace`, `remove`, `exists`. 
Already-deprecated `*Future` methods are left unchanged.
   
   ### Usage (Java)
   ```java
   // Before: required a Scala Function1 — not usable from Java
   // After: standard Java lambda
   CouchbaseFlow.insert(doc -> doc.getId(), InsertOptions.insertOptions())
   CouchbaseSink.remove(doc -> doc.getId(), RemoveOptions.removeOptions())
   ```
   
   Internally, `applyId.apply` is used to eta-expand the Java function into the 
Scala `T => String` expected by the `scaladsl` layer.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to