esbtools / event-handler

Notification in, document out.
GNU General Public License v3.0
3 stars 6 forks source link

Add TTL to all lightblue locks by way of LockStrategy #8

Closed alechenninger closed 8 years ago

alechenninger commented 8 years ago

Abstracting out this concept and injecting it also makes it much easier to test concurrent scenarios.

Still WIP:

alechenninger commented 8 years ago

Ready for review @bserdar @kahowell

alechenninger commented 8 years ago

I will add some tests specifically for the lightblue lock strategy, but since this likely won't change much, should still be good to review, just wait to merge until I add those tests and those are reviewed

alechenninger commented 8 years ago

Tests done

alechenninger commented 8 years ago

There is some additional locking that will be needed in the future for recovering processing events or notifications which failed to update to a processed status. I will do this in another PR.

alechenninger commented 8 years ago

TODO:

There are some other error scenarios that are broken still, but I think I will fix them in another PR at this point b/c this is getting way too large.

bserdar commented 8 years ago

A minor point: For both notificationRepository and documenteventrepository: consider renaming retrieveXXXUpTo(int maxEvents) to retrieveXXXBatch(), with batch size configured with the concrete implementation (in repository config). Might make things easier.