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

Added three frequency levels for resource watching #6896

Closed
wants to merge 1 commit into from
Closed

Added three frequency levels for resource watching #6896

wants to merge 1 commit into from

Conversation

uboness
Copy link
Contributor

@uboness uboness commented Jul 16, 2014

It's now possible to register watchers along with a specified check frequency. There are three frequencies: low, medium, high. Each one is associated with a check interval that determines how frequent the watchers will check for changes and notify listeners if needed. By default, the intervals are 5s, 30s and 60s respectively, but they can also be customized in the settings. also:

  • Added the WatcherHandle construct by which one can stop it (remove it) and resume it (re add it). Also provides access to the watcher itself and the frequency by which it's checked
  • Changed the default frequency to 30 seconds interval (used to be 60 seconds). The only watcher that is currently effected by this is the script watcher (now auto-loading scripts will auto-load every 30 seconds if changed)


public void resume() {
monitor.watchers.add(watcher);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be sanity checks that you cannot resume a watcher that is already running (so that the watcher doesn't run twice).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe alternatively use a CopyOnWriteArraySet instead of a list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooooooo... good one!

 It's now possible to register watchers along with a specified check frequency. There are three frequencies: low, medium, high. Each one is associated with a check interval that determines how frequent the watchers will check for changes and notify listeners if needed. By default, the intervals are 5s, 30s and 60s respectively, but they can also be customized in the settings. also:

  - Added the WatcherHandle construct by which one can stop it (remove it) and resume it (re add it). Also provices access to the watchers itself and the frequency by which it's checked
  - Change the default frequency to 30 seconds interval (used to be 60 seconds). The only watcher that is currently effected by this is the script watcher (now auto-loading scripts will auto-load every 30 seconds if changed)
@jpountz
Copy link
Contributor

jpountz commented Jul 17, 2014

LGTM

@uboness uboness removed the review label Jul 17, 2014
@uboness
Copy link
Contributor Author

uboness commented Jul 17, 2014

closed by cc8f7dd

@uboness uboness closed this Jul 17, 2014
@uboness uboness deleted the enhance/resource_watcher branch July 19, 2014 14:15
@clintongormley clintongormley changed the title Added three frequency levels for resource watching Internal: Added three frequency levels for resource watching Sep 8, 2014
@clintongormley clintongormley changed the title Internal: Added three frequency levels for resource watching Added three frequency levels for resource watching Jun 7, 2015
@clintongormley clintongormley added the :Core/Infra/Settings Settings infrastructure and APIs label Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants