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

    Constructors
    Constructor
    Description
    ActuatorServerLoadProbeWrapper(org.apache.geode.cache.server.ServerLoadProbe serverLoadProbe)
    Constructs a new instance of ActuatorServerLoadProbeWrapper initialized with the required ServerLoadProbe used as the delegate.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Optional<org.apache.geode.cache.server.ServerLoad>
    Returns the current, most up-to-date details on the ServerLoad if possible.
    Optional<org.apache.geode.cache.server.ServerMetrics>
    Returns the current, provided ServerMetrics if available.
    protected org.apache.geode.cache.server.ServerLoadProbe
    Returns the underlying, wrapped ServerLoadProbe backing this instance.
    org.apache.geode.cache.server.ServerLoad
    getLoad(org.apache.geode.cache.server.ServerMetrics metrics)
     
    void
     

    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 of ActuatorServerLoadProbeWrapper initialized with the required ServerLoadProbe used as the delegate.
      Parameters:
      serverLoadProbe - required ServerLoadProbe.
      Throws:
      IllegalArgumentException - if ServerLoadProbe is null.
      See Also:
      • ServerLoadProbe
  • Method Details

    • getCurrentServerLoad

      public Optional<org.apache.geode.cache.server.ServerLoad> getCurrentServerLoad()
      Returns the current, most up-to-date details on the ServerLoad if possible.
      Returns:
      the current ServerLoad.
      See Also:
    • getCurrentServerMetrics

      public Optional<org.apache.geode.cache.server.ServerMetrics> getCurrentServerMetrics()
      Returns the current, provided ServerMetrics if available.
      Returns:
      the current, provided ServerMetrics if available.
    • getDelegate

      protected org.apache.geode.cache.server.ServerLoadProbe getDelegate()
      Returns the underlying, wrapped ServerLoadProbe 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 interface org.apache.geode.cache.server.ServerLoadProbe
    • open

      public void open()
      Specified by:
      open in interface org.apache.geode.cache.server.ServerLoadProbe
    • close

      public void close()
      Specified by:
      close in interface org.apache.geode.cache.CacheCallback
      Specified by:
      close in interface org.apache.geode.cache.server.ServerLoadProbe