Class FTPPoolConfig
- java.lang.Object
-
- com.github.robtimus.filesystems.ftp.FTPPoolConfig
-
public final class FTPPoolConfig extends Object
Configuration for the client connection pools of FTP file systems.Instances of this class are immutable and thread-safe.
- Author:
- Rob Spoor
- Since:
- 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFTPPoolConfig.BuilderA builder forFTPPoolConfigobjects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FTPPoolConfig.Buildercustom()Returns a new builder for creatingFTPPoolConfigobjects.static FTPPoolConfigdefaultConfig()Returns a defaultFTPPoolConfigobject.intinitialSize()Returns the initial pool size.Optional<Duration>maxIdleTime()Returns the maximum time that client connections can be idle.intmaxSize()Returns the maximum pool size.Optional<Duration>maxWaitTime()Returns the maximum time to wait when acquiring client connections.StringtoString()
-
-
-
Method Detail
-
maxWaitTime
public Optional<Duration> maxWaitTime()
Returns the maximum time to wait when acquiring client connections.- Returns:
- An
Optionaldescribing the maximum time to wait when acquiring client connections, orOptional#empty()to wait indefinitely.
-
maxIdleTime
public Optional<Duration> maxIdleTime()
Returns the maximum time that client connections can be idle.- Returns:
- An
Optionaldescribing the maximum time that client connections can be idle, orOptional.empty()if client connections can be idle indefinitely.
-
initialSize
public int initialSize()
Returns the initial pool size. This is the number of idle client connections to start with.- Returns:
- The initial pool size.
-
maxSize
public int maxSize()
Returns the maximum pool size. This is the maximum number of client connections, both idle and currently in use.- Returns:
- The maximum pool size.
-
defaultConfig
public static FTPPoolConfig defaultConfig()
Returns a defaultFTPPoolConfigobject. This has the same configuration as an object returned bycustom().build().- Returns:
- A default
FTPPoolConfigobject. - See Also:
custom()
-
custom
public static FTPPoolConfig.Builder custom()
Returns a new builder for creatingFTPPoolConfigobjects.- Returns:
- A new builder for creating
FTPPoolConfigobjects.
-
-