liteBatch轻量级的高性能批插框架
liteBatch 是一个轻量级,高性能,高通用的批插框架。
能够像普通 insert 一样在循环中插入 PO
支持数据库和文件批插2种模式
异步执行,无阻塞
可以和各种 ORM 结合使用
提供对 spring 的支持
兼容各种数据库
适应所有的 VO ,自动生成脚本
性能高效,测试机上测试大概4w+/秒
自动处理各种基础类型的数据
支持自定义的映射和过滤字段
Quick Start
也可以参考 test 工程的 testUnit
try { Random random = new Random(); Person person = null; for (int i = 0; i < 100300; i++) { person = new Person(); person.setAge(random.nextInt(100)); person.setAddress("XX马路"+random.nextInt(100)+"号"); person.setCompany("天天 向上科技有限公司"); person.setName("张三"); person.setCreateTime(new Date()); rowBatchListener.insertOneWithBatch(person); } } catch (Exception e) { e.printStackTrace(); } finally { rowBatchListener.flush(); }
<bean id="rowBatchListener" class="com.thebeastshop.batch.spring.RowBatchListenerFactoryBean"> <property name="jdbcTemplate" ref="jdbcTemplate"/> <property name="submitCapacity" value="5000"/> <property name="beanClass" value="com.thebeastshop.batch.test.Person"/> <!--<property name="syn" value="true"/>默认为false,推荐采用false,打开的话,则为同步模式--> </bean>
注意
在mysql数据库下,需要注意以下几点
驱动包一定得5.1.13版本以上(含)
在jdbc连接url里得加上rewriteBatchedStatements=true参数
评论
ikasoa高性能轻量级 RPC 框架
ikasoa-rpc是一款高性能轻量级的RPC框架,基于apachethrift开发.抛弃了thrift框架中的idl,客户端可以像调用本地接口一样调用远程接口,减少了idl的学习成本和生成代码的过程
ikasoa高性能轻量级 RPC 框架
0
HRPC轻量级高性能 RPC 框架
HRPC HRPC是一款基于Netty和Zookeeper设计的轻量级高性能RPC框架。特性采用Protostuff序列化;高性能,负载均衡;支持服务的注册和订阅;支持同步及异步2种调用方式;长连接,
HRPC轻量级高性能 RPC 框架
0
PHP-ES轻量级高性能 PHP 框架
框架简介ES是一款极简、灵活、高性能、扩建性强、上手快php框架;以“快速开发、轻松上手、高速执行”为理念,助你成为web开发的能手!开发缘由与其说开发此框架,更准确说法应该是一次代码的整理,本人在接
PHP-ES轻量级高性能 PHP 框架
0