rewrite module core monitor using scala; jdk 1.8 -> 1.7