Package org.apache.flink.core.fs
Class LimitedConnectionsFileSystem.ConnectionLimitingSettings
- java.lang.Object
-
- org.apache.flink.core.fs.LimitedConnectionsFileSystem.ConnectionLimitingSettings
-
- Enclosing class:
- LimitedConnectionsFileSystem
public static class LimitedConnectionsFileSystem.ConnectionLimitingSettings extends Object
A simple configuration data object capturing the settings for limited connections.
-
-
Field Summary
Fields Modifier and Type Field Description intlimitInputThe limit for the number of input stream connections, or 0, if no limit.intlimitOutputThe limit for the number of output stream connections, or 0, if no limit.intlimitTotalThe limit for the total number of connections, or 0, if no limit.longstreamInactivityTimeoutThe inactivity timeout for a stream, in milliseconds.longstreamOpenTimeoutThe stream opening timeout for a stream, in milliseconds.
-
Constructor Summary
Constructors Constructor Description ConnectionLimitingSettings(int limitTotal, int limitInput, int limitOutput, long streamOpenTimeout, long streamInactivityTimeout)Creates a new ConnectionLimitingSettings with the given parameters.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LimitedConnectionsFileSystem.ConnectionLimitingSettingsfromConfig(Configuration config, String fsScheme)Parses and returns the settings for connection limiting, for the file system with the given file system scheme.
-
-
-
Field Detail
-
limitTotal
public final int limitTotal
The limit for the total number of connections, or 0, if no limit.
-
limitInput
public final int limitInput
The limit for the number of input stream connections, or 0, if no limit.
-
limitOutput
public final int limitOutput
The limit for the number of output stream connections, or 0, if no limit.
-
streamOpenTimeout
public final long streamOpenTimeout
The stream opening timeout for a stream, in milliseconds.
-
streamInactivityTimeout
public final long streamInactivityTimeout
The inactivity timeout for a stream, in milliseconds.
-
-
Constructor Detail
-
ConnectionLimitingSettings
public ConnectionLimitingSettings(int limitTotal, int limitInput, int limitOutput, long streamOpenTimeout, long streamInactivityTimeout)Creates a new ConnectionLimitingSettings with the given parameters.- Parameters:
limitTotal- The limit for the total number of connections, or 0, if no limit.limitInput- The limit for the number of input stream connections, or 0, if no limit.limitOutput- The limit for the number of output stream connections, or 0, if no limit.streamOpenTimeout- The maximum number of milliseconds that the file system will wait when no more connections are currently permitted.streamInactivityTimeout- The milliseconds that a stream may spend not writing any bytes before it is closed as inactive.
-
-
Method Detail
-
fromConfig
@Nullable public static LimitedConnectionsFileSystem.ConnectionLimitingSettings fromConfig(Configuration config, String fsScheme)
Parses and returns the settings for connection limiting, for the file system with the given file system scheme.- Parameters:
config- The configuration to check.fsScheme- The file system scheme.- Returns:
- The parsed configuration, or null, if no connection limiting is configured.
-
-