Class SingletonRepository<T>


  • public class SingletonRepository<T>
    extends Object
    避免多个相同内容的实例的工具类。比如,可以用来缓存客户端IP。
    Author:
    Nacos
    • Constructor Detail

      • SingletonRepository

        public SingletonRepository()
    • Method Detail

      • getSingleton

        public T getSingleton​(T obj)
      • size

        public int size()
      • remove

        public void remove​(Object obj)
        必须小心使用。
        Parameters:
        obj - obj