/** * Creates a new connectionId with the set server value * * @param serverValue the server value * @return the new connection id * @since 3.8 */ public ConnectionId withServerValue(final int serverValue) { isTrue("server value is null", this.serverValue == null); return new ConnectionId(serverId, localValue, serverValue); }
/** * Construct a defaulted connection description instance. * * @param serverId the server address */ public ConnectionDescription(final ServerId serverId) { this(new ConnectionId(serverId), new ServerVersion(), 0, ServerType.UNKNOWN, DEFAULT_MAX_WRITE_BATCH_SIZE, getDefaultMaxDocumentSize(), DEFAULT_MAX_MESSAGE_SIZE, Collections.<String>emptyList()); }
/** * Creates a new connectionId with the set server value * * @param serverValue the server value * @return the new connection id * @since 3.8 */ public ConnectionId withServerValue(final int serverValue) { isTrue("server value is null", this.serverValue == null); return new ConnectionId(serverId, localValue, serverValue); }
/** * Construct a defaulted connection description instance. * * @param serverId the server address */ public ConnectionDescription(final ServerId serverId) { this(new ConnectionId(serverId), new ServerVersion(), 0, ServerType.UNKNOWN, DEFAULT_MAX_WRITE_BATCH_SIZE, getDefaultMaxDocumentSize(), DEFAULT_MAX_MESSAGE_SIZE, Collections.<String>emptyList()); }