Skip navigation links
A B C D E F G H I J K L M N O P Q R S T U V W _ 

A

add(String, Supplier<Object>) - Method in class cn.xnatural.app.util.Copier
手动添加额外属性源 NOTE: 会优先于 源对象中的属性
add(String, BiFunction<S, T, Object>) - Method in class cn.xnatural.app.util.Copier
手动添加额外属性源 NOTE: 会优先于 源对象中的属性
add(VProcessor) - Method in class cn.xnatural.app.v.VChain
添加V处理器
addConverter(String, Function) - Method in class cn.xnatural.app.util.Copier
添加属性值转换器
addSource(Object, String) - Method in class cn.xnatural.app.AppContext
添加对象源 AppContext.ep() 会找出source对象中所有其暴露的功能.
addSource(Object...) - Method in class cn.xnatural.app.AppContext
添加对象源 AppContext.ep() 会找出source对象中所有其暴露的功能.
app() - Method in class cn.xnatural.app.ServerTpl
当前应用上下文
AppContext - Class in cn.xnatural.app
应用执行上下文 1.
AppContext() - Constructor for class cn.xnatural.app.AppContext
 
apply() - Method in interface cn.xnatural.app.Recursion
用于递归栈帧之间的连接,惰性求值
async(Runnable, Consumer<Throwable>) - Method in class cn.xnatural.app.ServerTpl
异步执行.
async(Runnable) - Method in class cn.xnatural.app.ServerTpl
异步执行.
attrs(String) - Method in class cn.xnatural.app.AppContext
属性集:一组属性
attrs() - Method in class cn.xnatural.app.ServerTpl
当前服务的属性集

B

baseDir(String) - Static method in class cn.xnatural.app.Utils
项目根目录下边找目录或文件
bean(Class<T>, String) - Method in class cn.xnatural.app.AppContext
全局查找 bean 对象
bean(Class<T>, String) - Method in class cn.xnatural.app.ServerTpl
全局查找 bean
bean(Class<T>) - Method in class cn.xnatural.app.ServerTpl
全局查找 bean
beanCtx - Variable in class cn.xnatural.app.ServerTpl
bean 容器.
bodyStr - Variable in class cn.xnatural.app.util.Httper
 
build() - Method in class cn.xnatural.app.util.Copier
对象属性之前的copy
buildUrl(String, Map<String, Object>) - Static method in class cn.xnatural.app.Utils
把查询参数添加到 url 后边

C

CacheSrv - Class in cn.xnatural.app
简单内存缓存服务
CacheSrv(String) - Constructor for class cn.xnatural.app.CacheSrv
 
CacheSrv() - Constructor for class cn.xnatural.app.CacheSrv
 
CacheSrv.Record - Class in cn.xnatural.app
缓存记录
call(Recursion<T>) - Static method in interface cn.xnatural.app.Recursion
统一结构的方法,获得当前递归的下一个递归
call(String, Object...) - Method in class cn.xnatural.app.util.DB
执行一个存储过程
charset - Variable in class cn.xnatural.app.util.Httper
 
charset(String) - Method in class cn.xnatural.app.util.Httper
 
clear() - Method in class cn.xnatural.app.Lazier
清除
close() - Method in class cn.xnatural.app.util.DB
 
cn.xnatural.app - package cn.xnatural.app
 
cn.xnatural.app.util - package cn.xnatural.app.util
 
cn.xnatural.app.v - package cn.xnatural.app.v
 
connectTimeout - Variable in class cn.xnatural.app.util.Httper
 
connectTimeout(int) - Method in class cn.xnatural.app.util.Httper
 
contentType - Variable in class cn.xnatural.app.util.Httper
 
contentType(String) - Method in class cn.xnatural.app.util.Httper
设置 content-type
cookie(String, Object) - Method in class cn.xnatural.app.util.Httper
 
cookies - Variable in class cn.xnatural.app.util.Httper
 
cookies() - Method in class cn.xnatural.app.util.Httper
 
Copier<S,T> - Class in cn.xnatural.app.util
对象拷贝工具 支持: 对象 转 map 对象 转 javabean
Copier(S, T) - Constructor for class cn.xnatural.app.util.Copier
 
