org.craft.atom.redis.DefaultMasterSlaveShardedRedis Maven / Gradle / Ivy
package org.craft.atom.redis;
import java.util.List;
import lombok.ToString;
import org.craft.atom.redis.api.MasterSlaveRedis;
import org.craft.atom.redis.api.MasterSlaveShardedRedis;
import org.craft.atom.redis.spi.Sharded;
/**
* @author mindwind
* @version 1.0, Jun 26, 2013
*/
@ToString(callSuper = true)
public class DefaultMasterSlaveShardedRedis extends AbstractShardedRedis implements MasterSlaveShardedRedis {
public DefaultMasterSlaveShardedRedis(List shards) {
this.sharded = new MasterSlaveRedisMurmurHashSharded(shards);
}
public DefaultMasterSlaveShardedRedis(Sharded sharded) {
this.sharded = sharded;
}
// ~ ---------------------------------------------------------------------------------------------------------
@Override
public List shards() {
return sharded.shards();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy