Package org.springside.modules.nosql.redis.pool

Examples of org.springside.modules.nosql.redis.pool.JedisPoolBuilder


  }

  @Override
  protected void setUp() {

    pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(threadCount).buildPool();
    jedisTemplate = new JedisTemplate(pool);

    // 重置Counter
    jedisTemplate.set(counterKey, "0");
  }
View Full Code Here


    super(DEFAULT_THREAD_COUNT, DEFAULT_TOTAL_COUNT);
  }

  @Override
  protected void setUp() {
    pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(threadCount).buildPool();
    jedisTemplate = new JedisTemplate(pool);

    // 清空数据库
    jedisTemplate.flushDB();
  }
View Full Code Here

  private static ScheduledFuture statisticsTask;

  public static void main(String[] args) throws Exception {

    JedisPool pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(1).buildPool();
    try {
      JobDispatcher dispatcher = new JobDispatcher("ss", pool);
      JobStatistics statistics = new JobStatistics("ss", pool);

      startPrintStatistics(statistics);
View Full Code Here

  private static ScheduledFuture statisticsTask;

  public static void main(String[] args) throws Exception {

    JedisPool pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(1).buildPool();
    try {
      JobDispatcher dispatcher = new JobDispatcher("ss", pool);
      dispatcher.setReliable(true);

      JobStatistics statistics = new JobStatistics("ss", pool);
View Full Code Here

        String.valueOf(SimpleJobDispatcherDemo.EXPECT_TPS)));
  }

  @Override
  protected void setUp() {
    pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(threadCount).buildPool();
    jobProducer = new JobProducer("ss", pool);
  }
View Full Code Here

public class MasterElectorDemo {

  public static void main(String[] args) throws Exception {

    JedisPool pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(1).buildPool();
    try {
      MasterElector masterElector = new MasterElector(pool, 5);

      masterElector.start();
View Full Code Here

    reliable = Boolean.parseBoolean(System.getProperty("reliable",
        String.valueOf(AdvancedJobConsumer.DEFAULT_RELIABLE)));
    batchSize = Integer.parseInt(System.getProperty("batchsize",
        String.valueOf(AdvancedJobConsumer.DEFAULT_BATCH_SIZE)));

    pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(threadCount).buildPool();

    ExecutorService threadPool = Executors.newFixedThreadPool(threadCount);
    for (int i = 0; i < threadCount; i++) {
      AdvancedJobConsumerBatchPopDemo demo = new AdvancedJobConsumerBatchPopDemo();
      threadPool.execute(demo);
View Full Code Here

  public static void main(String[] args) throws Exception {

    threadCount = Integer.parseInt(System.getProperty(ConcurrentBenchmark.THREAD_COUNT_NAME,
        String.valueOf(THREAD_COUNT)));

    pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(threadCount).buildPool();

    ExecutorService threadPool = Executors.newFixedThreadPool(threadCount);
    for (int i = 0; i < threadCount; i++) {
      AdvancedJobConsumerSinglePopDemo demo = new AdvancedJobConsumerSinglePopDemo();
      threadPool.execute(demo);
View Full Code Here

  public static void main(String[] args) throws Exception {

    threadCount = Integer.parseInt(System.getProperty(ConcurrentBenchmark.THREAD_COUNT_NAME,
        String.valueOf(THREAD_COUNT)));

    pool = new JedisPoolBuilder().setDirectHostAndPort("localhost", "6379").setPoolSize(threadCount).buildPool();

    ExecutorService threadPool = Executors.newFixedThreadPool(threadCount);
    for (int i = 0; i < threadCount; i++) {
      SimpleJobConsumerDemo demo = new SimpleJobConsumerDemo();
      threadPool.execute(demo);
View Full Code Here

TOP

Related Classes of org.springside.modules.nosql.redis.pool.JedisPoolBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.