copier(S, T) - Static method in class cn.xnatural.app.Utils
对象 复制器
createDataSource(Map<String, Object>) - Static method in class cn.xnatural.app.util.DB
创建一个 数据源
CS - Static variable in class cn.xnatural.app.Utils
 
customEnv(Map<String, Object>) - Method in class cn.xnatural.app.AppContext
额外自定义环境配置

D

dataSource - Variable in class cn.xnatural.app.util.DB
 
DB - Class in cn.xnatural.app.util
数据库 sql 操作工具
DB(DataSource) - Constructor for class cn.xnatural.app.util.DB
创建一个 DB
DB(Map<String, Object>) - Constructor for class cn.xnatural.app.util.DB
创建一个 DB
DB(String) - Constructor for class cn.xnatural.app.util.DB
创建一个DB
DB(String, String, String) - Constructor for class cn.xnatural.app.util.DB
创建一个DB
DB(String, Integer, Integer) - Constructor for class cn.xnatural.app.util.DB
创建一个DB
DB(String, String, String, Integer, Integer) - Constructor for class cn.xnatural.app.util.DB
创建一个DB
debug - Variable in class cn.xnatural.app.util.Httper
 
debug() - Method in class cn.xnatural.app.util.Httper
 
delete(String) - Method in class cn.xnatural.app.util.Httper
 
Devourer - Class in cn.xnatural.app
对列执行器 按顺序执行添加的Runnable 当需要按顺序控制任务 一个一个, 两个两个...
Devourer(String, Executor) - Constructor for class cn.xnatural.app.Devourer
创建对列
Devourer(String) - Constructor for class cn.xnatural.app.Devourer
创建对列
Devourer() - Constructor for class cn.xnatural.app.Devourer
 
done() - Method in class cn.xnatural.app.Lazier
是否已执行
done(T) - Static method in interface cn.xnatural.app.Recursion
结束当前递归,重写对应的默认方法的值,完成状态改为true,设置最终返回结果,设置非法递归调用
dsAttr - Variable in class cn.xnatural.app.util.DB
dataSource 属性集
dsAttr(String, Object) - Method in class cn.xnatural.app.util.DB
设置 DataSource 属性
duration - Variable in class cn.xnatural.app.Pause
暂停时长

E

env() - Method in class cn.xnatural.app.AppContext
环境属性配置
ep() - Method in class cn.xnatural.app.AppContext
事件中心
ep - Variable in class cn.xnatural.app.ServerTpl
1.
errorHandle(BiConsumer<Throwable, Devourer>) - Method in class cn.xnatural.app.Devourer
错误处理
errorHandler - Variable in class cn.xnatural.app.Devourer
错误处理函数
exec() - Method in class cn.xnatural.app.AppContext
系统线程池
exec - Variable in class cn.xnatural.app.Devourer
线程池
exec() - Method in class cn.xnatural.app.ServerTpl
线程池
exec - Variable in class cn.xnatural.app.util.Tailer
 
exec(Executor) - Method in class cn.xnatural.app.util.Tailer
设置处理线程池
execute(String, Object...) - Method in class cn.xnatural.app.util.DB
插入一条数据/更新数据
execute() - Method in class cn.xnatural.app.util.Httper
执行 http 请求
expire(String, Duration) - Method in class cn.xnatural.app.CacheSrv
重新更新过期时间
exposeBean(Object, String...) - Method in class cn.xnatural.app.ServerTpl
暴露 bean 给其它模块用.

F

failMaxKeep - Variable in class cn.xnatural.app.Devourer
对列中失败的最大保留个数, 如果 大于0 执行失败, 暂时保留, 直至 排对的个数大于此值 否则 失败丢弃 默认: 执行失败,丢弃
failMaxKeep(Integer) - Method in class cn.xnatural.app.Devourer
执行失败时, 保留最大个数 NOTE: 失败的任务会不断的重试执行, 直到成功或者对列中的个数大于此值被删除 典型应用: 数据上报场景
fileStream(String, String, InputStream) - Method in class cn.xnatural.app.util.Httper
添加文件流
fileStreams - Variable in class cn.xnatural.app.util.Httper
 
