@Immutable public class ConnectionDescription extends java.lang.Object
Constructor and Description |
---|
ConnectionDescription(ConnectionId connectionId,
int maxWireVersion,
ServerType serverType,
int maxBatchCount,
int maxDocumentSize,
int maxMessageSize,
java.util.List<java.lang.String> compressors)
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)
Construct a defaulted connection description instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.util.List<java.lang.String> |
getCompressors()
Gets the compressors supported by this connection.
|
ConnectionId |
getConnectionId()
Gets the id of the connection.
|
static int |
getDefaultMaxMessageSize()
Get the default maximum message size.
|
static int |
getDefaultMaxWriteBatchSize()
Get the default maximum write batch size.
|
int |
getMaxBatchCount()
Gets the max batch count for bulk write operations.
|
int |
getMaxDocumentSize()
Gets the max document size in bytes for documents to be stored in collections.
|
int |
getMaxMessageSize()
Gets the max message size in bytes for wire protocol messages to be sent to the server.
|
int |
getMaxWireVersion()
The latest version of the wire protocol that this MongoDB server is capable of using to communicate with clients.
|
ServerAddress |
getServerAddress()
Gets the server address.
|
ServerType |
getServerType()
Gets the server type.
|
ServerVersion |
getServerVersion()
Deprecated.
Use
getMaxWireVersion() instead |
int |
hashCode() |
java.lang.String |
toString() |
ConnectionDescription |
withConnectionId(ConnectionId connectionId)
Creates a new connection description with the set connection id
|
public ConnectionDescription(ServerId serverId)
serverId
- the server address@Deprecated public ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize)
ConnectionDescription(ConnectionId, ServerVersion, int, ServerType, int, int, int, List)
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@Deprecated public ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
ConnectionDescription(ConnectionId, ServerVersion, int, ServerType, int, int, int, List)
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@Deprecated public ConnectionDescription(ConnectionId connectionId, ServerVersion serverVersion, int maxWireVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
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 connectionpublic ConnectionDescription(ConnectionId connectionId, int maxWireVersion, ServerType serverType, int maxBatchCount, int maxDocumentSize, int maxMessageSize, java.util.List<java.lang.String> compressors)
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 connectionpublic ConnectionDescription withConnectionId(ConnectionId connectionId)
connectionId
- the connection idpublic ServerAddress getServerAddress()
public ConnectionId getConnectionId()
@Deprecated public ServerVersion getServerVersion()
getMaxWireVersion()
insteadpublic int getMaxWireVersion()
public ServerType getServerType()
public int getMaxBatchCount()
public int getMaxDocumentSize()
public int getMaxMessageSize()
public java.util.List<java.lang.String> getCompressors()
public static int getDefaultMaxMessageSize()
public static int getDefaultMaxWriteBatchSize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2023 Adobe. All Rights Reserved