All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.craft.atom.redis.DefaultMasterSlaveShardedRedis Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
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