Class AbstractRegistry<T>

java.lang.Object
org.aoju.bus.goalie.registry.AbstractRegistry<T>
All Implemented Interfaces:
Registry<T>, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
DefaultAssetsRegistry, DefaultLimiterRegistry

public abstract class AbstractRegistry<T> extends Object implements Registry<T>, org.springframework.beans.factory.InitializingBean
抽象注册类
Since:
Java 17+
Author:
Justubborn
  • Constructor Details

    • AbstractRegistry

      public AbstractRegistry()
  • Method Details

    • init

      public abstract void init()
      Description copied from interface: Registry
      初始化
      Specified by:
      init in interface Registry<T>
    • add

      public boolean add(String key, T reg)
      Description copied from interface: Registry
      添加
      Specified by:
      add in interface Registry<T>
      Parameters:
      key - id;
      reg - 路由
      Returns:
      true or false
    • remove

      public boolean remove(String id)
      Description copied from interface: Registry
      删除
      Specified by:
      remove in interface Registry<T>
      Parameters:
      id - id
      Returns:
      true or false
    • amend

      public boolean amend(String key, T reg)
      Description copied from interface: Registry
      修改
      Specified by:
      amend in interface Registry<T>
      Parameters:
      key - id
      reg - 路由
      Returns:
      true or false
    • refresh

      public void refresh()
      Description copied from interface: Registry
      刷新路由
      Specified by:
      refresh in interface Registry<T>
    • get

      public T get(String key)
      Description copied from interface: Registry
      获取路由
      Specified by:
      get in interface Registry<T>
      Parameters:
      key - 路由标识
      Returns:
      路由列表
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean