From 38485571a935bc2d4fb0a534a58f6fd29fd2d50c Mon Sep 17 00:00:00 2001 From: Calvin Date: Sat, 13 Sep 2014 17:15:39 +0800 Subject: [PATCH] #393 move the elector and scheduler to new package --- .../showcase/demos/redis/elector/MasterElectorDemo.java | 2 +- .../redis/job/consumer/AdvancedJobConsumerBatchPopDemo.java | 4 ++-- .../redis/job/consumer/AdvancedJobConsumerSinglePopDemo.java | 4 ++-- .../demos/redis/job/consumer/SimpleJobConsumerDemo.java | 2 +- .../demos/redis/job/dispatcher/ReliableJobDispatcherDemo.java | 4 ++-- .../demos/redis/job/dispatcher/SimpleJobDispatcherDemo.java | 4 ++-- .../showcase/demos/redis/job/producer/JobProducerDemo.java | 2 +- .../nosql/redis/{ => service}/elector/MasterElector.java | 2 +- .../redis/{ => service}/scheduler/AdvancedJobConsumer.java | 2 +- .../nosql/redis/{ => service}/scheduler/JobDispatcher.java | 2 +- .../nosql/redis/{ => service}/scheduler/JobProducer.java | 2 +- .../nosql/redis/{ => service}/scheduler/JobStatistics.java | 2 +- .../modules/nosql/redis/{ => service}/scheduler/Keys.java | 2 +- .../redis/{ => service}/scheduler/SimpleJobConsumer.java | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) rename modules/redis/src/main/java/org/springside/modules/nosql/redis/{ => service}/elector/MasterElector.java (98%) rename modules/redis/src/main/java/org/springside/modules/nosql/redis/{ => service}/scheduler/AdvancedJobConsumer.java (98%) rename modules/redis/src/main/java/org/springside/modules/nosql/redis/{ => service}/scheduler/JobDispatcher.java (98%) rename modules/redis/src/main/java/org/springside/modules/nosql/redis/{ => service}/scheduler/JobProducer.java (96%) rename modules/redis/src/main/java/org/springside/modules/nosql/redis/{ => service}/scheduler/JobStatistics.java (97%) rename modules/redis/src/main/java/org/springside/modules/nosql/redis/{ => service}/scheduler/Keys.java (94%) rename modules/redis/src/main/java/org/springside/modules/nosql/redis/{ => service}/scheduler/SimpleJobConsumer.java (97%) diff --git a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/elector/MasterElectorDemo.java b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/elector/MasterElectorDemo.java index f6b2ad0c4..887bbec9f 100644 --- a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/elector/MasterElectorDemo.java +++ b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/elector/MasterElectorDemo.java @@ -5,9 +5,9 @@ *******************************************************************************/ package org.springside.examples.showcase.demos.redis.elector; -import org.springside.modules.nosql.redis.elector.MasterElector; import org.springside.modules.nosql.redis.pool.JedisPool; import org.springside.modules.nosql.redis.pool.JedisPoolBuilder; +import org.springside.modules.nosql.redis.service.elector.MasterElector; public class MasterElectorDemo { diff --git a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerBatchPopDemo.java b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerBatchPopDemo.java index 90e6d049c..6d01cc64f 100644 --- a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerBatchPopDemo.java +++ b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerBatchPopDemo.java @@ -11,8 +11,8 @@ import java.util.concurrent.TimeUnit; import org.springside.modules.nosql.redis.pool.JedisPoolBuilder; -import org.springside.modules.nosql.redis.scheduler.AdvancedJobConsumer; -import org.springside.modules.nosql.redis.scheduler.SimpleJobConsumer; +import org.springside.modules.nosql.redis.service.scheduler.AdvancedJobConsumer; +import org.springside.modules.nosql.redis.service.scheduler.SimpleJobConsumer; import org.springside.modules.test.benchmark.ConcurrentBenchmark; import org.springside.modules.utils.Threads; diff --git a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerSinglePopDemo.java b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerSinglePopDemo.java index be9b7ad75..6b16e19ed 100644 --- a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerSinglePopDemo.java +++ b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/AdvancedJobConsumerSinglePopDemo.java @@ -10,8 +10,8 @@ import java.util.concurrent.TimeUnit; import org.springside.modules.nosql.redis.pool.JedisPoolBuilder; -import org.springside.modules.nosql.redis.scheduler.AdvancedJobConsumer; -import org.springside.modules.nosql.redis.scheduler.SimpleJobConsumer; +import org.springside.modules.nosql.redis.service.scheduler.AdvancedJobConsumer; +import org.springside.modules.nosql.redis.service.scheduler.SimpleJobConsumer; import org.springside.modules.test.benchmark.ConcurrentBenchmark; import org.springside.modules.utils.Threads; diff --git a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/SimpleJobConsumerDemo.java b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/SimpleJobConsumerDemo.java index a1f1cdbab..21dafcf87 100644 --- a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/SimpleJobConsumerDemo.java +++ b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/consumer/SimpleJobConsumerDemo.java @@ -12,7 +12,7 @@ import org.springside.modules.nosql.redis.pool.JedisPool; import org.springside.modules.nosql.redis.pool.JedisPoolBuilder; -import org.springside.modules.nosql.redis.scheduler.SimpleJobConsumer; +import org.springside.modules.nosql.redis.service.scheduler.SimpleJobConsumer; import org.springside.modules.test.benchmark.ConcurrentBenchmark; import com.google.common.util.concurrent.RateLimiter; diff --git a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/ReliableJobDispatcherDemo.java b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/ReliableJobDispatcherDemo.java index 5bf1f5c4e..aabab0fff 100644 --- a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/ReliableJobDispatcherDemo.java +++ b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/ReliableJobDispatcherDemo.java @@ -12,8 +12,8 @@ import org.springside.modules.nosql.redis.pool.JedisPool; import org.springside.modules.nosql.redis.pool.JedisPoolBuilder; -import org.springside.modules.nosql.redis.scheduler.JobDispatcher; -import org.springside.modules.nosql.redis.scheduler.JobStatistics; +import org.springside.modules.nosql.redis.service.scheduler.JobDispatcher; +import org.springside.modules.nosql.redis.service.scheduler.JobStatistics; /** * 运行JobDispatcher,每秒将Job从"job:ss:scheduled" sorted set 发布到"job:ss:ready" list. diff --git a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/SimpleJobDispatcherDemo.java b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/SimpleJobDispatcherDemo.java index ebb09f7a5..f4b5c344a 100644 --- a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/SimpleJobDispatcherDemo.java +++ b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/dispatcher/SimpleJobDispatcherDemo.java @@ -12,8 +12,8 @@ import org.springside.modules.nosql.redis.pool.JedisPool; import org.springside.modules.nosql.redis.pool.JedisPoolBuilder; -import org.springside.modules.nosql.redis.scheduler.JobDispatcher; -import org.springside.modules.nosql.redis.scheduler.JobStatistics; +import org.springside.modules.nosql.redis.service.scheduler.JobDispatcher; +import org.springside.modules.nosql.redis.service.scheduler.JobStatistics; /** * 运行JobDispatcher,每秒将Job从"job:ss:scheduled" sorted set 发布到"job:ss:ready" list. diff --git a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/producer/JobProducerDemo.java b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/producer/JobProducerDemo.java index 048b98be4..c5e2699d5 100644 --- a/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/producer/JobProducerDemo.java +++ b/examples/showcase/src/main/java/org/springside/examples/showcase/demos/redis/job/producer/JobProducerDemo.java @@ -11,7 +11,7 @@ import org.springside.examples.showcase.demos.redis.job.dispatcher.SimpleJobDispatcherDemo; import org.springside.modules.nosql.redis.pool.JedisPool; import org.springside.modules.nosql.redis.pool.JedisPoolBuilder; -import org.springside.modules.nosql.redis.scheduler.JobProducer; +import org.springside.modules.nosql.redis.service.scheduler.JobProducer; import org.springside.modules.test.benchmark.BenchmarkTask; import org.springside.modules.test.benchmark.ConcurrentBenchmark; diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/elector/MasterElector.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/elector/MasterElector.java similarity index 98% rename from modules/redis/src/main/java/org/springside/modules/nosql/redis/elector/MasterElector.java rename to modules/redis/src/main/java/org/springside/modules/nosql/redis/service/elector/MasterElector.java index d8b8afa08..23a522060 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/elector/MasterElector.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/elector/MasterElector.java @@ -3,7 +3,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ -package org.springside.modules.nosql.redis.elector; +package org.springside.modules.nosql.redis.service.elector; import java.net.InetAddress; import java.net.UnknownHostException; diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/AdvancedJobConsumer.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/AdvancedJobConsumer.java similarity index 98% rename from modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/AdvancedJobConsumer.java rename to modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/AdvancedJobConsumer.java index 04d2bc64b..a05ff9d34 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/AdvancedJobConsumer.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/AdvancedJobConsumer.java @@ -3,7 +3,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ -package org.springside.modules.nosql.redis.scheduler; +package org.springside.modules.nosql.redis.service.scheduler; import java.util.List; diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobDispatcher.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobDispatcher.java similarity index 98% rename from modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobDispatcher.java rename to modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobDispatcher.java index 3e0628191..b3e88d5b4 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobDispatcher.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobDispatcher.java @@ -3,7 +3,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ -package org.springside.modules.nosql.redis.scheduler; +package org.springside.modules.nosql.redis.service.scheduler; import java.util.List; import java.util.concurrent.Executors; diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobProducer.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobProducer.java similarity index 96% rename from modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobProducer.java rename to modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobProducer.java index cc55b8c61..3d5b18fe3 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobProducer.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobProducer.java @@ -3,7 +3,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ -package org.springside.modules.nosql.redis.scheduler; +package org.springside.modules.nosql.redis.service.scheduler; import java.util.concurrent.TimeUnit; diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobStatistics.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobStatistics.java similarity index 97% rename from modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobStatistics.java rename to modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobStatistics.java index 57c306340..3e63d50ad 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/JobStatistics.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/JobStatistics.java @@ -3,7 +3,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ -package org.springside.modules.nosql.redis.scheduler; +package org.springside.modules.nosql.redis.service.scheduler; import org.springside.modules.nosql.redis.JedisTemplate; diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/Keys.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/Keys.java similarity index 94% rename from modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/Keys.java rename to modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/Keys.java index 7f40b7919..a80a2a5e9 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/Keys.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/Keys.java @@ -3,7 +3,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ -package org.springside.modules.nosql.redis.scheduler; +package org.springside.modules.nosql.redis.service.scheduler; public class Keys { diff --git a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/SimpleJobConsumer.java b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/SimpleJobConsumer.java similarity index 97% rename from modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/SimpleJobConsumer.java rename to modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/SimpleJobConsumer.java index 0db2e9584..6144809e8 100644 --- a/modules/redis/src/main/java/org/springside/modules/nosql/redis/scheduler/SimpleJobConsumer.java +++ b/modules/redis/src/main/java/org/springside/modules/nosql/redis/service/scheduler/SimpleJobConsumer.java @@ -3,7 +3,7 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ -package org.springside.modules.nosql.redis.scheduler; +package org.springside.modules.nosql.redis.service.scheduler; import java.util.List;