コード例 #1
0
    @Override
    public void run() {

      logger.debug("RedisPublisher:  {}  Starting.", id);
      Jedis jedis = jedisPool.getResource();
      jedis.connect();

      logger.debug("RedisPublisher:  {}  connected.", id);

      for (int i = 0; i < testCount; i++) {
        jedis.publish(channel, REDIS_PAYLOAD);
        tallyMessage();
      }

      logger.debug("Redis Publisher ({}) :  Published {} messages", id, testCount);

      jedis.disconnect();

      setComplete();
    }
コード例 #2
0
 @Override
 void waitForCompletion() {
   super.waitForCompletion();
   jedis.disconnect();
 }