You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by GitBox <gi...@apache.org> on 2021/02/13 21:19:11 UTC

[GitHub] [geronimo-txmanager] efge opened a new pull request #5: Use Clock (DRAFT)

efge opened a new pull request #5:
URL: https://github.com/apache/geronimo-txmanager/pull/5


   Example of what can be done by using a `Clock` to manage time.


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



[GitHub] [geronimo-txmanager] efge commented on pull request #5: Use Clock (DRAFT)

Posted by GitBox <gi...@apache.org>.
efge commented on pull request #5:
URL: https://github.com/apache/geronimo-txmanager/pull/5#issuecomment-778799298


   @rmannibucau as you wish, I can do that.


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



[GitHub] [geronimo-txmanager] efge commented on pull request #5: Use Clock (DRAFT)

Posted by GitBox <gi...@apache.org>.
efge commented on pull request #5:
URL: https://github.com/apache/geronimo-txmanager/pull/5#issuecomment-778805488


   See #6 


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



[GitHub] [geronimo-txmanager] rmannibucau commented on pull request #5: Use Clock (DRAFT)

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #5:
URL: https://github.com/apache/geronimo-txmanager/pull/5#issuecomment-778742873


   Hi @efge , I know it is a draft but as written on the mailing list, it should be a TimeMsProvider SPI you can set on the tx mgr and not a clock hardcoded impl because it is slower on some OS. Otherwise +1.


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



[GitHub] [geronimo-txmanager] efge commented on pull request #5: Use Clock (DRAFT)

Posted by GitBox <gi...@apache.org>.
efge commented on pull request #5:
URL: https://github.com/apache/geronimo-txmanager/pull/5#issuecomment-778792786


   Hi @rmannibucau. I understand the request, but `Clock` *is already* a time provider interface, and the only method we'll use, `Clock.millis()`, can be implemented as fast as needed by someone having the requirements. 


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



[GitHub] [geronimo-txmanager] efge closed pull request #5: Use Clock (DRAFT)

Posted by GitBox <gi...@apache.org>.
efge closed pull request #5:
URL: https://github.com/apache/geronimo-txmanager/pull/5


   


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



[GitHub] [geronimo-txmanager] rmannibucau commented on pull request #5: Use Clock (DRAFT)

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #5:
URL: https://github.com/apache/geronimo-txmanager/pull/5#issuecomment-778795990


   @efge yes and no. The main issue is clock as an API requires 6 methods to be implemented whereas we just need one to evaluate current time (in ms) so I'd use a CurrentTimeMsProvider {now()} interface + SystemCurrentImpl {} + ClockImpl {ClockImpl(Clock)}. Default would be SystemCurrentImpl and you can configure it to use clock one if needed - but note that once you have this interface you just implement a lambda instead of implementing a Clock which is way simpler for testing with is your use case, right?


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