public static final class SFTPPoolConfig.Builder extends Object
SFTPPoolConfig
objects.Modifier and Type | Method and Description |
---|---|
SFTPPoolConfig |
build()
Creates a new
SFTPPoolConfig object based on the settings of this builder. |
SFTPPoolConfig.Builder |
withInitialSize(int initialSize)
Sets the initial pool size.
|
SFTPPoolConfig.Builder |
withMaxIdleTime(Duration maxIdleTime)
Sets the maximum time that client connections can be idle.
|
SFTPPoolConfig.Builder |
withMaxSize(int maxSize)
Sets the maximum pool size.
|
SFTPPoolConfig.Builder |
withMaxWaitTime(Duration maxWaitTime)
Sets the maximum time to wait when acquiring client connections.
|
public SFTPPoolConfig.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 SFTPPoolConfig.Builder withMaxIdleTime(Duration maxIdleTime)
maxIdleTime
- The maximum idle time, or null
if client connections can be idle indefinitely.public SFTPPoolConfig.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 SFTPPoolConfig.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 SFTPPoolConfig build()
SFTPPoolConfig
object based on the settings of this builder.SFTPPoolConfig
object.Copyright © 2016–2023. All rights reserved.