You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2021/03/16 09:43:36 UTC

[GitHub] [jena] afs edited a comment on pull request #954: JENA-2004: Add application methods to Transactional

afs edited a comment on pull request #954:
URL: https://github.com/apache/jena/pull/954#issuecomment-800107707


   From #872:
   An alternative design with `TxnTrait` (the default methods added separately) might be better. This leaves Transaction cleaner as an implementation API.
   
   ```
   public interface TxnTrait extends Transactional {
       public default void exec(TxnType txnType, Runnable r) {
           Txn.exec(this, txnType, r);
       }
   
       public default <X> X calc(TxnType txnType, Supplier<X> r) {
           return Txn.calc(this, txnType, r);
       }
   ...
   }
   ```
   then
   ```
   public interface Dataset extends TxnTrait
   ```
   On the other hand, the API for user/application is then more complicated.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org