Skip to content

Commit

Permalink
improve: named event sources and related changes (#2340)
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
Co-authored-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
  • Loading branch information
csviri and metacosm committed Sep 18, 2024
1 parent 2bce2e2 commit 190555c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,13 @@ default Optional<R> getSecondaryResource(P primary) {
default Status getStatus() {
return Status.UNKNOWN;
}

default String name() {
return generateName(this);
}

static String generateName(EventSource eventSource) {
return eventSource.getClass().getName() + "@" + Integer.toHexString(eventSource.hashCode());
}

}

0 comments on commit 190555c

Please sign in to comment.