jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Make LowResourceMonitor extendable

Open blazespinnaker opened this issue 7 years ago • 10 comments

LowResourceMonitor is a useful foundation for managing low resources in a jetty instance. In particular, I'd like to be able to extend it to monitor DB connections and certain other resources. Adding a dependency injection function to override to be called by monitor and the ability to access _cause in a subclass would be useful.

blazespinnaker avatar Aug 05 '18 05:08 blazespinnaker

@olamy are you going to make that commit (on your branch) a PR?

joakime avatar Aug 15 '18 19:08 joakime

@joakime still need to look at the test failure

olamy avatar Aug 15 '18 21:08 olamy

pr merged

olamy avatar Aug 23 '18 11:08 olamy

@olamy there is some work to do for this issue.

Interface LowResourceCheck was not public, see #3193.

Also, that interface makes little sense. It has 2 methods, but getReason() is never called. Furthermore, having 2 methods makes the information on low resources not atomic, so the wrong information may be returned.

This whole issue needs to be rethought and redesigned more carefully.

sbordet avatar Dec 10 '18 13:12 sbordet

@sbordet the idea was too keep maximum of backward compat. What about something such

    public interface LowResourceCheck
    {
        LowResourceStatus getLowResourceStatus();
    }

    public class LowResourceStatus
    {
        public boolean isLowOnResources() {
        }

        public String getReason(){
        }
    }


Something more simple could be

    public interface LowResourceCheck
    {
        boolean isLowOnResources();
    }

And the reason is printed in the log. WDYT?

olamy avatar Feb 27 '19 02:02 olamy

This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 27 '20 04:02 stale[bot]

This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 09 '21 02:06 stale[bot]

This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 10 '22 00:06 github-actions[bot]

This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 11 '23 00:06 github-actions[bot]