fillParam(PreparedStatement, Object...) - Method in class cn.xnatural.app.util.DB
 

G

get(String) - Method in class cn.xnatural.app.CacheSrv
获取缓存值
get() - Method in class cn.xnatural.app.Lazier
 
get(String) - Method in class cn.xnatural.app.util.Copier
属性取值函数
get(String) - Method in class cn.xnatural.app.util.Httper
 
getAttr(String, Class<T>, T) - Method in class cn.xnatural.app.AppContext
获取属性
getAttr(String, Class<T>, T) - Method in class cn.xnatural.app.ServerTpl
获取属性
getBoolean(String, Boolean) - Method in class cn.xnatural.app.ServerTpl
 
getDouble(String, Double) - Method in class cn.xnatural.app.ServerTpl
 
getFloat(String, Float) - Method in class cn.xnatural.app.ServerTpl
 
getGetterName(Method) - Method in class cn.xnatural.app.util.Copier
获取 getter 方法 属性名
getInteger(String, Integer) - Method in class cn.xnatural.app.ServerTpl
 
getJdbcUrl() - Method in class cn.xnatural.app.util.DB
获取 jdbc 连接地址
getLatchSize() - Method in class cn.xnatural.app.LatchLock
当前已获取锁个数
getLong(String, Long) - Method in class cn.xnatural.app.ServerTpl
 
getName() - Method in class cn.xnatural.app.ServerTpl
服务名
getProfile() - Method in class cn.xnatural.app.AppContext
get profile
getPropFieldName(Field) - Method in class cn.xnatural.app.util.Copier
如果是个属性字段就返回 字段名 作属性名
getResponseCode() - Method in class cn.xnatural.app.util.Httper
 
getResult() - Method in interface cn.xnatural.app.Recursion
获得递归结果,只有在递归结束才能调用,这里默认给出异常,通过工具类的重写来获得值
getSetterName(Method) - Method in class cn.xnatural.app.util.Copier
获取 setter 方法 属性名
getStr(String, String) - Method in class cn.xnatural.app.ServerTpl
 
getWaitingCount() - Method in class cn.xnatural.app.Devourer
排对个数

H

handle(Function<String, Boolean>) - Method in class cn.xnatural.app.util.Tailer
处理输出行
header(String, String) - Method in class cn.xnatural.app.util.Httper
 
headers - Variable in class cn.xnatural.app.util.Httper
 
http() - Static method in class cn.xnatural.app.Utils
构建一个 http 请求, 支持 get, post.
Httper - Class in cn.xnatural.app.util
http 请求
Httper() - Constructor for class cn.xnatural.app.util.Httper
 

I

id() - Method in class cn.xnatural.app.AppContext
 
ignore - Variable in class cn.xnatural.app.util.Copier
忽略属性
ignore(String...) - Method in class cn.xnatural.app.util.Copier
忽略属性
ignoreNull - Variable in class cn.xnatural.app.util.Copier
忽略空属性 默认不忽略空值属性
ignoreNull(boolean) - Method in class cn.xnatural.app.util.Copier
忽略空值属性
init() - Method in class cn.xnatural.app.util.DB
 
inject(Object) - Method in class cn.xnatural.app.AppContext
为bean对象中的Inject注解字段注入对应的bean对象
Inject - Annotation Type in cn.xnatural.app
对象注入 匹配规则: 1.
insertWithGeneratedKey(String, Object...) - Method in class cn.xnatural.app.util.DB
插入一条数据 并 返回第一个 数据库自生成字段
invoke() - Method in interface cn.xnatural.app.Recursion
及早求值,执行者一系列的递归,因为栈帧只有一个,所以使用findFirst获得最终的栈帧,接着调用getResult方法获得最终递归值
ipv4() - Static method in class cn.xnatural.app.Utils
本机ipv4地址
isFinished() - Method in interface cn.xnatural.app.Recursion
判断当前递归是否结束
isLinux() - Static method in class cn.xnatural.app.Utils
判断系统是否为 linux 系统 判断方法来源 io.netty.channel.epoll.Native#loadNativeLibrary()
isSuspended() - Method in class cn.xnatural.app.Devourer
是否是暂停状态
isTimeout() - Method in class cn.xnatural.app.Pause
暂停时间是否已过
iterateField(Class, Consumer<Field>) - Static method in class cn.xnatural.app.Utils
查找字段
iterateMethod(Class, Consumer<Method>) - Static method in class cn.xnatural.app.Utils
遍历所有方法并处理

