Search:

Search all manuals
Search this manual
Manual
Membase Client Library: Java
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
1 Membase Client Library: Java — Getting Started
Chapter Sections
Chapters

1.3. Connecting using Hostname and Port with Binary Protocol

To enforce communication using the binary protocol by providing the connection factory to be used for communication. The BinaryConnectionFactory class is used to specify that the binary Memcached protocol is used.

For example, to enforce binary connections to the servera and serverb as listed in the previous example:

MemcachedClient c = new MemcachedClient(new BinaryConnectionFactory(),
    AddrUtil.getAddresses("servera:11211 serverb:11211")););