public static class LimitedConnectionsFileSystem.ConnectionLimitingSettings extends Object
Modifier and Type | Field and Description |
---|---|
int |
limitInput
The limit for the number of input stream connections, or 0, if no limit.
|
int |
limitOutput
The limit for the number of output stream connections, or 0, if no limit.
|
int |
limitTotal
The limit for the total number of connections, or 0, if no limit.
|
long |
streamInactivityTimeout
The inactivity timeout for a stream, in milliseconds.
|
long |
streamOpenTimeout
The stream opening timeout for a stream, in milliseconds.
|
Constructor and Description |
---|
ConnectionLimitingSettings(int limitTotal,
int limitInput,
int limitOutput,
long streamOpenTimeout,
long streamInactivityTimeout)
Creates a new ConnectionLimitingSettings with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public final int limitTotal
public final int limitInput
public final int limitOutput
public final long streamOpenTimeout
public final long streamInactivityTimeout
public ConnectionLimitingSettings(int limitTotal, int limitInput, int limitOutput, long streamOpenTimeout, long streamInactivityTimeout)
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.@Nullable public static LimitedConnectionsFileSystem.ConnectionLimitingSettings fromConfig(Configuration config, String fsScheme)
config
- The configuration to check.fsScheme
- The file system scheme.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.