public static class GrizzlyMemcachedCacheManager.Builder extends Object
| Constructor and Description |
|---|
GrizzlyMemcachedCacheManager.Builder() |
| Modifier and Type | Method and Description |
|---|---|
GrizzlyMemcachedCacheManager.Builder |
blocking(boolean blocking)
Enable or disable the blocking mode
If this cache manager will create a default transport, the given mode will be passed to
TCPNIOTransport. |
GrizzlyMemcachedCacheManager |
build()
Create a
GrizzlyMemcachedCacheManager instance with this builder's properties |
GrizzlyMemcachedCacheManager.Builder |
ioStrategy(org.glassfish.grizzly.IOStrategy ioStrategy)
Set the specific IO Strategy of Grizzly
If this cache manager will create a default transport, the given
IOStrategy will be passed to TCPNIOTransport. |
GrizzlyMemcachedCacheManager.Builder |
selectorRunnersCount(int selectorRunnersCount)
Set selector threads' count
If this cache manager will create a default transport, the given selector counts will be passed to
TCPNIOTransport. |
GrizzlyMemcachedCacheManager.Builder |
transport(org.glassfish.grizzly.nio.transport.TCPNIOTransport transport)
Set the specific
GrizzlyTransport
If this is not set or set to be null, GrizzlyMemcachedCacheManager will create a default transport. |
GrizzlyMemcachedCacheManager.Builder |
workerThreadPool(ExecutorService workerThreadPool)
Set the specific worker thread pool
If this cache manager will create a default transport, the given
ExecutorService will be passed to TCPNIOTransport. |
GrizzlyMemcachedCacheManager.Builder |
zooKeeperConfig(ZooKeeperConfig zooKeeperConfig)
Set the
ZooKeeperConfig for synchronizing cache server list among cache clients |
public GrizzlyMemcachedCacheManager.Builder()
public GrizzlyMemcachedCacheManager.Builder transport(org.glassfish.grizzly.nio.transport.TCPNIOTransport transport)
GrizzlyTransport
If this is not set or set to be null, GrizzlyMemcachedCacheManager 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 GrizzlyMemcachedCacheManager.Builder selectorRunnersCount(int selectorRunnersCount)
TCPNIOTransport.
Default is processors' count * 2.selectorRunnersCount - selector threads' countpublic GrizzlyMemcachedCacheManager.Builder ioStrategy(org.glassfish.grizzly.IOStrategy ioStrategy)
IOStrategy will be passed to TCPNIOTransport.
Default is SameThreadIOStrategy.ioStrategy - the specific IO Strategypublic GrizzlyMemcachedCacheManager.Builder blocking(boolean blocking)
TCPNIOTransport.
Default is false.blocking - true means the blocking modepublic GrizzlyMemcachedCacheManager.Builder workerThreadPool(ExecutorService workerThreadPool)
ExecutorService will be passed to TCPNIOTransport.
This is only effective if IOStrategy is not SameThreadIOStrategy.
Default is null.workerThreadPool - worker thread poolpublic GrizzlyMemcachedCacheManager.Builder zooKeeperConfig(ZooKeeperConfig zooKeeperConfig)
ZooKeeperConfig for synchronizing cache server list among cache clientszooKeeperConfig - zookeeper config. if zooKeeperConfig is null, the zookeeper is never used.public GrizzlyMemcachedCacheManager build()
GrizzlyMemcachedCacheManager instance with this builder's propertiesCopyright © 2015 Project Grizzly. All Rights Reserved.