Use a delegate object for `MonitorAware` events
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading the MonitorAware and MutableEvent implementations and tracing how monitoring listeners receive event objects. Compare that flow with record and inheritable events; the work is complete when the delegate-object approach is defined and the existing MutableEvent-only limitation is removed without leaving the monitoring behavior ambiguous.
Written by the indexing model from the issue text.
Description
The way the experimental MonitorAware characteristic works is that it is tied to the MutableEvent object, whose internals have tracking for the monitoring state. This allows the same event object to be passed into the listener for that event.
An idea that I have to solve needing to tie monitor-awareness to MutableEvent is to instead prompt the event to return an instance of the event that would be used for monitoring listeners. For record events, this would just be themselves since they are immutable. But for inheritable events, it would be possible to return a subtype of the event where setters throw exceptions and getters for collections return unmodifiable views. While this would be more expensive than the system currently in place, it would be far more versatile, additionally removing the limitation of needing it to strictly be a subtype of MutableEvent.
- Dominant language
- Java
- Stars
- 46
- Forks
- 39
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MinecraftForge/EventBus
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
MinecraftForge/EventBus#87 · 2 comments · 1 reaction ·
All issues in MinecraftForge/EventBus
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100