public static class GrizzlyThriftClientManager.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
GrizzlyThriftClientManager.Builder |
blocking(boolean blocking)
Enable or disable the blocking mode
|
GrizzlyThriftClientManager |
build()
Create a
GrizzlyThriftClientManager instance with this builder's properties |
GrizzlyThriftClientManager.Builder |
ioStrategy(org.glassfish.grizzly.IOStrategy ioStrategy)
Set the specific IO Strategy of Grizzly
|
GrizzlyThriftClientManager.Builder |
maxThriftFrameLength(int maxThriftFrameLength)
Set the max length of thrift frame
|
GrizzlyThriftClientManager.Builder |
selectorRunnersCount(int selectorRunnersCount)
Set selector threads' count
|
GrizzlyThriftClientManager.Builder |
transport(org.glassfish.grizzly.nio.transport.TCPNIOTransport transport)
Set the specific
GrizzlyTransport |
GrizzlyThriftClientManager.Builder |
workerThreadPool(ExecutorService workerThreadPool)
Set the specific worker thread pool
|
GrizzlyThriftClientManager.Builder |
zooKeeperConfig(ZooKeeperConfig zooKeeperConfig)
Set the
ZooKeeperConfig for synchronizing thrift server list among thrift clients |
public GrizzlyThriftClientManager.Builder transport(org.glassfish.grizzly.nio.transport.TCPNIOTransport transport)
GrizzlyTransport
If this is not set or set to be null, GrizzlyThriftClientManager will create a default transport.
The given transport must be always started state if it is not null.
Default is null.
transport - the specific Grizzly's TCPNIOTransportpublic GrizzlyThriftClientManager.Builder selectorRunnersCount(int selectorRunnersCount)
If this thrift client manager will create a default transport, the given selector counts will be passed to TCPNIOTransport.
Default is processors' count * 2.
selectorRunnersCount - selector threads' countpublic GrizzlyThriftClientManager.Builder ioStrategy(org.glassfish.grizzly.IOStrategy ioStrategy)
If this thrift client manager will create a default transport, the given IOStrategy will be passed to TCPNIOTransport.
Default is SameThreadIOStrategy.
ioStrategy - the specific IO Strategypublic GrizzlyThriftClientManager.Builder blocking(boolean blocking)
If this thrift client manager will create a default transport, the given mode will be passed to TCPNIOTransport.
Default is false.
blocking - true means the blocking modepublic GrizzlyThriftClientManager.Builder workerThreadPool(ExecutorService workerThreadPool)
If this thrift client manager will create a default transport, the given ExecutorService will be passed to TCPNIOTransport.
This is only effective if IOStrategy is not SameThreadIOStrategy.
Default is null.
workerThreadPool - worker thread poolpublic GrizzlyThriftClientManager.Builder zooKeeperConfig(ZooKeeperConfig zooKeeperConfig)
ZooKeeperConfig for synchronizing thrift server list among thrift clientszooKeeperConfig - zookeeper config. if zooKeeperConfig is null, the zookeeper is never used.public GrizzlyThriftClientManager.Builder maxThriftFrameLength(int maxThriftFrameLength)
maxThriftFrameLength - max frame lengthpublic GrizzlyThriftClientManager build()
GrizzlyThriftClientManager instance with this builder's propertiesCopyright © 2017-2019 Oracle Corporation. All Rights Reserved.