J

javabeanToMap() - Method in class cn.xnatural.app.util.Copier
 
jsonBody(String) - Method in class cn.xnatural.app.util.Httper
 

K

key - Variable in class cn.xnatural.app.Devourer
队列标识

L

LatchLock - Class in cn.xnatural.app
流量限制锁
LatchLock() - Constructor for class cn.xnatural.app.LatchLock
 
latchSize - Variable in class cn.xnatural.app.LatchLock
当前并发大小
Lazier<T> - Class in cn.xnatural.app
Groovy @Lazy 实现
Lazier(Supplier<T>) - Constructor for class cn.xnatural.app.Lazier
 
left() - Method in class cn.xnatural.app.Pause
剩余时长(单位:ms)
limit - Variable in class cn.xnatural.app.LatchLock
流量限制大小
limit(int) - Method in class cn.xnatural.app.LatchLock
设置限制
lineFn - Variable in class cn.xnatural.app.util.Tailer
 
localBean(EC, Class<T>, String) - Method in class cn.xnatural.app.AppContext
AppContext.sourceMap中查找对象
localBean(EC, Class<T>, String) - Method in class cn.xnatural.app.ServerTpl
 
localBean(Class<T>, String) - Method in class cn.xnatural.app.ServerTpl
本地查找 对象
localBean(Class<T>) - Method in class cn.xnatural.app.ServerTpl
本地查找 对象
lock - Variable in class cn.xnatural.app.Devourer
流量限制锁
log - Static variable in class cn.xnatural.app.AppContext
 
log - Static variable in class cn.xnatural.app.Devourer
 
log - Variable in class cn.xnatural.app.ServerTpl
 
log - Static variable in class cn.xnatural.app.util.Httper
 
log - Static variable in class cn.xnatural.app.util.Tailer
 
log - Static variable in class cn.xnatural.app.Utils
 
log - Static variable in class cn.xnatural.app.v.VChain
 

M

mapProp(String, String) - Method in class cn.xnatural.app.util.Copier
属性名 映射 Copier.ignore 也能控制别名
mapProps - Variable in class cn.xnatural.app.util.Copier
属性别名 目标属性名 -> 源属性名
maxRows - Variable in class cn.xnatural.app.util.DB
最大返回条数限制
md5Hex(byte[]) - Static method in class cn.xnatural.app.Utils
md5 hex
memo(BiFunction<Function<I, R>, I, R>, I) - Static method in interface cn.xnatural.app.Recursion
备忘录模式 函数封装
method - Variable in class cn.xnatural.app.util.Httper
 

N

name() - Method in class cn.xnatural.app.AppContext
 
name - Variable in class cn.xnatural.app.ServerTpl
服务名字标识.(保证唯一) 可用于命名空间: 1.

O

offer(Runnable) - Method in class cn.xnatural.app.Devourer
任务入对列

P

parallel(int) - Method in class cn.xnatural.app.Devourer
设置并发数
parallel() - Method in class cn.xnatural.app.Devourer
正在执行的任务数
param(String, Object) - Method in class cn.xnatural.app.util.Httper
添加参数
params - Variable in class cn.xnatural.app.util.Httper
 
Pause - Class in cn.xnatural.app
暂停器
Pause(Duration) - Constructor for class cn.xnatural.app.Pause
 
pauseCondition - Variable in class cn.xnatural.app.Devourer
暂停执行条件
pid() - Static method in class cn.xnatural.app.Utils
得到jvm进程号
post(String) - Method in class cn.xnatural.app.util.Httper
 
post(Object) - Method in interface cn.xnatural.app.v.VProcessor
V 链中后执行
pre(Object) - Method in interface cn.xnatural.app.v.VProcessor
V 链中先执行
preConnect(Consumer<HttpURLConnection>) - Method in class cn.xnatural.app.util.Httper
 
