Projects >> jedis >>4a9b82a4821057f6d6d6d69f801c4d6b4d2a3157

Chunk
Conflicting content
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

public class BinaryJedisCluster implements BinaryJedisCommands,
<<<<<<< HEAD
	MultiKeyBinaryJedisClusterCommands, JedisClusterBinaryScriptingCommands {
=======
        JedisClusterBinaryScriptingCommands, Closeable {
>>>>>>> 53e7dc218fdf8e703bad4cebf6ef7201b96d2b5e
    
    public static final short HASHSLOTS = 16384;
    protected static final int DEFAULT_TIMEOUT = 1;
Solution content
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

public class BinaryJedisCluster implements BinaryJedisCommands,
	MultiKeyBinaryJedisClusterCommands, JedisClusterBinaryScriptingCommands, 
	Closeable {
    
    public static final short HASHSLOTS = 16384;
    protected static final int DEFAULT_TIMEOUT = 1;
File
BinaryJedisCluster.java
Developer's decision
Manual
Kind of conflict
Other
Chunk
Conflicting content
                }
            }.runBinary(key);
    }
<<<<<<< HEAD
    
    @Override
    public Long del(final byte[]... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.del(keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public List blpop(final int timeout, final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.blpop(timeout, keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public List brpop(final int timeout, final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.brpop(timeout, keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public List mget(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.mget(keys);
	    }
	}.runBinary(keys.length - 1, keys);
    }

    @Override
    public String mset(final byte[]... keysvalues) {
	byte[][] keys = new byte[keysvalues.length / 2][];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.mset(keysvalues);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public Long msetnx(final byte[]... keysvalues) {
	byte[][] keys = new byte[keysvalues.length / 2][];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.msetnx(keysvalues);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public String rename(final byte[] oldkey, final byte[] newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.rename(oldkey, newkey);
	    }
	}.runBinary(2, oldkey, newkey);
    }

    @Override
    public Long renamenx(final byte[] oldkey, final byte[] newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.renamenx(oldkey, newkey);
    }

	    }
    @Override
	    @Override
	}.runBinary(2, oldkey, newkey);
    }

    @Override
    public byte[] rpoplpush(final byte[] srckey, final byte[] dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public byte[] execute(Jedis connection) {
		return connection.rpoplpush(srckey, dstkey);
	    }
	}.runBinary(2, srckey, dstkey);
    }

    @Override
    public Set sdiff(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sdiff(keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public Long sdiffstore(final byte[] dstkey, final byte[]... keys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sdiffstore(dstkey, keys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Set sinter(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sinter(keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public Long sinterstore(final byte[] dstkey, final byte[]... keys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sinterstore(dstkey, keys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long smove(final byte[] srckey, final byte[] dstkey,
	    final byte[] member) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.smove(srckey, dstkey, member);
	    }
	}.runBinary(2, srckey, dstkey);
    }

    @Override
    public Long sort(final byte[] key, final SortingParams sortingParameters,
	    final byte[] dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, sortingParameters, dstkey);
	    }
	}.runBinary(2, key, dstkey);
    }

    @Override
    public Long sort(final byte[] key, final byte[] dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, dstkey);
	    }
	}.runBinary(2, key, dstkey);
    }

    @Override
    public Set sunion(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sunion(keys);
	    }
	}.runBinary(keys.length, keys);
	    public String execute(Jedis connection) {
    public void psubscribe(final BinaryJedisPubSub jedisPubSub,
    }

    @Override
    public Long sunionstore(final byte[] dstkey, final byte[]... keys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sunionstore(dstkey, keys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zinterstore(final byte[] dstkey, final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    public Long zinterstore(final byte[] dstkey, final ZParams params,
	    final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, params, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zunionstore(final byte[] dstkey, final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zunionstore(final byte[] dstkey, final ZParams params,
	    final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, params, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public byte[] brpoplpush(final byte[] source, final byte[] destination,
	    final int timeout) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public byte[] execute(Jedis connection) {
		return connection.brpoplpush(source, destination, timeout);
	    }
	}.runBinary(2, source, destination);
    }

    @Override
    public Long publish(final byte[] channel, final byte[] message) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.publish(channel, message);
	    }
	}.runWithAnyNode();
    }

    @Override
    public void subscribe(final BinaryJedisPubSub jedisPubSub,
	    final byte[]... channels) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, channels);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
	    final byte[]... patterns) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, patterns);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
    public Long bitop(final BitOP op, final byte[] destKey,
	    final byte[]... srcKeys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(destKey, srcKeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.bitop(op, destKey, srcKeys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public String pfmerge(final byte[] destkey, final byte[]... sourcekeys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(destkey, sourcekeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		return connection.pfmerge(destkey, sourcekeys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long pfcount(final byte[]... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.pfcount(keys);
	    }
	}.runBinary(keys.length, keys);
=======

    @Override
    public void close() throws IOException {
	if (connectionHandler != null) {
	    for (JedisPool pool : connectionHandler.getNodes().values()) {
		try {
		    if (pool != null) {
			pool.destroy();
		    }
		} catch (Exception e) {
		    // pass
		}
	    }
	}	
>>>>>>> 53e7dc218fdf8e703bad4cebf6ef7201b96d2b5e
    }
}
Solution content
                }
            }.runBinary(key);
    }
    
    @Override
    public Long del(final byte[]... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.del(keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
	    }
    public List blpop(final int timeout, final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.blpop(timeout, keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public List brpop(final int timeout, final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.brpop(timeout, keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public List mget(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.mget(keys);
	    }
	}.runBinary(keys.length - 1, keys);
    }

    @Override
    public String mset(final byte[]... keysvalues) {
	byte[][] keys = new byte[keysvalues.length / 2][];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.mset(keysvalues);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public Long msetnx(final byte[]... keysvalues) {
	byte[][] keys = new byte[keysvalues.length / 2][];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.msetnx(keysvalues);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public String rename(final byte[] oldkey, final byte[] newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.rename(oldkey, newkey);
	    }
	}.runBinary(2, oldkey, newkey);
    }

    @Override
    public Long renamenx(final byte[] oldkey, final byte[] newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.renamenx(oldkey, newkey);
	    }
	}.runBinary(2, oldkey, newkey);
    }

    @Override
    public byte[] rpoplpush(final byte[] srckey, final byte[] dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public byte[] execute(Jedis connection) {
		return connection.rpoplpush(srckey, dstkey);
	    }
	}.runBinary(2, srckey, dstkey);
    }

    @Override
    public Set sdiff(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sdiff(keys);
	}.runBinary(keys.length, keys);
    }

    @Override
    public Long sdiffstore(final byte[] dstkey, final byte[]... keys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sdiffstore(dstkey, keys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Set sinter(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sinter(keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public Long sinterstore(final byte[] dstkey, final byte[]... keys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sinterstore(dstkey, keys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long smove(final byte[] srckey, final byte[] dstkey,
	    final byte[] member) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.smove(srckey, dstkey, member);
	    }
	}.runBinary(2, srckey, dstkey);
    }

    @Override
    public Long sort(final byte[] key, final SortingParams sortingParameters,
	    final byte[] dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, sortingParameters, dstkey);
	    }
	}.runBinary(2, key, dstkey);
    }

    @Override
    public Long sort(final byte[] key, final byte[] dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, dstkey);
	    }
	}.runBinary(2, key, dstkey);
    }

    @Override
    public Set sunion(final byte[]... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sunion(keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public Long sunionstore(final byte[] dstkey, final byte[]... keys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sunionstore(dstkey, keys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zinterstore(final byte[] dstkey, final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zinterstore(final byte[] dstkey, final ZParams params,
	    final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, params, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zunionstore(final byte[] dstkey, final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zunionstore(final byte[] dstkey, final ZParams params,
	    final byte[]... sets) {
	byte[][] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, params, sets);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public byte[] brpoplpush(final byte[] source, final byte[] destination,
	    final int timeout) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public byte[] execute(Jedis connection) {
		return connection.brpoplpush(source, destination, timeout);
	    }
	}.runBinary(2, source, destination);
    }

    @Override
    public Long publish(final byte[] channel, final byte[] message) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.publish(channel, message);
	    }
	}.runWithAnyNode();
    }

    @Override
    public void subscribe(final BinaryJedisPubSub jedisPubSub,
	    final byte[]... channels) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, channels);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
    public void psubscribe(final BinaryJedisPubSub jedisPubSub,
	    final byte[]... patterns) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, patterns);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
    public Long bitop(final BitOP op, final byte[] destKey,
	    final byte[]... srcKeys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(destKey, srcKeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.bitop(op, destKey, srcKeys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public String pfmerge(final byte[] destkey, final byte[]... sourcekeys) {
	byte[][] wholeKeys = KeyMergeUtil.merge(destkey, sourcekeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.pfmerge(destkey, sourcekeys);
	    }
	}.runBinary(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long pfcount(final byte[]... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.pfcount(keys);
	    }
	}.runBinary(keys.length, keys);
    }

    @Override
    public void close() throws IOException {
	if (connectionHandler != null) {
	    for (JedisPool pool : connectionHandler.getNodes().values()) {
		try {
		    if (pool != null) {
			pool.destroy();
		    }
		} catch (Exception e) {
		    // pass
		}
	    }
	}	
    }
}
File
BinaryJedisCluster.java
Developer's decision
Concatenation
Kind of conflict
Annotation
If statement
Method declaration
Method invocation
Method signature
Return statement
Chunk
Conflicting content
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

public class JedisCluster extends BinaryJedisCluster implements JedisCommands,
<<<<<<< HEAD
	MultiKeyJedisClusterCommands, JedisClusterScriptingCommands {
=======
        JedisClusterScriptingCommands {
    public static enum Reset {SOFT, HARD}
>>>>>>> 53e7dc218fdf8e703bad4cebf6ef7201b96d2b5e

    public JedisCluster(Set nodes) {
	this(nodes, DEFAULT_TIMEOUT);
Solution content
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

public class JedisCluster extends BinaryJedisCluster implements JedisCommands,
	MultiKeyJedisClusterCommands, JedisClusterScriptingCommands {
    public static enum Reset {SOFT, HARD}

    public JedisCluster(Set nodes) {
	this(nodes, DEFAULT_TIMEOUT);
File
JedisCluster.java
Developer's decision
Combination
Kind of conflict
Enum declaration
Chunk
Conflicting content
	}.run(key);
    }

<<<<<<< HEAD
    @Deprecated
    /**
     * This method is deprecated due to bug (scan cursor should be unsigned long)
     * And will be removed on next major release
     * @see https://github.com/xetorthio/jedis/issues/531 
     */
    @Override
    public ScanResult> hscan(final String key,
	    final int cursor) {
	return new JedisClusterCommand>>(
		connectionHandler, timeout, maxRedirections) {
	    @Override
	    public ScanResult> execute(Jedis connection) {
		return connection.hscan(key, cursor);
	    }
	}.run(key);
    }

    @Deprecated
    /**
     * This method is deprecated due to bug (scan cursor should be unsigned long)
     * And will be removed on next major release
     * @see https://github.com/xetorthio/jedis/issues/531 
     */
    @Override
    public ScanResult sscan(final String key, final int cursor) {
	return new JedisClusterCommand>(connectionHandler,
    }

		timeout, maxRedirections) {
	    @Override
	    public ScanResult execute(Jedis connection) {
		return connection.sscan(key, cursor);
	    }
	}.run(key);
    }

    @Deprecated
    /**
     * This method is deprecated due to bug (scan cursor should be unsigned long)
     * And will be removed on next major release
     * @see https://github.com/xetorthio/jedis/issues/531 
     */
    @Override
    public ScanResult zscan(final String key, final int cursor) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public ScanResult execute(Jedis connection) {
		return connection.zscan(key, cursor);
	    }
	}.run(key);
    }
    
=======
    public Map getClusterNodes() {
	return connectionHandler.getNodes();
>>>>>>> 53e7dc218fdf8e703bad4cebf6ef7201b96d2b5e
    @Override
    public ScanResult> hscan(final String key,
	    final String cursor) {
Solution content
	}.run(key);
    }

    public Map getClusterNodes() {
	return connectionHandler.getNodes();
    }

    @Override
    public ScanResult> hscan(final String key,
	    final String cursor) {
File
JedisCluster.java
Developer's decision
Version 2
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
    }

    @Override
<<<<<<< HEAD
    public Long del(final String... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.del(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public List blpop(final int timeout, final String... keys) {
=======
    public List blpop(final int timeout, final String key) {
>>>>>>> 53e7dc218fdf8e703bad4cebf6ef7201b96d2b5e
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
Solution content
    }

    @Override
    public Long del(final String... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.del(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public List blpop(final int timeout, final String... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
File
JedisCluster.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Method signature
Chunk
Conflicting content
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
<<<<<<< HEAD
		return connection.blpop(timeout, keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public List brpop(final int timeout, final String... keys) {
=======
		return connection.blpop(timeout,key);
	    }
	}.run(null);
    }

    @Override
    public List brpop(final int timeout, final String key) {
>>>>>>> 53e7dc218fdf8e703bad4cebf6ef7201b96d2b5e
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
Solution content
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.blpop(timeout, keys);
	    }
	}.run(keys.length, keys);

    }
    
    @Override
    public List brpop(final int timeout, final String... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
File
JedisCluster.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method invocation
Method signature
Return statement
Variable
Chunk
Conflicting content
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
<<<<<<< HEAD
		return connection.brpop(timeout, keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public List mget(final String... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.mget(keys);
	    }
	}.run(keys.length - 1, keys);
    }

    @Override
    public String mset(final String... keysvalues) {
	String[] keys = new String[keysvalues.length / 2];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.mset(keysvalues);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long msetnx(final String... keysvalues) {
	String[] keys = new String[keysvalues.length / 2];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.msetnx(keysvalues);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public String rename(final String oldkey, final String newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.rename(oldkey, newkey);
	    }
	}.run(2, oldkey, newkey);
    }

    @Override
    public Long renamenx(final String oldkey, final String newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.renamenx(oldkey, newkey);
	    }
	}.run(2, oldkey, newkey);
    }

    @Override
    public String rpoplpush(final String srckey, final String dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.rpoplpush(srckey, dstkey);
	    }
	}.run(2, srckey, dstkey);
    }

    @Override
    public Set sdiff(final String... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sdiff(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long sdiffstore(final String dstkey, final String... keys) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sdiffstore(dstkey, keys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Set sinter(final String... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sinter(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long sinterstore(final String dstkey, final String... keys) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sinterstore(dstkey, keys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Long smove(final String srckey, final String dstkey,
	    final String member) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.smove(srckey, dstkey, member);
	    }
	}.run(2, srckey, dstkey);
    }

    @Override
    public Long sort(final String key, final SortingParams sortingParameters,
	    final String dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, sortingParameters, dstkey);
	    }
	}.run(2, key, dstkey);
    }

    @Override
    public Long sort(final String key, final String dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, dstkey);
	    }
	}.run(2, key, dstkey);
    }

    @Override
    public Set sunion(final String... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sunion(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long sunionstore(final String dstkey, final String... keys) {
	String[] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sunionstore(dstkey, keys);
	    }
	}.run(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zinterstore(final String dstkey, final String... sets) {
	String[] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, sets);
	    }
	}.run(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zinterstore(final String dstkey, final ZParams params,
	    final String... sets) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, params, sets);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Long zunionstore(final String dstkey, final String... sets) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, sets);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Long zunionstore(final String dstkey, final ZParams params,
	    final String... sets) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, params, sets);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public String brpoplpush(final String source, final String destination,
	    final int timeout) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.brpoplpush(source, destination, timeout);
	    }
	}.run(2, source, destination);
    }

    @Override
    public Long publish(final String channel, final String message) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.publish(channel, message);
	    }
	}.runWithAnyNode();
    }

    @Override
    public void subscribe(final JedisPubSub jedisPubSub,
	    final String... channels) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, channels);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
    public void psubscribe(final JedisPubSub jedisPubSub,
	    final String... patterns) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, patterns);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
    public Long bitop(final BitOP op, final String destKey,
	    final String... srcKeys) {
	String[] mergedKeys = KeyMergeUtil.merge(destKey, srcKeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.bitop(op, destKey, srcKeys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public String pfmerge(final String destkey, final String... sourcekeys) {
	String[] mergedKeys = KeyMergeUtil.merge(destkey, sourcekeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.pfmerge(destkey, sourcekeys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public long pfcount(final String... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.pfcount(keys);
	    }
	}.run(keys.length, keys);
=======
		return connection.brpop(timeout,key);
	    }
	}.run(null);
>>>>>>> 53e7dc218fdf8e703bad4cebf6ef7201b96d2b5e
    }
}
Solution content
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.brpop(timeout, keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public List mget(final String... keys) {
	return new JedisClusterCommand>(connectionHandler,
		timeout, maxRedirections) {
	    @Override
	    public List execute(Jedis connection) {
		return connection.mget(keys);
	    }
	}.run(keys.length - 1, keys);
    }

    @Override
    public String mset(final String... keysvalues) {
	String[] keys = new String[keysvalues.length / 2];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.mset(keysvalues);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long msetnx(final String... keysvalues) {
	String[] keys = new String[keysvalues.length / 2];

	for (int keyIdx = 0; keyIdx < keys.length; keyIdx++) {
	    keys[keyIdx] = keysvalues[keyIdx * 2];
	}

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.msetnx(keysvalues);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public String rename(final String oldkey, final String newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.rename(oldkey, newkey);
	    }
	}.run(2, oldkey, newkey);
    }

    @Override
    public Long renamenx(final String oldkey, final String newkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.renamenx(oldkey, newkey);
	    }
	}.run(2, oldkey, newkey);
    }

    @Override
    public String rpoplpush(final String srckey, final String dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.rpoplpush(srckey, dstkey);
	    }
	}.run(2, srckey, dstkey);
    }

    @Override
    public Set sdiff(final String... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sdiff(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long sdiffstore(final String dstkey, final String... keys) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sdiffstore(dstkey, keys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Set sinter(final String... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sinter(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long sinterstore(final String dstkey, final String... keys) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, keys);
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sinterstore(dstkey, keys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Long smove(final String srckey, final String dstkey,
	    final String member) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.smove(srckey, dstkey, member);
	    }
	}.run(2, srckey, dstkey);
    }

    @Override
    public Long sort(final String key, final SortingParams sortingParameters,
	    final String dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, sortingParameters, dstkey);
	    }
	}.run(2, key, dstkey);
    }

    @Override
    public Long sort(final String key, final String dstkey) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sort(key, dstkey);
	    }
	}.run(2, key, dstkey);
    }

    @Override
    public Set sunion(final String... keys) {
	return new JedisClusterCommand>(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Set execute(Jedis connection) {
		return connection.sunion(keys);
	    }
	}.run(keys.length, keys);
    }

    @Override
    public Long sunionstore(final String dstkey, final String... keys) {
	String[] wholeKeys = KeyMergeUtil.merge(dstkey, keys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.sunionstore(dstkey, keys);
	    }
	}.run(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zinterstore(final String dstkey, final String... sets) {
	String[] wholeKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, sets);
	    }
	}.run(wholeKeys.length, wholeKeys);
    }

    @Override
    public Long zinterstore(final String dstkey, final ZParams params,
	    final String... sets) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zinterstore(dstkey, params, sets);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Long zunionstore(final String dstkey, final String... sets) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, sets);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public Long zunionstore(final String dstkey, final ZParams params,
	    final String... sets) {
	String[] mergedKeys = KeyMergeUtil.merge(dstkey, sets);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.zunionstore(dstkey, params, sets);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public String brpoplpush(final String source, final String destination,
	    final int timeout) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.brpoplpush(source, destination, timeout);
	    }
	}.run(2, source, destination);
    }

    @Override
    public Long publish(final String channel, final String message) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.publish(channel, message);
	    }
	}.runWithAnyNode();
    }

    @Override
    public void subscribe(final JedisPubSub jedisPubSub,
	    final String... channels) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, channels);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
    public void psubscribe(final JedisPubSub jedisPubSub,
	    final String... patterns) {
	new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Integer execute(Jedis connection) {
		connection.subscribe(jedisPubSub, patterns);
		return 0;
	    }
	}.runWithAnyNode();
    }

    @Override
    public Long bitop(final BitOP op, final String destKey,
	    final String... srcKeys) {
	String[] mergedKeys = KeyMergeUtil.merge(destKey, srcKeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.bitop(op, destKey, srcKeys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public String pfmerge(final String destkey, final String... sourcekeys) {
	String[] mergedKeys = KeyMergeUtil.merge(destkey, sourcekeys);

	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public String execute(Jedis connection) {
		return connection.pfmerge(destkey, sourcekeys);
	    }
	}.run(mergedKeys.length, mergedKeys);
    }

    @Override
    public long pfcount(final String... keys) {
	return new JedisClusterCommand(connectionHandler, timeout,
		maxRedirections) {
	    @Override
	    public Long execute(Jedis connection) {
		return connection.pfcount(keys);
	    }
	}.run(keys.length, keys);
    }

}
File
JedisCluster.java
Developer's decision
Combination
Kind of conflict
Annotation
Method declaration
Method invocation
Method signature
Return statement
Variable