前几日,下了班在家时突然收到监控报警,线上一组业务机器 CPU 被打满至 100%,为了保持服务的稳定运行,临时采取了升级配置、加机器等粗暴的方法将当晚扛了过去。
Java 为什么对常量的修改没有生效?
写这篇文章的起因是前几天同事改了一个常量类中的提示,发布到测试环境后没有生效,正好看 《Java 解惑(谜题 93: 类的战争)》 提到了这个问题,所以写篇文章记录一下。
以下均使用命令行进行演示,至于为什么没有使用 IDE 后面会提到。
先看一个简单的 Constants 类:
1 | /** |
Awesome Linux tools
Java Mission Control
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collection framework built into the Oracle JDK. It allows Java administrators and developers to gather detailed low level information about how the Java Virtual Machine (JVM) and the Java application are behaving. Java Mission Control is an advanced set of tools that enables efficient and detailed analysis of the extensive of data collected by Java Flight Recorder. The tool chain enables developers and administrators to collect and analyze data from Java applications running locally or deployed in production environments.
题图为监测 pull-readhub.me 的示例数据。