Elffuss BraidHub

kikocis/java-driver public

Properly use SocketOptions in Stress example

JAVA-214 #fixes
Changeset6e5e1735659279f4706621617711c94c0ced14962ef7432efbba70e26d8d5358
AuthorSylvain Lebresne <sylvain@datastax.com> · 2013-11-19 19:00 +01:00
CommitterSylvain Lebresne <sylvain@datastax.com> · 2013-11-19 19:00 +01:00
Parents62959ab10f48

Browse the files at this changeset

1 file changed

modified driver-examples/stress/src/main/java/com/datastax/driver/stress/Stress.java +1 −3
@@ -224,14 +224,12 @@
224224 System.out.println(" per-host connections: " + maxConnections);
225225 System.out.println(" compression: " + options.has("compression"));
226226
227- SocketOptions socket = new SocketOptions();
228- socket.setTcpNoDelay(true);
229-
230227 try {
231228 // Create session to hosts
232229 Cluster cluster = new Cluster.Builder()
233230 .addContactPoints(String.valueOf(options.valueOf("ip")))
234231 .withPoolingOptions(pools)
232+ .withSocketOptions(new SocketOptions().setTcpNoDelay(true))
235233 .build();
236234
237235 if (options.has("compression"))