/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.appmesh.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* An object that represents a type of connection pool. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class VirtualNodeHttpConnectionPool implements Serializable, Cloneable, StructuredPojo { /** ** Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream cluster. *
*/ private Integer maxConnections; /** *
* Number of overflowing requests after max_connections
Envoy will queue to upstream cluster.
*
* Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream cluster. *
* * @param maxConnections * Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream * cluster. */ public void setMaxConnections(Integer maxConnections) { this.maxConnections = maxConnections; } /** ** Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream cluster. *
* * @return Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream * cluster. */ public Integer getMaxConnections() { return this.maxConnections; } /** ** Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream cluster. *
* * @param maxConnections * Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream * cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public VirtualNodeHttpConnectionPool withMaxConnections(Integer maxConnections) { setMaxConnections(maxConnections); return this; } /** *
* Number of overflowing requests after max_connections
Envoy will queue to upstream cluster.
*
max_connections
Envoy will queue to upstream cluster.
*/
public void setMaxPendingRequests(Integer maxPendingRequests) {
this.maxPendingRequests = maxPendingRequests;
}
/**
*
* Number of overflowing requests after max_connections
Envoy will queue to upstream cluster.
*
max_connections
Envoy will queue to upstream cluster.
*/
public Integer getMaxPendingRequests() {
return this.maxPendingRequests;
}
/**
*
* Number of overflowing requests after max_connections
Envoy will queue to upstream cluster.
*
max_connections
Envoy will queue to upstream cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VirtualNodeHttpConnectionPool withMaxPendingRequests(Integer maxPendingRequests) {
setMaxPendingRequests(maxPendingRequests);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getMaxConnections() != null)
sb.append("MaxConnections: ").append(getMaxConnections()).append(",");
if (getMaxPendingRequests() != null)
sb.append("MaxPendingRequests: ").append(getMaxPendingRequests());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VirtualNodeHttpConnectionPool == false)
return false;
VirtualNodeHttpConnectionPool other = (VirtualNodeHttpConnectionPool) obj;
if (other.getMaxConnections() == null ^ this.getMaxConnections() == null)
return false;
if (other.getMaxConnections() != null && other.getMaxConnections().equals(this.getMaxConnections()) == false)
return false;
if (other.getMaxPendingRequests() == null ^ this.getMaxPendingRequests() == null)
return false;
if (other.getMaxPendingRequests() != null && other.getMaxPendingRequests().equals(this.getMaxPendingRequests()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMaxConnections() == null) ? 0 : getMaxConnections().hashCode());
hashCode = prime * hashCode + ((getMaxPendingRequests() == null) ? 0 : getMaxPendingRequests().hashCode());
return hashCode;
}
@Override
public VirtualNodeHttpConnectionPool clone() {
try {
return (VirtualNodeHttpConnectionPool) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.appmesh.model.transform.VirtualNodeHttpConnectionPoolMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}