类 CachedCategory
- java.lang.Object
-
- org.xmeta.thingManagers.CachedCategory
-
- 所有已实现的接口:
Category
- 直接已知子类:
FileCategory,JarCategory,JdbcCategory,RedisCategory
public abstract class CachedCategory extends Object implements Category
子包和事物索引都预先读取并缓存的包。- 作者:
- zhangyuxiang
-
-
字段概要
字段 修饰符和类型 字段 说明 protected List<Category>childCategorys子包列表protected ThingClassLoaderclassLoaderprotected Stringname包名称protected Categoryparent父包protected booleanrefreshed是否已经刷新过protected List<ThingIndex>thingIndexs事物索引列表protected ThingManagerthingManager事物管理器
-
构造器概要
构造器 构造器 说明 CachedCategory(ThingManager thingManager, Category parent, String name)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddCategory(Category category)添加子包。voidaddThingIndex(ThingIndex thingIndex)添加事物索引。CategorygetCategory(String name)通过名称返回指定的下级目录。List<Category>getCategorys()获取下一级的目录的列表。ThingClassLoadergetClassLoader()返回Category对应的ClassLoader。StringgetName()返回当前目录的名称。CategorygetParent()返回上级目录。StringgetSimpleName()返回目录的简写。ThinggetThing(String thingName)通过事物的名称获得当前目录下的事物。List<ThingIndex>getThingIndexs()返回当前目录下的所有事物的索引列表,不包含子目录。List<ThingIndex>getThingIndexs(String descriptor)根据描述返回事物索引列表。ThingManagergetThingManager()返回此目录所属的事物管理者。List<Thing>getThings()获得当前目录下的事物列表。List<Thing>getThings(String descriptor)返回指定事物的列表。Iterator<Thing>iterator(boolean includeChildCategory)遍历当前目录下的所有事物。Iterator<Thing>iterator(String descriptorPath, boolean includeChildCategory)通过指定的描述者名称遍历当前目录下的所有事物。voidsetClassLoader(ThingClassLoader classLoader)设置当前Category的类加载器。-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.xmeta.Category
getFilePath, refresh, refresh
-
-
-
-
字段详细资料
-
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
-
-
构造器详细资料
-
CachedCategory
public CachedCategory(ThingManager thingManager, Category parent, String name)
-
-
方法详细资料
-
getCategory
public Category getCategory(String name)
从接口复制的说明:Category通过名称返回指定的下级目录。- 指定者:
getCategory在接口中Category- 参数:
name- 下级目录的名称- 返回:
- 下级目录,如果不存在返回null
-
getCategorys
public List<Category> getCategorys()
从接口复制的说明:Category获取下一级的目录的列表。- 指定者:
getCategorys在接口中Category- 返回:
- 下一级目录的列表
-
getSimpleName
public String getSimpleName()
从接口复制的说明:Category返回目录的简写。- 指定者:
getSimpleName在接口中Category- 返回:
- 目录名
-
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(String descriptor)
从接口复制的说明:Category返回指定事物的列表。 取具体事物是请用World,World负责缓存。
-
iterator
public Iterator<Thing> iterator(boolean includeChildCategory)
从接口复制的说明:Category遍历当前目录下的所有事物。 取具体事物是请用World,World负责缓存。
-
iterator
public Iterator<Thing> iterator(String descriptorPath, boolean includeChildCategory)
从接口复制的说明:Category通过指定的描述者名称遍历当前目录下的所有事物。 取具体事物是请用World,World负责缓存。
-
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
-
-