public static final class FTPPoolConfig.Builder extends Object
FTPPoolConfig
objects.Modifier and Type | Method and Description |
---|---|
FTPPoolConfig |
build()
Creates a new
FTPPoolConfig object based on the settings of this builder. |
FTPPoolConfig.Builder |
withInitialSize(int initialSize)
Sets the initial pool size.
|
FTPPoolConfig.Builder |
withMaxIdleTime(Duration maxIdleTime)
Sets the maximum time that client connections can be idle.
|
FTPPoolConfig.Builder |
withMaxSize(int maxSize)
Sets the maximum pool size.
|
FTPPoolConfig.Builder |
withMaxWaitTime(Duration maxWaitTime)
Sets the maximum time to wait when acquiring client connections.
|
public FTPPoolConfig.Builder withMaxWaitTime(Duration maxWaitTime)
null
or negative, acquiring client connections should block until a connection is available.
The default is to wait indefinitely.maxWaitTime
- The maximum wait time.public FTPPoolConfig.Builder withMaxIdleTime(Duration maxIdleTime)
maxIdleTime
- The maximum idle time, or null
if client connections can be idle indefinitely.public FTPPoolConfig.Builder withInitialSize(int initialSize)
If the maximum pool size is smaller than the given initial size, it will be set to be equal to the given initial size.
initialSize
- The initial pool size.IllegalArgumentException
- If the initial size is negative.public FTPPoolConfig.Builder withMaxSize(int maxSize)
If the initial pool size is larger than the given maximum size, it will be set to be equal to the given maximum size.
maxSize
- The maximum pool size.IllegalArgumentException
- If the given size is not positive.public FTPPoolConfig build()
FTPPoolConfig
object based on the settings of this builder.FTPPoolConfig
object.Copyright © 2016–2024. All rights reserved.