类 StringPool


  • public class StringPool
    extends java.lang.Object
    StringPool,aim to reduce memory allocation.
    版本:
    $Id: StringPool.java, v 0.1 2020年11月12日 3:05 PM liuzunfei Exp $
    作者:
    liuzunfei, ZZQ
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      private static com.google.common.cache.Cache<java.lang.String,​java.lang.String> groupKeyCache  
    • 构造器概要

      构造器 
      构造器 说明
      StringPool()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static java.lang.String get​(java.lang.String key)
      get singleton string value from the pool.
      static void remove​(java.lang.String key)  
      static long size()  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • groupKeyCache

        private static com.google.common.cache.Cache<java.lang.String,​java.lang.String> groupKeyCache
    • 构造器详细资料

      • StringPool

        public StringPool()
    • 方法详细资料

      • get

        public static java.lang.String get​(java.lang.String key)
        get singleton string value from the pool.
        参数:
        key - key string to be pooled.
        返回:
        value after pooled.
      • size

        public static long size()
      • remove

        public static void remove​(java.lang.String key)