preFn - Variable in class cn.xnatural.app.util.Httper
 
ps - Variable in class cn.xnatural.app.v.VChain
 
put(String) - Method in class cn.xnatural.app.util.Httper
 

Q

queue(String, Runnable) - Method in class cn.xnatural.app.AppContext
加入到对列行器执行函数 每个对列里面的函数同一时间只执行一个, 各对列相互执行互不影响
queue(String, Runnable) - Method in class cn.xnatural.app.ServerTpl
对列执行
queue(String) - Method in class cn.xnatural.app.ServerTpl
获取执行对列
queue(Runnable) - Method in class cn.xnatural.app.ServerTpl
对列执行, 加入到当前ServerTpl.name为对列名的对列
queues - Variable in class cn.xnatural.app.AppContext
对列执行器映射

R

random(int, String, String) - Static method in class cn.xnatural.app.Utils
随机字符串(区分大小写)
random(int) - Static method in class cn.xnatural.app.Utils
随机字符串(区分大小写)
readTimeout - Variable in class cn.xnatural.app.util.Httper
 
readTimeout(int) - Method in class cn.xnatural.app.util.Httper
 
Record(Long, Object) - Constructor for class cn.xnatural.app.CacheSrv.Record
 
Recursion<T> - Interface in cn.xnatural.app
java无限递归优化实现 https://www.cnblogs.com/invoker-/p/7723420.html https://www.cnblogs.com/invoker-/p/7728452.html
release() - Method in class cn.xnatural.app.LatchLock
释放一个锁
remove(String) - Method in class cn.xnatural.app.CacheSrv
移除缓存
respCode - Variable in class cn.xnatural.app.util.Httper
 
resume() - Method in class cn.xnatural.app.Devourer
手动恢复执行
row(String, Object...) - Method in class cn.xnatural.app.util.DB
返回一条数据
rows(String, Object...) - Method in class cn.xnatural.app.util.DB
查询多条数据
run(Object) - Method in class cn.xnatural.app.v.VChain
执行链 按v型依次执行, 上个处理结果为下个处理器的入参

S

ServerTpl - Class in cn.xnatural.app
服务模板类
ServerTpl(String) - Constructor for class cn.xnatural.app.ServerTpl
 
ServerTpl() - Constructor for class cn.xnatural.app.ServerTpl
 
set(String, Object) - Method in class cn.xnatural.app.CacheSrv
设置缓存 取默认过期时间 30 分钟
set(String, Object, Duration) - Method in class cn.xnatural.app.CacheSrv
设置缓存
setAttr(String, Object) - Method in class cn.xnatural.app.ServerTpl
设置属性
setMaxRows(int) - Method in class cn.xnatural.app.util.DB
设置限制最大返回条数
sha1(byte[]) - Static method in class cn.xnatural.app.Utils
sha1 加密
showClassProp() - Method in class cn.xnatural.app.util.Copier
包含 class 属性
shutdown() - Method in class cn.xnatural.app.Devourer
关闭
shutdownHook - Variable in class cn.xnatural.app.AppContext
jvm关闭钩子.
single(String, Class<T>, Object...) - Method in class cn.xnatural.app.util.DB
查询单个值
sourceMap - Variable in class cn.xnatural.app.AppContext
服务对象源
src - Variable in class cn.xnatural.app.util.Copier
源对象
start() - Method in class cn.xnatural.app.AppContext
启动
start - Variable in class cn.xnatural.app.Pause
开始时间
startup - Variable in class cn.xnatural.app.AppContext
启动时间
stop() - Method in class cn.xnatural.app.util.Tailer
停止
stopFlag - Variable in class cn.xnatural.app.util.Tailer
 
suspend(Duration) - Method in class cn.xnatural.app.Devourer
暂停一段时间 NOTE 继续执行条件: 必须有新的任务入对, 或者手动调用 Devourer.resume()
suspend(Predicate<Devourer>) - Method in class cn.xnatural.app.Devourer
设置暂停条件 使用 Devourer.resume() 恢复

T

