Extending availabilityContext to support isEnabled() ?

Heiko W.Rupp hrupp at redhat.com
Wed Jul 4 08:02:20 UTC 2012


Hi,

I was looking at https://bugzilla.redhat.com/show_bug.cgi?id=797331#c4
and here it would be handy to have some AvailabilityContext.isEnabled() 
method.
Looking at AvailContextImpl I see that the .enable() and .disable() methods
call the server, which is IMO not suited for .isEnabled(), as this may be called
much more often and would be too heavy weight.

I wonder if we should store the enablement in the AvailabilityContext of
each resource and update on .disable() and .enable() calls accordingly,
so that a call to .isEnabled() would be a simple cheap check

  Heiko

-- 
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C, 
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer:  Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera



More information about the rhq-devel mailing list