开发者

Java & Redis - multiple instances of jedis.2.0.0.jar

My current Java programm is making some insertions in Redis and I see with htop about 15 instances of jedis.2.0.0.jar ...

Any ideas why ??? Thanks

Here is part of my code :

private Jedis jedis;

 try {
     jedis = new Jedis(REDIS_HOST, REDIS_PORT); }
 catch (Exception e) {
     System.err.println("Can't connect to Redis");
     return false;
 }

 jedis.hse开发者_开发知识库t(...)


The htop utility shows userland threads by default, so what you're seeing is likely threads started by the Jedis library.

You can configure htop to either not show threads:

F2 > Display Options > Hide userland threads

Or show them in a tree view under the process:

F2 > Display Options > Tree View

The tree view is quite a bit clearer than the default view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