Package com.mongodb.connection
Class ConnectionDescription
- java.lang.Object
-
- com.mongodb.connection.ConnectionDescription
-
@Immutable @Deprecated(since="2021-05-27") public class ConnectionDescription extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A description of a connection to a MongoDB server.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description ConnectionDescription(ConnectionId connectionId, int maxWireVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
Deprecated.Construct an instance.ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, int maxWireVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
Deprecated.ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize)
ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
ConnectionDescription(ServerId serverId)
Deprecated.Construct a defaulted connection description instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Deprecated.java.util.List<java.lang.String>
getCompressors()
Deprecated.Gets the compressors supported by this connection.ConnectionId
getConnectionId()
Deprecated.Gets the id of the connection.static int
getDefaultMaxMessageSize()
Deprecated.Get the default maximum message size.static int
getDefaultMaxWriteBatchSize()
Deprecated.Get the default maximum write batch size.int
getMaxBatchCount()
Deprecated.Gets the max batch count for bulk write operations.int
getMaxDocumentSize()
Deprecated.Gets the max document size in bytes for documents to be stored in collections.int
getMaxMessageSize()
Deprecated.Gets the max message size in bytes for wire protocol messages to be sent to the server.int
getMaxWireVersion()
Deprecated.The latest version of the wire protocol that this MongoDB server is capable of using to communicate with clients.ServerAddress
getServerAddress()
Deprecated.Gets the server address.ServerType
getServerType()
Deprecated.Gets the server type.ServerVersion
getServerVersion()
Deprecated.UsegetMaxWireVersion()
insteadint
hashCode()
Deprecated.java.lang.String
toString()
Deprecated.ConnectionDescription
withConnectionId(ConnectionId connectionId)
Deprecated.Creates a new connection description with the set connection id
-
-
-
Constructor Detail
-
ConnectionDescription
public ConnectionDescription(ServerId serverId)
Deprecated.Construct a defaulted connection description instance.- Parameters:
serverId
- the server address
-
ConnectionDescription
@Deprecated public ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize)
Deprecated.Construct an instance.- Parameters:
connectionId
- the connection idserverVersion
- the server versionserverType
- the server typemaxBatchCount
- the max batch countmaxDocumentSize
- the max document size in bytesmaxMessageSize
- the max message size in bytes
-
ConnectionDescription
@Deprecated public ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
Deprecated.Construct an instance.- Parameters:
connectionId
- the connection idserverVersion
- the server versionserverType
- the server typemaxBatchCount
- the max batch countmaxDocumentSize
- the max document size in bytesmaxMessageSize
- the max message size in bytescompressors
- the available compressors on the connection- Since:
- 3.5
-
ConnectionDescription
@Deprecated public ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, int maxWireVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
Deprecated.Construct an instance.- Parameters:
connectionId
- the connection idserverVersion
- the server versionmaxWireVersion
- the max wire versionserverType
- the server typemaxBatchCount
- the max batch countmaxDocumentSize
- the max document size in bytesmaxMessageSize
- the max message size in bytescompressors
- the available compressors on the connection- Since:
- 3.10
-
ConnectionDescription
public ConnectionDescription(ConnectionId connectionId, int maxWireVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
Deprecated.Construct an instance.- Parameters:
connectionId
- the connection idmaxWireVersion
- the max wire versionserverType
- the server typemaxBatchCount
- the max batch countmaxDocumentSize
- the max document size in bytesmaxMessageSize
- the max message size in bytescompressors
- the available compressors on the connection- Since:
- 3.10
-
-
Method Detail
-
withConnectionId
public ConnectionDescription withConnectionId(ConnectionId connectionId)
Deprecated.Creates a new connection description with the set connection id- Parameters:
connectionId
- the connection id- Returns:
- the new connection description
- Since:
- 3.8
-
getServerAddress
public ServerAddress getServerAddress()
Deprecated.Gets the server address.- Returns:
- the server address
-
getConnectionId
public ConnectionId getConnectionId()
Deprecated.Gets the id of the connection. If possible, this id will correlate with the connection id that the server puts in its log messages.- Returns:
- the connection id
-
getServerVersion
@Deprecated public ServerVersion getServerVersion()
Deprecated.UsegetMaxWireVersion()
insteadGets the version of the server.- Returns:
- the server version
-
getMaxWireVersion
public int getMaxWireVersion()
Deprecated.The latest version of the wire protocol that this MongoDB server is capable of using to communicate with clients.- Returns:
- the maximum protocol version supported by this server
- Since:
- 3.10
-
getServerType
public ServerType getServerType()
Deprecated.Gets the server type.- Returns:
- the server type
-
getMaxBatchCount
public int getMaxBatchCount()
Deprecated.Gets the max batch count for bulk write operations.- Returns:
- the max batch count
-
getMaxDocumentSize
public int getMaxDocumentSize()
Deprecated.Gets the max document size in bytes for documents to be stored in collections.- Returns:
- the max document size in bytes
-
getMaxMessageSize
public int getMaxMessageSize()
Deprecated.Gets the max message size in bytes for wire protocol messages to be sent to the server.- Returns:
- the max message size in bytes.
-
getCompressors
public java.util.List<java.lang.String> getCompressors()
Deprecated.Gets the compressors supported by this connection.- Returns:
- the non-null list of compressors supported by this connection
-
getDefaultMaxMessageSize
public static int getDefaultMaxMessageSize()
Deprecated.Get the default maximum message size.- Returns:
- the default maximum message size.
-
getDefaultMaxWriteBatchSize
public static int getDefaultMaxWriteBatchSize()
Deprecated.Get the default maximum write batch size.- Returns:
- the default maximum write batch size.
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-