object ManagementFactory
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ManagementFactory
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getGarbageCollectorMXBeans(): List[GarbageCollectorMXBean]
Returns a list of GarbageCollectorMXBean.
Returns a list of GarbageCollectorMXBean.
val gcBean = ManagementFactory.getGarbageCollectorMXBeans().get(0) println(s"Total collection time (ms): $${gcBean.getCollectionTime()}")
Example: - def getMemoryMXBean(): MemoryMXBean
Returns the memory-specific bean.
Returns the memory-specific bean.
val memoryBean = ManagementFactory.getMemoryMXBean() println(s"current heap: $${memoryBean.getHeapMemoryUsage().getUsed()}") val list = List.fill(Short.MaxValue)(0) // allocate memory println(s"current heap: $${memoryBean.getHeapMemoryUsage().getUsed()}")
Example: - def getMemoryManagerMXBeans(): List[MemoryManagerMXBean]
Returns a list of MemoryManagerMXBean.
Returns a list of MemoryManagerMXBean.
val mmBean = ManagementFactory.getMemoryManagerMXBeans().get(0) println(s"Memory manager: $${mmBean.getName()}")
Example: - def getOperatingSystemMXBean(): OperatingSystemMXBean
Returns the OS-specific bean.
Returns the OS-specific bean.
val osBean = ManagementFactory.getOperatingSystemMXBean() println(s"OS: $${osBean.getName()}")
Example: - def getRuntimeMXBean(): RuntimeMXBean
Returns the runtime-specific bean.
Returns the runtime-specific bean.
val runtimeBean = ManagementFactory.getRuntimeMXBean() println(s"pid: $${runtimeBean.getPid()}")
Example: - def getThreadMXBean(): ThreadMXBean
Returns the thread-specific bean.
Returns the thread-specific bean.
val threadBean = ManagementFactory.getThreadMXBean() println(s"total threads: $${threadBean.getThreadCount()}")
Example: - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: scala.Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: scala.Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: scala.Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()