Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send sticky events? #33

Open
chanonly123 opened this issue Oct 9, 2017 · 6 comments
Open

How to send sticky events? #33

chanonly123 opened this issue Oct 9, 2017 · 6 comments

Comments

@chanonly123
Copy link

No description provided.

@Blankeer
Copy link

+1

@hamedsilver
Copy link

post sticky is very useful plz add it

@cesarferreira
Copy link
Owner

I don't have the time right now, can you please open a pull request?

@iballan
Copy link

iballan commented Apr 3, 2019

@cesarferreira can you give a hint about the best way to add it to SwiftEventBus ? I will work on adding it

@hamedsilver
Copy link

Some events carry information that is of interest after the event is posted. For example, an event signals that some initialization is complete. Or if you have some sensor or location data and you want to hold on the most recent values. Instead of implementing your own caching, you can use sticky events. So EventBus keeps the last sticky event of a certain type in memory. Then the sticky event can be delivered to subscribers or queried explicitly. Thus, you don’t need any special logic to consider already available data

@hamedsilver
Copy link

You can see the java eventbus in this link :
http://greenrobot.org/eventbus/documentation/configuration/sticky-events/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants