类 MemoryLimitCalculator

    • 构造器详细资料

      • MemoryLimitCalculator

        public MemoryLimitCalculator()
    • 方法详细资料

      • maxAvailable

        public static long maxAvailable()
        Get the maximum available memory of the current JVM.
        返回:
        maximum available memory
      • calculate

        public static long calculate​(float percentage)
        Take the current JVM's maximum available memory as a percentage of the result as the limit.
        参数:
        percentage - percentage
        返回:
        available memory
      • defaultLimit

        public static long defaultLimit()
        By default, it takes 80% of the maximum available memory of the current JVM.
        返回:
        available memory