Handler Caching #37

Merged
kske merged 5 commits from f/handler-caching into develop 2022-01-18 17:11:38 +01:00
Owner

Closes #20

Closes #20
kske self-assigned this 2022-01-18 13:48:21 +01:00
kske added 2 commits 2022-01-18 13:48:22 +01:00
Add handler cache
All checks were successful
zdm/event-bus/pipeline/head This commit looks good
5468bddb35
The cache has the same structure as the bindings and is updated
accordingly. To ensure the correctness and efficiency of the cache, more
testing has to be conducted.
Test binding cache
All checks were successful
zdm/event-bus/pipeline/head This commit looks good
ee9d08b2b8
kske requested review from delvh 2022-01-18 13:48:25 +01:00
kske added 1 commit 2022-01-18 15:00:21 +01:00
Simplify binding cache usage
All checks were successful
zdm/event-bus/pipeline/head This commit looks good
8609c6a90c
delvh approved these changes 2022-01-18 16:08:47 +01:00
@ -405,0 +435,4 @@
var it = binding.iterator();
while (it.hasNext()) {
var handler = it.next();
if (handler.getListener() == listener) {
Owner

Maybe add a comment on why == instead of equals.

Maybe add a comment on why `==` instead of `equals`.
Author
Owner

As we implicitly test using equals in registerListener(...), I will change this as well.

As we implicitly test using `equals` in `registerListener(...)`, I will change this as well.
kske marked this conversation as resolved
@ -67,0 +71,4 @@
@Test
void testBindingCache() {
String executionOrder = bus.debugExecutionOrder(SimpleEventSub.class);
System.out.println(executionOrder);
Owner

Why?

Why?
kske marked this conversation as resolved
kske added 1 commit 2022-01-18 17:09:07 +01:00
kske added 1 commit 2022-01-18 17:09:23 +01:00
Remove print statements from test
All checks were successful
zdm/event-bus/pipeline/head This commit looks good
8fae4f6d76
kske merged commit cc5c07079a into develop 2022-01-18 17:11:38 +01:00
kske deleted branch f/handler-caching 2022-01-18 17:11:38 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: zdm/event-bus#37
No description provided.