Class ProtocolServerConfigurationBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
- java.lang.Object
-
- org.infinispan.server.core.configuration.ProtocolServerConfigurationBuilder<T,S>
-
- All Implemented Interfaces:
Builder<T>
,Self<S>
,ProtocolServerConfigurationChildBuilder<T,S>
- Direct Known Subclasses:
HotRodServerConfigurationBuilder
,MemcachedServerConfigurationBuilder
,RestServerConfigurationBuilder
public abstract class ProtocolServerConfigurationBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>> extends Object implements ProtocolServerConfigurationChildBuilder<T,S>, Builder<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.infinispan.commons.configuration.attributes.AttributeSet
attributes
protected SslConfigurationBuilder<T,S>
ssl
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProtocolServerConfigurationBuilder(int port)
protected
ProtocolServerConfigurationBuilder(int port, org.infinispan.commons.configuration.attributes.AttributeSet attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S
adminOperationsHandler(org.infinispan.server.core.admin.AdminOperationsHandler handler)
Indicates theAdminOperationsHandler
which will be used to handle admin operationsS
defaultCacheName(String defaultCacheName)
Specifies the cache to use as a default cache for the protocolString
host()
S
host(String host)
Specifies the host or IP address on which this server will listenS
idleTimeout(int idleTimeout)
Specifies the maximum time that connections from client will be kept open without activityS
ioThreads(int ioThreads)
Sets the number of I/O threadsString
name()
S
name(String name)
Specifies a custom name for this server in order to easily distinguish it from other servers, e.g.int
port()
S
port(int port)
Specifies the port on which this server will listenBuilder<?>
read(T template)
Reads the configuration from an already created configuration bean into this builder.S
recvBufSize(int recvBufSize)
Sets the size of the receive bufferS
sendBufSize(int sendBufSize)
Sets the size of the send bufferS
socketBinding(String name)
Indicates the name of socket binding which will be usedSslConfigurationBuilder
ssl()
Configures SSLS
startTransport(boolean startTransport)
Indicates whether transport implementation should or should not be started.S
tcpKeepAlive(boolean tcpKeepAlive)
Affects TCP KEEPALIVE on the TCP stack.S
tcpNoDelay(boolean tcpNoDelay)
Affects TCP NODELAY on the TCP stack.void
validate()
Validate the data in this builder before building the configuration beanS
workerThreads(int workerThreads)
Sets the number of worker threads-
Methods inherited from interface org.infinispan.server.core.configuration.ProtocolServerConfigurationChildBuilder
build
-
-
-
-
Field Detail
-
attributes
protected final org.infinispan.commons.configuration.attributes.AttributeSet attributes
-
ssl
protected final SslConfigurationBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>> ssl
-
-
Method Detail
-
defaultCacheName
public S defaultCacheName(String defaultCacheName)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Specifies the cache to use as a default cache for the protocol- Specified by:
defaultCacheName
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
name
public S name(String name)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Specifies a custom name for this server in order to easily distinguish it from other servers, e.g. via JMX. Defaults to the empty string.- Specified by:
name
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
name
public String name()
-
host
public S host(String host)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Specifies the host or IP address on which this server will listen- Specified by:
host
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
host
public String host()
-
port
public S port(int port)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Specifies the port on which this server will listen- Specified by:
port
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
port
public int port()
-
idleTimeout
public S idleTimeout(int idleTimeout)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Specifies the maximum time that connections from client will be kept open without activity- Specified by:
idleTimeout
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
tcpNoDelay
public S tcpNoDelay(boolean tcpNoDelay)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Affects TCP NODELAY on the TCP stack. Defaults to enabled- Specified by:
tcpNoDelay
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
tcpKeepAlive
public S tcpKeepAlive(boolean tcpKeepAlive)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Affects TCP KEEPALIVE on the TCP stack. Defaults to disabled- Specified by:
tcpKeepAlive
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
recvBufSize
public S recvBufSize(int recvBufSize)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Sets the size of the receive buffer- Specified by:
recvBufSize
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
sendBufSize
public S sendBufSize(int sendBufSize)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Sets the size of the send buffer- Specified by:
sendBufSize
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
ssl
public SslConfigurationBuilder ssl()
Description copied from interface:ProtocolServerConfigurationChildBuilder
Configures SSL- Specified by:
ssl
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
ioThreads
public S ioThreads(int ioThreads)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Sets the number of I/O threads- Specified by:
ioThreads
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
workerThreads
public S workerThreads(int workerThreads)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Sets the number of worker threads- Specified by:
workerThreads
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
startTransport
public S startTransport(boolean startTransport)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Indicates whether transport implementation should or should not be started.- Specified by:
startTransport
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
adminOperationsHandler
public S adminOperationsHandler(org.infinispan.server.core.admin.AdminOperationsHandler handler)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Indicates theAdminOperationsHandler
which will be used to handle admin operations- Specified by:
adminOperationsHandler
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
socketBinding
public S socketBinding(String name)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Indicates the name of socket binding which will be used- Specified by:
socketBinding
in interfaceProtocolServerConfigurationChildBuilder<T extends ProtocolServerConfiguration,S extends ProtocolServerConfigurationChildBuilder<T,S>>
-
validate
public void validate()
Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<T extends ProtocolServerConfiguration>
-
read
public Builder<?> read(T template)
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<T extends ProtocolServerConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
-