类 CachedCategory

java.lang.Object
org.xmeta.thingManagers.CachedCategory
所有已实现的接口:
Category
直接已知子类:
FileCategory, JarCategory, JdbcCategory, RedisCategory

public abstract class CachedCategory extends Object implements Category
子包和模型索引都预先读取并缓存的包。
作者:
zhangyuxiang
  • 字段详细资料

    • childCategorys

      protected List<Category> childCategorys
      子包列表
    • thingIndexs

      protected List<ThingIndex> thingIndexs
      模型索引列表
    • parent

      protected Category parent
      父包
    • name

      protected String name
      包名称
    • thingManager

      protected ThingManager thingManager
      模型管理器
    • refreshed

      protected boolean refreshed
      是否已经刷新过
    • classLoader

      protected ThingClassLoader classLoader
  • 构造器详细资料

  • 方法详细资料

    • getCategory

      public Category getCategory(String name)
      从接口复制的说明: Category
      通过名称返回指定的下级目录。
      指定者:
      getCategory 在接口中 Category
      参数:
      name - 下级目录的名称
      返回:
      下级目录,如果不存在返回null
    • getCategorys

      public List<Category> getCategorys()
      从接口复制的说明: Category
      获取下一级的目录的列表。
      指定者:
      getCategorys 在接口中 Category
      返回:
      下一级目录的列表
    • getName

      public String getName()
      从接口复制的说明: Category
      返回当前目录的名称。
      指定者:
      getName 在接口中 Category
      返回:
      目录的名称
    • getParent

      public Category getParent()
      从接口复制的说明: Category
      返回上级目录。
      指定者:
      getParent 在接口中 Category
      返回:
      上级目录,如果不存在返回null
    • getSimpleName

      public String getSimpleName()
      从接口复制的说明: Category
      返回目录的简写。
      指定者:
      getSimpleName 在接口中 Category
      返回:
      目录名
    • getThing

      public Thing getThing(String thingName)
      从接口复制的说明: Category
      通过模型的名称获得当前目录下的模型。
      指定者:
      getThing 在接口中 Category
      参数:
      thingName - 模型名称
      返回:
      模型,如果不存在返回null
    • getThingIndexs

      public List<ThingIndex> getThingIndexs()
      从接口复制的说明: Category
      返回当前目录下的所有模型的索引列表,不包含子目录。
      指定者:
      getThingIndexs 在接口中 Category
      返回:
      模型的索引列表
    • getThingIndexs

      public List<ThingIndex> getThingIndexs(String descriptor)
      从接口复制的说明: Category
      根据描述返回模型索引列表。
      指定者:
      getThingIndexs 在接口中 Category
      参数:
      descriptor - 描述者
      返回:
      模型索引列表
    • getThingManager

      public ThingManager getThingManager()
      从接口复制的说明: Category
      返回此目录所属的模型管理者。
      指定者:
      getThingManager 在接口中 Category
      返回:
      模型管理者
    • getThings

      public List<Thing> getThings()
      从接口复制的说明: Category
      获得当前目录下的模型列表。 取具体模型是请用World,World负责缓存。
      指定者:
      getThings 在接口中 Category
      返回:
      模型列表
    • getThings

      public List<Thing> getThings(String descriptor)
      从接口复制的说明: Category
      返回指定模型的列表。 取具体模型是请用World,World负责缓存。
      指定者:
      getThings 在接口中 Category
      参数:
      descriptor - 描述者
      返回:
      模型列表
    • iterator

      public Iterator<Thing> iterator(boolean includeChildCategory)
      从接口复制的说明: Category
      遍历当前目录下的所有模型。 取具体模型是请用World,World负责缓存。
      指定者:
      iterator 在接口中 Category
      参数:
      includeChildCategory - 是否包含子目录
      返回:
      模型遍历器
    • iterator

      public Iterator<Thing> iterator(String descriptorPath, boolean includeChildCategory)
      从接口复制的说明: Category
      通过指定的描述者名称遍历当前目录下的所有模型。 取具体模型是请用World,World负责缓存。
      指定者:
      iterator 在接口中 Category
      参数:
      descriptorPath - 描述者的路径
      includeChildCategory - 是否包含子目录
      返回:
      模型遍历器
    • addCategory

      public void addCategory(Category category)
      添加子包。
      参数:
      category - 包
    • addThingIndex

      public void addThingIndex(ThingIndex thingIndex)
      添加模型索引。
      参数:
      thingIndex - 模型索引
    • getClassLoader

      public ThingClassLoader getClassLoader()
      从接口复制的说明: Category
      返回Category对应的ClassLoader。如果当前classLoader为null一般使用父级的classLoader。
      指定者:
      getClassLoader 在接口中 Category
      返回:
    • setClassLoader

      public void setClassLoader(ThingClassLoader classLoader)
      从接口复制的说明: Category
      设置当前Category的类加载器。
      指定者:
      setClassLoader 在接口中 Category