use of org.apache.cassandra.transport.messages.StartupMessage in project cassandra by apache.
the class SimpleClient method connect.
public void connect(boolean useCompression) throws IOException {
establishConnection();
Map<String, String> options = new HashMap<>();
options.put(StartupMessage.CQL_VERSION, "3.0.0");
if (useCompression) {
options.put(StartupMessage.COMPRESSION, "snappy");
connection.setCompressor(FrameCompressor.SnappyCompressor.instance);
}
execute(new StartupMessage(options));
}
Aggregations