| Chunk |
|---|
| Conflicting content |
|---|
// "Commands operating on the key space" KEYS (RequestType.KEY, ResponseType.MULTI_BULK), <<<<<<< HEAD RANDOMKEY (RequestType.NO_ARG, ResponseType.BULK), ======= KEYSTOLIST (RequestType.KEY_KEY, ResponseType.NUMBER), RANDOMKEY (RequestType.NO_ARG, ResponseType.STRING), >>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b RENAME (RequestType.KEY_KEY, ResponseType.STATUS), RENAMENX (RequestType.KEY_KEY, ResponseType.BOOLEAN), DBSIZE (RequestType.NO_ARG, ResponseType.NUMBER), |
| Solution content |
|---|
// "Commands operating on the key space"
KEYS (RequestType.KEY, ResponseType.MULTI_BULK),
KEYSTOLIST (RequestType.KEY_KEY, ResponseType.NUMBER),
RANDOMKEY (RequestType.NO_ARG, ResponseType.BULK),
RENAME (RequestType.KEY_KEY, ResponseType.STATUS),
RENAMENX (RequestType.KEY_KEY, ResponseType.BOOLEAN),
DBSIZE (RequestType.NO_ARG, ResponseType.NUMBER), |
| File |
|---|
| Command.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Enum value |
| Chunk |
|---|
| Conflicting content |
|---|
return new FutureLong(this.queueRequest(Command.RPUSH, keybytes, value));
}
<<<<<<< HEAD
=======
public FutureLong rpushx(String key, byte[] value) {
byte[] keybytes = null;
if ((keybytes = getKeyBytes(key)) == null)
throw new IllegalArgumentException ("invalid key => ["+key+"]");
if (value == null)
throw new IllegalArgumentException ("null value");
return new FutureLong(this.queueRequest(Command.RPUSHX, keybytes, value));
}
public FutureLong lpushx(String key, byte[] value) {
byte[] keybytes = null;
if ((keybytes = getKeyBytes(key)) == null)
throw new IllegalArgumentException ("invalid key => ["+key+"]");
if (value == null)
throw new IllegalArgumentException ("null value");
return new FutureLong(this.queueRequest(Command.LPUSHX, keybytes, value));
}
public FutureLong linsert(String key, boolean after, byte[] oldvalue, byte[] newvalue) {
byte[] keybytes = null;
if ((keybytes = getKeyBytes(key)) == null)
throw new IllegalArgumentException ("invalid key => ["+key+"]");
byte[][] bulk = new byte[4][];
bulk[2] = oldvalue;
bulk[0] = keybytes;
bulk[1] = (after ? "AFTER" : "BEFORE").getBytes();
bulk[3] = newvalue;
return new FutureLong(this.queueRequest(Command.LINSERT, bulk));
}
public FutureLong linsertAfter(String key, byte[] oldvalue, byte[] newvalue) {
return linsert(key, true, oldvalue, newvalue);
}
public FutureLong linsertBefore(String key, byte[] oldvalue, byte[] newvalue) {
return linsert(key, false, oldvalue, newvalue);
}
>>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b
// @Override
public FutureByteArray rpoplpush (String srcList, String destList) {
byte[] srckeybytes = null; |
| Solution content |
|---|
return new FutureLong(this.queueRequest(Command.RPUSH, keybytes, value));
}
public FutureLong rpushx(String key, byte[] value) {
byte[] keybytes = null;
if ((keybytes = getKeyBytes(key)) == null)
throw new IllegalArgumentException ("invalid key => ["+key+"]");
if (value == null)
throw new IllegalArgumentException ("null value");
return new FutureLong(this.queueRequest(Command.RPUSHX, keybytes, value));
}
public FutureLong lpushx(String key, byte[] value) {
byte[] keybytes = null;
if ((keybytes = getKeyBytes(key)) == null)
throw new IllegalArgumentException ("invalid key => ["+key+"]");
if (value == null)
throw new IllegalArgumentException ("null value");
return new FutureLong(this.queueRequest(Command.LPUSHX, keybytes, value));
}
public FutureLong linsert(String key, boolean after, byte[] oldvalue, byte[] newvalue) {
byte[] keybytes = null;
if ((keybytes = getKeyBytes(key)) == null)
throw new IllegalArgumentException ("invalid key => ["+key+"]");
byte[][] bulk = new byte[4][];
bulk[0] = keybytes;
bulk[1] = (after ? "AFTER" : "BEFORE").getBytes();
bulk[2] = oldvalue;
bulk[3] = newvalue;
return new FutureLong(this.queueRequest(Command.LINSERT, bulk));
}
public FutureLong linsertAfter(String key, byte[] oldvalue, byte[] newvalue) {
return linsert(key, true, oldvalue, newvalue);
}
public FutureLong linsertBefore(String key, byte[] oldvalue, byte[] newvalue) {
return linsert(key, false, oldvalue, newvalue);
}
// @Override
public FutureByteArray rpoplpush (String srcList, String destList) {
byte[] srckeybytes = null; |
| File |
|---|
| JRedisFutureSupport.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
catch (Exception e) {
throw new ProviderException("Unexpected error on initialize -- BUG", e);
}
<<<<<<< HEAD
// TODO: problematic in constructor.
if(spec.getConnectionFlag(Flag.CONNECT_IMMEDIATELY)) {
connect ();
}
}
/*
* TDOD: this is the right way but breaks some assumptions in various impls.
* - need to add INITIALIZED state and go from there.
*/
// @Override
// public void initialize() throws ClientRuntimeException, ProviderException {
// if(spec.getConnectionFlag(Flag.CONNECT_IMMEDIATELY)) {
// connect ();
// }
// }
=======
if (connectImmediately) {
try {
connect ();
} catch (ClientRuntimeException e) {
// if connecting failed, clean up on our way out.
cleanup();
throw e;
}
}
}
>>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b
// ------------------------------------------------------------------------
// Interface |
| Solution content |
|---|
catch (Exception e) {
throw new ProviderException("Unexpected error on initialize -- BUG", e);
}
if (spec.getConnectionFlag(Flag.CONNECT_IMMEDIATELY)) {
try {
connect ();
} catch (ClientRuntimeException e) {
// if connecting failed, clean up on our way out.
cleanup();
throw e;
}
}
}
// ------------------------------------------------------------------------
// Interface |
| File |
|---|
| ConnectionBase.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public void shutdown() {
mustBeat.set(false);
<<<<<<< HEAD
this.interrupt();
=======
interrupt();
>>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b
}
// ------------------------------------------------------------------------ |
| Solution content |
|---|
*/
public void shutdown() {
mustBeat.set(false);
this.interrupt();
}
// ------------------------------------------------------------------------ |
| File |
|---|
| HeartbeatJinn.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
break;
}
catch (ClientRuntimeException cre) {
<<<<<<< HEAD
Log.problem ("ClientRuntimeException: " + cre.getMessage());
onResponseHandlerError(cre, pending);
break;
=======
Log.error ("ClientRuntimeException: " + cre.getLocalizedMessage());
// cre.printStackTrace();
pending.setCRE(cre);
>>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b
}
catch (RuntimeException e){
Log.problem ("Unexpected (and not handled) RuntimeException: " + e.getMessage()); |
| Solution content |
|---|
break;
}
catch (ClientRuntimeException cre) {
Log.problem ("ClientRuntimeException: " + cre.getMessage());
onResponseHandlerError(cre, pending);
break;
}
catch (RuntimeException e){
Log.problem ("Unexpected (and not handled) RuntimeException: " + e.getMessage()); |
| File |
|---|
| PipelineConnectionBase.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Break statement |
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
break; case BULK_SET: <<<<<<< HEAD Assert.isTrue(cmd == Command.MSET || cmd == Command.MSETNX , "Only MSET/NX bulk commands are supported", NotSupportedException.class); ======= Assert.isTrue(cmd == Command.MSET || cmd == Command.MSETNX || cmd == Command.LINSERT, "Only MSET, MSETNX, LINSERT bulk commands are supported", NotSupportedException.class); >>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b byte[] setCmdLenBytes = Convert.toBytes(cmd.bytes.length); byte[] bulkSetLineCntBytes = Convert.toBytes(args.length+1); |
| Solution content |
|---|
break; case BULK_SET: Assert.isTrue(cmd == Command.MSET || cmd == Command.MSETNX || cmd == Command.LINSERT, "Only MSET, MSETNX, LINSERT bulk commands are supported", NotSupportedException.class); byte[] setCmdLenBytes = Convert.toBytes(cmd.bytes.length); byte[] bulkSetLineCntBytes = Convert.toBytes(args.length+1); |
| File |
|---|
| ProtocolBase.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
package org.jredis.ri.alphazero.support; <<<<<<< HEAD import org.apache.commons.logging.LogFactory; ======= import java.util.logging.Level; import java.util.logging.Logger; >>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b /** * |
| Solution content |
|---|
package org.jredis.ri.alphazero.support; import java.util.logging.Level; import java.util.logging.Logger; /** * |
| File |
|---|
| Log.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
*
*/
public class Log {
<<<<<<< HEAD
public static org.apache.commons.logging.Log logger = LogFactory.getLog("JREDIS");
>>>>>>> 5d192f5bf2135e6bb4c5554af8fcab0d964fe88b
public enum Category { INFO, DEBUG, ERROR, PROBLEM, BUG }
// the various 'just FYI's ...
public static final void log (String msg) { log (msg, (Object[])null); }
public static final void log (String format, Object...args) {
logger.info(String.format(format, args));
}
public static final void debug (String msg) { debug(msg, (Object[])null); }
public static final void debug (String format, Object...args) {
logger.debug(String.format(format, args));
}
// the various 'error! run for covers', ...
public static final void error (String msg) { _error (Category.ERROR, msg); }
public static final void error (String msg, Object...args) { _error (Category.ERROR, msg, args); }
public static final void problem (String msg) { _error (Category.PROBLEM, msg); }
public static final void problem (String msg, Object...args) { _error (Category.PROBLEM, msg, args); }
public static final void bug (String msg) { _error (Category.BUG, msg); }
public static final void bug (String msg, Object...args) { _error (Category.BUG, msg, args); }
private static final void _error (Category cat, String msg, Object...args) {
msg = String.format(msg, args);
if(cat.equals(Category.ERROR))
logger.error(String.format("%s", msg));
else
logger.error(String.format("%s: %s", cat, msg));
=======
public enum Category { INFO, ERROR, PROBLEM, BUG }
public static final void log (String msg) { _loginfo (msg); }
public static final void error (String msg) { _log (Category.ERROR, msg); }
public static final void problem (String msg) { _log (Category.PROBLEM, msg); }
public static final void bug (String msg) { _log (Category.BUG, msg); }
public static Logger logger = Logger.getLogger("org.jredis.JRedis");
public static final void log (String format, Object...args) {
_loginfo(format, args);
}
private static final void _log (Category cat, String msg) {
logger.log(Level.WARNING, msg);
}
private static final void _loginfo (String format, Object...args) {
logger.log(Level.INFO, String.format(format, args)); |
| Solution content |
|---|
public class Log {
*
*/
public static Logger logger = Logger.getLogger("org.jredis.JRedis");
public enum Category { INFO, DEBUG, ERROR, PROBLEM, BUG }
// the various 'just FYI's ...
public static final void log (String msg) { log (msg, (Object[])null); }
public static final void log (String format, Object...args) {
logger.info(String.format(format, args));
}
public static final void debug (String msg) { debug(msg, (Object[])null); }
public static final void debug (String format, Object...args) {
logger.log(Level.FINE, String.format(format, args));
}
// the various 'error! run for covers', ...
public static final void error (String msg) { _error (Category.ERROR, msg); }
public static final void error (String msg, Object...args) { _error (Category.ERROR, msg, args); }
public static final void problem (String msg) { _error (Category.PROBLEM, msg); }
public static final void problem (String msg, Object...args) { _error (Category.PROBLEM, msg, args); }
public static final void bug (String msg) { _error (Category.BUG, msg); }
public static final void bug (String msg, Object...args) { _error (Category.BUG, msg, args); }
private static final void _error (Category cat, String msg, Object...args) {
msg = String.format(msg, args);
if(cat.equals(Category.ERROR))
logger.severe(String.format("%s", msg));
else
logger.log(Level.WARNING, String.format("%s: %s", cat, msg));
} |
| File |
|---|
| Log.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Enum declaration |
| If statement |
| Method declaration |
| Method invocation |
| Method signature |
| Variable |