Package com.mongodb.connection
Class SocketSettings
- java.lang.Object
 - 
- com.mongodb.connection.SocketSettings
 
 
- 
@Immutable @Deprecated(since="2021-05-27") public class SocketSettings extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.An immutable class representing socket settings used for connections to a MongoDB server.- Since:
 - 3.0
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSocketSettings.BuilderDeprecated.Usage of this API is not supported in AEM as a Cloud Service. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SocketSettings.Builderbuilder()Deprecated.Gets a builder for an instance ofSocketSettings.static SocketSettings.Builderbuilder(SocketSettings socketSettings)Deprecated.Creates a builder instance.booleanequals(java.lang.Object o)Deprecated.intgetConnectTimeout(java.util.concurrent.TimeUnit timeUnit)Deprecated.Gets the timeout for socket connect.intgetReadTimeout(java.util.concurrent.TimeUnit timeUnit)Deprecated.Gets the timeout for socket reads.intgetReceiveBufferSize()Deprecated.Gets the receive buffer size.intgetSendBufferSize()Deprecated.Gets the send buffer size.inthashCode()Deprecated.booleanisKeepAlive()Deprecated.configuring keep-alive has been deprecated.java.lang.StringtoString()Deprecated. 
 - 
 
- 
- 
Method Detail
- 
builder
public static SocketSettings.Builder builder()
Deprecated.Gets a builder for an instance ofSocketSettings.- Returns:
 - the builder
 
 
- 
builder
public static SocketSettings.Builder builder(SocketSettings socketSettings)
Deprecated.Creates a builder instance.- Parameters:
 socketSettings- existing SocketSettings to default the builder settings on.- Returns:
 - a builder
 - Since:
 - 3.7
 
 
- 
getConnectTimeout
public int getConnectTimeout(java.util.concurrent.TimeUnit timeUnit)
Deprecated.Gets the timeout for socket connect. Defaults to 10 seconds.- Parameters:
 timeUnit- the time unit to get the timeout in- Returns:
 - the connect timeout in the requested time unit.
 
 
- 
getReadTimeout
public int getReadTimeout(java.util.concurrent.TimeUnit timeUnit)
Deprecated.Gets the timeout for socket reads. Defaults to 0, which indicates no timeout- Parameters:
 timeUnit- the time unit to get the timeout in- Returns:
 - the read timeout in the requested time unit, or 0 if there is no timeout
 
 
- 
isKeepAlive
@Deprecated public boolean isKeepAlive()
Deprecated.configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.Gets whether keep-alive is enabled. Defaults to true.- Returns:
 - true if keep-alive is enabled.
 - See Also:
 - Does TCP keep-alive time affect MongoDB Deployments?
 
 
- 
getReceiveBufferSize
public int getReceiveBufferSize()
Deprecated.Gets the receive buffer size. Defaults to the operating system default.- Returns:
 - the receive buffer size
 
 
- 
getSendBufferSize
public int getSendBufferSize()
Deprecated.Gets the send buffer size. Defaults to the operating system default.- Returns:
 - the send buffer size
 
 
- 
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
Deprecated.- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
Deprecated.- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -