finagle-clojure.builder.client
Functions for creating and altering com.twitter.finagle.Client
objects independent of any particular codec. Generally speaking codec-specific client functions should be preferred, but these are included for comptability with older systems configured at the client level.
build
(build b)
Given a completed ClientBuilder
, return a new Service
that represents this client.
Arguments:
- a ClientBuilder
Returns:
a com.twitter.finagle.Service that represents a client request
close!
(close! client)
Stops the given client.
Arguments:
client
: an instance of com.twitter.finagle.Client
Returns:
a Future that closes when the client stops
codec
(codec b cdc)
Configures the given ServerBuilder with a codec.
Arguments:
b
: a ClientBuildercdc
: a Codec, CodecFactory, or Function1 that defines the server codec
Returns:
a ClientBuilder configured with the given codec
host-connection-limit
(host-connection-limit b limit)
Configures the given ClientBuilder with a host connection limit.
Arguments:
b
: a ClientBuilderlimit
: the number to limit connections to
Returns:
a ClientBuilder configured with the given limit
hosts
(hosts b hosts)
Configures the given ClientBuilder with one or more hosts.
Arguments:
b
: a ClientBuilderhosts
: aSocketAddress
,Seq<SocketAddress>
or comma-separated string of hostnames
Returns:
a ClientBuilder configured with the given hosts
logger
(logger b l)
Configures the given ClientBuilder with a Logger.
Arguments:
b
: a ClientBuilderl
: a java.util.logging.Logger
Returns
a ClientBuilder configured with the given Logger
report-to
(report-to b rcvr)
Configures the given ClientBuilder with a StatsReceiver to report to.
Arguments:
b
: a ClientBuilderrcvr
: a com.twitter.finagle.stats.StatsReceiver
Returns:
a ClientBulider configured with the given StatsReceiver
retries
(retries b retries)
Configures the given ClientBuilder with a retry limit.
Arguments:
b
: a ClientBuilderretries
: the number of times to retry
Returns:
a ClientBuilder configured with the given retries
tcp-connect-timeout
(tcp-connect-timeout b timeout)
Configures the given ClientBuilder with a TCP connection timeout.
Arguments:
b
: a ClientBuildertimeout
: a com.twitter.util.Duration
Returns:
a ClientBuilder configured with the given timeout