refactored pipelinebase so it is usable to implement SharedJedisPipeline as well.
This commit is contained in:
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
/**
|
||||
* Transaction is nearly identical to Pipeline, only differences are the multi/discard behaviors
|
||||
*/
|
||||
public class Transaction extends PipelineBase {
|
||||
public class Transaction extends MultiKeyPipelineBase {
|
||||
|
||||
protected boolean inTransaction = true;
|
||||
|
||||
@@ -20,6 +20,16 @@ public class Transaction extends PipelineBase {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Client getClient(String key) {
|
||||
return client;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Client getClient(byte[] key) {
|
||||
return client;
|
||||
}
|
||||
|
||||
public List<Object> exec() {
|
||||
client.exec();
|
||||
client.getAll(1); // Discard all but the last reply
|
||||
|
||||
Reference in New Issue
Block a user