Class

io.github.lhotari.akka.http.health

LowMemoryDetector

Related Doc: package health

Permalink

class LowMemoryDetector extends HealthChecker

Detects low memory condition by using JMX API for consuming memory usage and garbage collection notification events.

Uses MemoryPoolMXBean's JMX API to set collection usage threshold. The listener is registered to MemoryMXBean. Garbage collection notification API is also used. This is used to detect if memory usage drops below the threshold after crossing the threshold.

Linear Supertypes
HealthChecker, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LowMemoryDetector
  2. HealthChecker
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LowMemoryDetector(occupiedHeapPercentageThreshold: Int = 90, gcBeans: Seq[GarbageCollectorMXBean] = ..., memoryPoolBeans: Seq[MemoryPoolMXBean] = ..., memoryBean: MemoryMXBean = ManagementFactory.getMemoryMXBean)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def enteredLowMemoryState(space: MemoryUsage): Unit

    Permalink
    Attributes
    protected
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def exitedLowMemoryState(space: MemoryUsage): Unit

    Permalink
    Attributes
    protected
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def findTenuredSpaceGcBeans(): Seq[GarbageCollectorMXBean]

    Permalink
  12. def findTenuredSpaceMemoryPoolBean(): MemoryPoolMXBean

    Permalink
  13. val gcBeans: Seq[GarbageCollectorMXBean]

    Permalink
  14. val gcListener: NotificationListener

    Permalink
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def handleGcNotification(info: GarbageCollectionNotificationInfo): Unit

    Permalink
    Attributes
    protected
  17. def handleMemoryCollectionThresholdExceeded(info: MemoryNotificationInfo): Unit

    Permalink
    Attributes
    protected
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. def isHealthy(): Boolean

    Permalink
    Definition Classes
    LowMemoryDetectorHealthChecker
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def logErrorMessage(message: String): Unit

    Permalink
    Attributes
    protected
  22. def lowMemoryDetected: Boolean

    Permalink
  23. val memoryBean: MemoryMXBean

    Permalink
  24. val memoryListener: NotificationListener

    Permalink
  25. val memoryPoolBeans: Seq[MemoryPoolMXBean]

    Permalink
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. val occupiedHeapPercentageThreshold: Int

    Permalink
  30. def start(): Unit

    Permalink
    Definition Classes
    LowMemoryDetectorHealthChecker
  31. def stop(): Unit

    Permalink
    Definition Classes
    LowMemoryDetectorHealthChecker
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from HealthChecker

Inherited from AnyRef

Inherited from Any

Ungrouped