Class ActuatorServerLoadProbeWrapper
java.lang.Object
org.springframework.geode.boot.actuate.health.support.ActuatorServerLoadProbeWrapper
- All Implemented Interfaces:
org.apache.geode.cache.CacheCallback
,org.apache.geode.cache.Declarable
,org.apache.geode.cache.server.ServerLoadProbe
public class ActuatorServerLoadProbeWrapper
extends Object
implements org.apache.geode.cache.server.ServerLoadProbe
The ActuatorServerLoadProbeWrapper class is an implementation of Apache Geode's
ServerLoadProbe
interface
used to capture the current ServerMetrics
and access the latest ServerLoad
details.- Since:
- 1.0.0
- See Also:
-
ServerLoad
ServerLoadProbe
ServerMetrics
-
Constructor Summary
ConstructorDescriptionActuatorServerLoadProbeWrapper
(org.apache.geode.cache.server.ServerLoadProbe serverLoadProbe) Constructs a new instance ofActuatorServerLoadProbeWrapper
initialized with the requiredServerLoadProbe
used as the delegate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Optional<org.apache.geode.cache.server.ServerLoad>
Returns the current, most up-to-date details on theServerLoad
if possible.Optional<org.apache.geode.cache.server.ServerMetrics>
Returns the current, providedServerMetrics
if available.protected org.apache.geode.cache.server.ServerLoadProbe
Returns the underlying, wrappedServerLoadProbe
backing this instance.org.apache.geode.cache.server.ServerLoad
getLoad
(org.apache.geode.cache.server.ServerMetrics metrics) void
open()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Constructor Details
-
ActuatorServerLoadProbeWrapper
public ActuatorServerLoadProbeWrapper(org.apache.geode.cache.server.ServerLoadProbe serverLoadProbe) Constructs a new instance ofActuatorServerLoadProbeWrapper
initialized with the requiredServerLoadProbe
used as the delegate.- Parameters:
serverLoadProbe
- requiredServerLoadProbe
.- Throws:
IllegalArgumentException
- ifServerLoadProbe
is null.- See Also:
-
ServerLoadProbe
-
-
Method Details
-
getCurrentServerLoad
Returns the current, most up-to-date details on theServerLoad
if possible.- Returns:
- the current
ServerLoad
. - See Also:
-
ServerLoad
getCurrentServerMetrics()
Optional
-
getCurrentServerMetrics
Returns the current, providedServerMetrics
if available.- Returns:
- the current, provided
ServerMetrics
if available.
-
getDelegate
protected org.apache.geode.cache.server.ServerLoadProbe getDelegate()Returns the underlying, wrappedServerLoadProbe
backing this instance.- Returns:
- the underlying, wrapped
ServerLoadProbe
. - See Also:
-
ServerLoadProbe
-
getLoad
public org.apache.geode.cache.server.ServerLoad getLoad(org.apache.geode.cache.server.ServerMetrics metrics) - Specified by:
getLoad
in interfaceorg.apache.geode.cache.server.ServerLoadProbe
-
open
public void open()- Specified by:
open
in interfaceorg.apache.geode.cache.server.ServerLoadProbe
-
close
public void close()- Specified by:
close
in interfaceorg.apache.geode.cache.CacheCallback
- Specified by:
close
in interfaceorg.apache.geode.cache.server.ServerLoadProbe
-