mindwind / craft-atom Goto Github PK
View Code? Open in Web Editor NEWA crafted and atomic component library for Java.
Home Page: http://mindwind.me/craft/atom
License: MIT License
A crafted and atomic component library for Java.
Home Page: http://mindwind.me/craft/atom
License: MIT License
http://central.maven.org/maven2/io/craftcode/craft-atom/3.1.2/ 仓库没有jar包,所以添加maven依赖无法下载
RpcProxyFactory.getProxy(Class[] rpcInterfaces) is more appropriate.
你好大神,很激动能看到你写的这么短小精悍的Java轮子,刚刚导入到了我的eclipse中,准备研读研读,然后就发现一个小问题,如图:
有可能是我使用工具不熟,但是我想往常一样调了一下package presentation,发现还是不行[汗]。。。
Google了一下发现不对,所以过来请教一下是啥原因,烦请大神告知,感激不尽。。。
email:[email protected]
As follows, the key code block
Jedis j = jedis();
try {
// invoke jedis api to execute redis command
} catch (Exception e) {
RedisException re = handleException(e, j, args);
j = null;
throw re;
} finally {
release(j);
}
RedisException handleException(Exception e, Jedis j, Object... args) {
unbind();
if (e instanceof JedisConnectionException) {
if (j != null) {
pool.returnBrokenResource(j);
}
return new RedisConnectionException(String.format("Connect to redis server<host=%s, port=%s> failed.", host, port), e);
}
if (e instanceof JedisDataException) {
return new RedisDataException(String.format("Redis data <args=%s> process failed.", Arrays.toString(args)), e);
}
return new RedisException(e);
}
private void release(Jedis j) {
if (isBound()) {
// in transaction context don't return jedis connection to pool.
return;
} else {
if (j != null) {
pool.returnResource(j);
}
}
}
When a JedisDataException occur, jump into catch block.
In the handleException() method, we don't return jedis instance back to pool, just throw a RedisDataException, in catch block set j = null, but in the release() method, when j is null skip the returnResource(j), so jedis instance is leaky.
Some cases may throw RedisDataException
try {
s.slaveof(m.host(), m.port());
} catch (RedisConnectionException e) {
LOG.warn("[CRAFT-ATOM-REDIS] {} slaveof {} failed", s.toString(), m.toString());
}
From redis 2.8.5 to 2.8.18 we miss theses new features and commands
NEW - CLIENT PAUSE
NEW - ZLEXCOUNT
NEW - ZRANGEBYLEX
NEW - ZREMRANGEBYLEX
NEW - ROLE command added
NEW - BITPOS
NEW - DEBUG ERROR
NEW - CLIENT KILL new form to kill by client type and ID
NEW - CLIENT LIST new unique incremental ID to every client.
NEW - The COMMAND command, exposing the Redis command table as an API.
NEW - The new latency monitoring feature, as documented at http://redis.io/topics/latency-monitor
NEW - Pub/Sub PING
NEW - DEBUG POPULATE
NEW - Total and instantaneous Network bandwidth tracking in INFO.
sorry,I doesn't install lombok plugin so some method seems doesn't exist.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.