tail(String) - Method in class cn.xnatural.app.util.Tailer
tail 文件内容监控
tail(String, Integer) - Method in class cn.xnatural.app.util.Tailer
tail 文件内容监控
Tailer - Class in cn.xnatural.app.util
文件内容监控器(类linux tail)
Tailer() - Constructor for class cn.xnatural.app.util.Tailer
 
tailer() - Static method in class cn.xnatural.app.Utils
文件内容监控器(类linux tail)
target - Variable in class cn.xnatural.app.util.Copier
目标对象
textBody(String) - Method in class cn.xnatural.app.util.Httper
 
th - Variable in class cn.xnatural.app.util.Tailer
 
tlsVersion - Variable in class cn.xnatural.app.util.Httper
 
tlsVersion(String) - Method in class cn.xnatural.app.util.Httper
 
to(Object, Class<T>) - Static method in class cn.xnatural.app.Utils
类型转换
toJavabean() - Method in class cn.xnatural.app.util.Copier
 
toString() - Method in class cn.xnatural.app.CacheSrv
 
toString() - Method in class cn.xnatural.app.Devourer
 
toString() - Method in class cn.xnatural.app.Lazier
 
trans(Supplier<T>) - Method in class cn.xnatural.app.util.DB
开启一个事务
trigger() - Method in class cn.xnatural.app.Devourer
不断的从 Devourer.waiting 对列中取出执行
tryLock() - Method in class cn.xnatural.app.LatchLock
获取锁
txConn - Static variable in class cn.xnatural.app.util.DB
事务连接,保存在线程上下文

U

urlStr - Variable in class cn.xnatural.app.util.Httper
 
useLast - Variable in class cn.xnatural.app.Devourer
使用最后入队想任务/任务最后有效 Devourer.useLast(boolean)
useLast(boolean) - Method in class cn.xnatural.app.Devourer
是否只使用队列最后一个, 清除队列前面的任务 适合: 入队的频率比出队高, 前面的任务可有可无
Utils - Class in cn.xnatural.app
常用工具集
Utils() - Constructor for class cn.xnatural.app.Utils
 

V

valueConverter - Variable in class cn.xnatural.app.util.Copier
属性值转换器配置 源属性名 -> 值转换函数
valueGetter - Variable in class cn.xnatural.app.util.Copier
客外属性源 计算器
VChain - Class in cn.xnatural.app.v
V链: 执行过程先进后出(类似V型)
VChain() - Constructor for class cn.xnatural.app.v.VChain
 
VProcessor - Interface in cn.xnatural.app.v
V 链VChain中的处理器节点

W

waiting - Variable in class cn.xnatural.app.Devourer
任务执行对列
withConn(Function<Connection, T>) - Method in class cn.xnatural.app.util.DB
执行连接
wrapEpForSource(Object) - Method in class cn.xnatural.app.AppContext
为每个Source包装EP
wrapExecForSource(Object) - Method in class cn.xnatural.app.AppContext
为 source 包装 Executor 当系统线程池忙的时候, 会为创建服务创建一个独用的线程池: 抵御流量突发,同时保证各个业务的任务隔离(即使流量突发也不会影响其他业务导致整个系统被拖垮), 另外还可以抵御线程池隔离时各个业务设置不合理导致的资源分配不均,任务阻塞或者空转问题 分发新任务策略: 当系统线程池忙, 则使用服务自己的线程池; 默认都用系统线程池

_

_data - Variable in class cn.xnatural.app.CacheSrv
数据存放
_ep - Variable in class cn.xnatural.app.AppContext
初始化 事件中心
_exec - Variable in class cn.xnatural.app.AppContext
初始化一个 ThreadPoolExecutor NOTE: 如果线程池在不停的创建线程, 有可能是因为 提交的 Runnable 的异常没有被处理.
_id - Variable in class cn.xnatural.app.AppContext
实例Id NOTE: 保证唯一
_limit - Variable in class cn.xnatural.app.CacheSrv
 
_name - Variable in class cn.xnatural.app.AppContext
系统名字.
A B C D E F G H I J K L M N O P Q R S T U V W _ 
Skip navigation links

Copyright © 2022. All rights reserved.