[#207] fix(api): fixed ShowStatement behaviour for parallel requests

This commit is contained in:
Ilnur Farukhshin 2021-08-11 20:39:19 +03:00
parent 5930023365
commit efa646a657

View file

@ -1,6 +1,7 @@
package com.provectus.kafka.ui.strategy.ksql.statement;
import com.fasterxml.jackson.databind.JsonNode;
import com.provectus.kafka.ui.model.KsqlCommand;
import com.provectus.kafka.ui.model.KsqlCommandResponse;
import java.util.List;
import java.util.Optional;
@ -36,6 +37,15 @@ public class ShowStrategy extends BaseStrategy {
return "";
}
@Override
public BaseStrategy ksqlCommand(KsqlCommand ksqlCommand) {
// return new instance to avoid conflicts for parallel requests
ShowStrategy clone = new ShowStrategy();
clone.setResponseValueKey(responseValueKey);
clone.ksqlCommand = ksqlCommand;
return clone;
}
protected String getShowRegExp(String key) {
return "show " + key + ";";
}