- 博客(198)
- 资源 (3)
- 收藏
- 关注
原创 架构基础 - WAL在各种数据系统的应用
WAL(Write Ahead Log)预写日志,是数据库系统中常见的一种手段,用于保证数据操作的原子性和持久性。在计算机科学中,「预写式日志」(Write-ahead logging,缩写 WAL)是关系数据库系统中用于提供原子性和持久性(ACID 属性中的两个)的一系列技术。在使用 WAL 的系统中,所有的修改在提交之前都要先写入 log 文件中。https://zhuanlan.zhihu.com/p/137512843...
2021-09-02 09:39:19
614
原创 flowable 6.4.2 - 流程定义动态化的支持(DynamicBpmnService)
1、injectParallelUserTask --- 给《任务实例》加入《子任务》2、injectParallelEmbeddedSubProcess --- 给《任务实例》加入《子流程》3、injectUserTaskInProcessInstance --- 给《流程实例》加入《子任务》4、injectEmbeddedSubProcessInProcessInstance --- 给《流程实例》加入《子流程》.// injectParallelUserTask --- 给《任务实例
2021-04-27 22:29:50
4006
1
原创 flowable 6.4.2 - 脚本引擎
.org.flowable.common.engine.impl.scripting.ScriptingEnginespublic class ScriptingEngines { public static final String DEFAULT_SCRIPTING_LANGUAGE = "juel"; public static final String GROOVY_SCRIPTING_LANGUAGE = "groovy"; private final Scri
2021-04-25 12:48:05
1158
1
原创 flowable 6.4.2 - 多实例(与签、或签的实现机制)
▷ 创建Behavior( SequentialMultiInstanceBehavior、ParallelMultiInstanceBehavior)```// org.flowable.engine.impl.bpmn.parser.handler.UserTaskParseHandler#parse(org.flowable.engine.impl.bpmn.parser.BpmnParse, org.flowable.bpmn.model.BaseElement)class UserTa
2021-04-25 09:31:20
4842
原创 flowable 6.4.2 - 历史《活动实例》列表sql
.### 历史《活动实例》列表 ACT_HI_ACTINST```<select id="selectHistoricActivityInstancesByQueryCriteria" parameterType="org.flowable.engine.impl.HistoricActivityInstanceQueryImpl" resultMap="historicActivityInstanceResultMap"> <if test="firstResult !=
2021-04-22 15:35:44
222
1
原创 flowable 6.4.2 - 历史《流程实例》列表sql
### 历史《流程实例》列表 - ACT_HI_PROCINST```<select id="selectHistoricProcessInstancesWithVariablesByQueryCriteria" parameterType="org.flowable.engine.impl.HistoricProcessInstanceQueryImpl" resultMap="historicProcessInstanceAndVariablesResultMap"> <!-..
2021-04-22 15:34:05
589
原创 flowable 6.4.2 - 历史《任务实例》列表sql
### 历史任务实例列表 - ACT_HI_TASKINST```<select id="selectHistoricTaskInstancesWithRelatedEntitiesByQueryCriteria" parameterType="org.flowable.task.service.impl.HistoricTaskInstanceQueryImpl" resultMap="historicTaskAndRelatedEntitiesResultMap"> &l..
2021-04-22 15:32:56
532
原创 flowable 6.4.2 - 查询任务sql
/** * @see org.flowable.engine.impl.TaskServiceImpl#createTaskQuery() */List<Task> tasks = getTaskService().createTaskQuery(). /** * @see org.flowable.task.service.impl.TaskQueryImpl#taskCandidateGroup(java.lang.String) */ taskCandidate.
2021-04-22 13:13:07
2829
原创 Redisson 3.11.3 - redis协议处理器(使用netty-client和redis-server交互)
.public class RedisChannelInitializer extends ChannelInitializer<Channel> { public enum Type {PUBSUB, PLAIN} // .... @Override protected void initChannel(Channel ch) throws Exception { initSsl(config, ch); // 初始化
2021-04-02 19:34:58
417
原创 Redisson 3.11.3 - AsyncSemaphore
.import lombok.extern.slf4j.Slf4j;import org.redisson.pubsub.AsyncSemaphore;@Slf4jpublic class AsyncSemaphoreTest { /** * <pre> * 1、获取锁 * 1、有锁资源 * 1、直接执行回调 * 2、没有锁资源 *
2021-04-01 23:17:58
553
1
原创 Redisson 3.11.3 - Promise
.import lombok.Data;import lombok.extern.slf4j.Slf4j;import org.redisson.client.RedisConnectionException;import org.redisson.misc.RPromise;import org.redisson.misc.RedissonPromise;import java.util.function.BiConsumer;@Slf4jpublic class Redisso
2021-04-01 23:17:02
912
原创 spring-cloud Edgware.SR6 之 spring config server 1.4.7 (配置中心)配置机制、开放的接口(控制器)
org.springframework.cloud.config.server.environment.EnvironmentControllerorg.springframework.cloud.config.server.resource.ResourceController.EnvironmentController@RestController@RequestMapping(method = RequestMethod.GET, path = "${spring.cloud.con
2021-03-18 18:15:45
282
原创 spring-cloud Edgware.SR6 之 netflix eureka server 1.4.7(注册中心) 配置机制、开放的接口(api处理器)
./** * 扫描含有 @Path、@Provider 注解的类列表 * <pre> * * * @see com.netflix.discovery.provider.DiscoveryJerseyProvider * @see com.netflix.eureka.resources.InstancesResource * 处理 http://127.0.0.1:8761/eureka/instances 类请求 * @see com.netflix.eure
2021-03-18 18:08:28
277
1
原创 spring-cloud Edgware.SR6 之 netflix eureka client 1.4.7 (注册中心)可调用的接口列表
com.netflix.discovery.shared.transport.jersey.JerseyApplicationClient./** * <pre> * @see com.netflix.discovery.shared.transport.jersey.JerseyApplicationClient * * @see com.netflix.discovery.shared.transport.jersey.JerseyApplicationClient#ge.
2021-03-18 17:38:58
184
原创 sharding sphere 4.1.1 - key生成器
内置有两种:UUID、SNOWFLAKE./** */@Slf4jpublic class KeyGeneratorTest { /** * @see org.apache.shardingsphere.core.rule.TableRule#TableRule */ public static void main(String[] args) throws Exception { testGenerateKey("UUID");
2021-03-16 11:09:16
645
原创 sharding sphere 4.1.1 - “路由装饰器RouteDecorator-主从” 之 “控制强制读主库”
.MasterVisitedManager.setMasterVisited();org.apache.shardingsphere.masterslave.route.engine.MasterSlaveRouteDecorator#decorateorg.apache.shardingsphere.masterslave.route.engine.impl.MasterSlaveDataSourceRouter#routeorg.apache.shardingsphere.mastersl
2021-03-13 14:19:21
547
原创 sharding sphere 4.1.1 - 各种表达式的解析器(居于groovy)
1、使用groovy引擎进行处理./** * @see org.apache.shardingsphere.core.strategy.route.ShardingStrategyFactory */@Slf4jpublic class ExpressionParserTest { /** * @param args * @throws Exception */ public static void main(String[] args) t
2021-03-13 14:14:23
1685
原创 sharding sphere 4.1.1 - 参数重写器 之 “分片参数重写器”、“加密参数重写器”
.分片参数重写器org.apache.shardingsphere.sharding.rewrite.parameter.ShardingParameterRewriterBuilderpublic final class ShardingParameterRewriterBuilder implements ParameterRewriterBuilder { private final ShardingRule shardingRule; priva.
2021-03-13 14:10:58
363
原创 sharding sphere 4.1.1 - 使用Antlr解析sql语句
.public class AntlrTest { /** * @param args * @throws Exception * @see org.apache.shardingsphere.sql.parser.core.parser.SQLParserFactory#createSQLParser(java.lang.String, org.apache.shardingsphere.sql.parser.spi.SQLParserConfiguration
2021-03-12 15:46:18
1069
1
原创 sharding sphere 4.1.1 - “重写装饰器SQLRewriteContextDecorator-分片”
1、遍历《参数重写器》、对参数进行重写2、注册《token生成器》到《重写上下文对象》.org.apache.shardingsphere.sharding.rewrite.context.ShardingSQLRewriteContextDecoratorpublic final class ShardingSQLRewriteContextDecorator implements SQLRewriteContextDecorator<ShardingRule>, Rout.
2021-03-12 15:36:51
278
原创 sharding sphere 4.1.1 - 概述 之 “SQL路由器DataNodeRouter、SQL重写器SQLRewriteEntry”
.1、路由 1、调用spi实现RoutingHook接口的bean的start方法 2、调用解析引擎解析出SQLStatement 3、创建SQLStatementContext 4、遍历《装饰器》列表 1、org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator 1、解析分表条件 ShardingConditions 2
2021-03-12 14:44:13
480
原创 sharding sphere 4.1.1 - “路由装饰器RouteDecorator-分片” 之 “分片条件-引擎”
.InsertClauseShardingConditionEngine(处理insert语句)// org.apache.shardingsphere.sharding.route.engine.condition.engine.InsertClauseShardingConditionEngine#createShardingConditionspublic final class InsertClauseShardingConditionEngine { private
2021-03-12 13:15:34
409
原创 sharding sphere 4.1.1 - “SQL路由DataNodeRouter” 之 调用“sql解析引擎、路由装饰器RouteDecorator-xxx”
// org.apache.shardingsphere.underlying.route.DataNodeRouter#routepublic final class DataNodeRouter { // .... /** */ public RouteContext route(final String sql, final List<Object> parameters, final boolean useCache) { .
2021-03-12 10:51:33
213
原创 sharding sphere 4.1.1 - “路由装饰器RouteDecorator-分片” 之 调用“分片条件-引擎、分片路由-引擎”
// org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator#decoratepublic RouteContext decorate(final RouteContext routeContext, final ShardingSphereMetaData metaData, final ShardingRule shardingRule, final ConfigurationProperties properti.
2021-03-12 10:27:04
717
原创 sharding sphere 4.1.1 - 支持的分片策略
// org.apache.shardingsphere.core.strategy.route.ShardingStrategyFactorypublic final class ShardingStrategyFactory { /** * Create sharding algorithm. * * @param shardingStrategyConfig sharding strategy configuration * @retur.
2021-03-12 10:13:04
536
原创 xxl-job (定时任务平台) 2.2.0 源码片段 - Executor的接口列表
1、"/beat",用途:用于检查心跳;直接返回成功2、"/idleBeat",用途:用于检查忙碌状态;忙碌中(执行任务中,或者队列中有数据)3、"/run",用途:用于执行任务;4、"/kill",用途:用于中断线程;5、"/log",用途:用于读取日志;.// com.xxl.job.core.server.EmbedServer.EmbedHttpServerHandler#processprivate Object process(HttpMethod httpMethod, S
2021-03-02 09:58:18
560
原创 xxl-job (定时任务平台) 2.3.1 源码片段 - Scheduler执行调度
1、开启事务、开启《悲观锁》2、扫描xxl_job_info中trigger_next_time符合条件的记录(后期提前5秒记录,数量为(快线程数量+慢线程数量)*20)3、把符合提交的任务放入异步线程,http通知《执行器》4、更新xxl_job_info中的trigger_next_time,即:更新下次执行时间5、提交事务.扫描符合的任务// com.xxl.job.admin.core.thread.JobScheduleHelper#startpublic void sta
2021-02-24 09:59:45
835
原创 spring boot 1.5.3 源代码片段 - 配置Tomcat(TomcatEmbeddedServletContainerFactory)
机制:1、在初始化TomcatEmbeddedServletContainerFactory的时候,会被 EmbeddedServletContainerCustomizerBeanPostProcessor#postProcessBeforeInitialization(...) 拦截2、EmbeddedServletContainerCustomizerBeanPostProcessor 会扫描实现EmbeddedServletContainerCustomizer接口的bean,并调用cust
2021-02-23 15:05:34
1593
原创 mybatis3.4.1源代码 - 内置的Executor
org.apache.ibatis.executor.BatchExecutor 用于批量执行org.apache.ibatis.executor.ReuseExecutor 用于复用Statementorg.apache.ibatis.executor.CachingExecutor 用于缓存控制(由类上的 @CacheNamespace 或者 @CacheNamespaceRef 控制)org.apache.ibatis.executor.SimpleExecutor 用于简单执行(默认)...
2021-02-08 11:04:01
258
原创 netty3.6.6 源码片段 - sink接口
netty3.6.6的DefaultChannelPipeline对象内有依赖个sink。org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink/** * Receives and processes the terminal downstream {@link ChannelEvent}s. * <p> * A {@link ChannelSink} is an internal component...
2021-02-07 18:21:43
165
原创 mybatis3.4.1源代码 - 插件的安装、执行
插件安装器public class InterceptorChain { private final List<Interceptor> interceptors = new ArrayList<Interceptor>(); public Object pluginAll(Object target) { // 1.target === Executor for (Interceptor interceptor : inte
2021-02-06 10:54:52
158
原创 apache dubbo 2.7.3 源代码片段 - 内置的Filter
// org.apache.dubbo.rpc.Filter// dubbo-config/dubbo-config-api/META-INF/services/org.apache.dubbo.rpc.Filter// mockfilter=org.apache.dubbo.config.mock.MockFilter // 支持unknown;//// dubbo-filter/dubbo-filter-cache/META-INF/dubbo/internal/org.apa...
2021-02-05 17:37:21
247
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人