this.options = options;
}
public Message.Response execute(QueryState state)
{
ClientState cState = state.getClientState();
String cqlVersion = options.get(CQL_VERSION);
if (cqlVersion == null)
throw new ProtocolException("Missing value CQL_VERSION in STARTUP message");
try
{
cState.setCQLVersion(cqlVersion);
}
catch (InvalidRequestException e)
{
throw new ProtocolException(e.getMessage());
}
if (cState.getCQLVersion().compareTo(new SemanticVersion("2.99.0")) < 0)
throw new ProtocolException(String.format("CQL version %s is not supported by the binary protocol (supported version are >= 3.0.0)", cqlVersion));
if (options.containsKey(COMPRESSION))
{
String compression = options.get(COMPRESSION).toLowerCase();