target.apidocs.com.google.api.services.compute.model.BackendServiceConnectionTrackingPolicy.html Maven / Gradle / Ivy
BackendServiceConnectionTrackingPolicy (Compute Engine API v1-rev20250107-2.0.0)
com.google.api.services.compute.model
Class BackendServiceConnectionTrackingPolicy
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.BackendServiceConnectionTrackingPolicy
-
public final class BackendServiceConnectionTrackingPolicy
extends com.google.api.client.json.GenericJson
Connection Tracking configuration for this BackendService.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
BackendServiceConnectionTrackingPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
BackendServiceConnectionTrackingPolicy
clone()
String
getConnectionPersistenceOnUnhealthyBackends()
Specifies connection persistence when backends are unhealthy.
Boolean
getEnableStrongAffinity()
Enable Strong Session Affinity for external passthrough Network Load Balancers.
Integer
getIdleTimeoutSec()
Specifies how long to keep a Connection Tracking entry while there is no matching traffic (in
seconds).
String
getTrackingMode()
Specifies the key used for connection tracking.
BackendServiceConnectionTrackingPolicy
set(String fieldName,
Object value)
BackendServiceConnectionTrackingPolicy
setConnectionPersistenceOnUnhealthyBackends(String connectionPersistenceOnUnhealthyBackends)
Specifies connection persistence when backends are unhealthy.
BackendServiceConnectionTrackingPolicy
setEnableStrongAffinity(Boolean enableStrongAffinity)
Enable Strong Session Affinity for external passthrough Network Load Balancers.
BackendServiceConnectionTrackingPolicy
setIdleTimeoutSec(Integer idleTimeoutSec)
Specifies how long to keep a Connection Tracking entry while there is no matching traffic (in
seconds).
BackendServiceConnectionTrackingPolicy
setTrackingMode(String trackingMode)
Specifies the key used for connection tracking.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Constructor Detail
-
BackendServiceConnectionTrackingPolicy
public BackendServiceConnectionTrackingPolicy()
-
Method Detail
-
getConnectionPersistenceOnUnhealthyBackends
public String getConnectionPersistenceOnUnhealthyBackends()
Specifies connection persistence when backends are unhealthy. The default value is
DEFAULT_FOR_PROTOCOL. If set to DEFAULT_FOR_PROTOCOL, the existing connections persist on
unhealthy backends only for connection-oriented protocols (TCP and SCTP) and only if the
Tracking Mode is PER_CONNECTION (default tracking mode) or the Session Affinity is configured
for 5-tuple. They do not persist for UDP. If set to NEVER_PERSIST, after a backend becomes
unhealthy, the existing connections on the unhealthy backend are never persisted on the
unhealthy backend. They are always diverted to newly selected healthy backends (unless all
backends are unhealthy). If set to ALWAYS_PERSIST, existing connections always persist on
unhealthy backends regardless of protocol and session affinity. It is generally not recommended
to use this mode overriding the default. For more details, see [Connection Persistence for
Network Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-
service#connection-persistence) and [Connection Persistence for Internal TCP/UDP Load
Balancing](https://cloud.google.com/load-balancing/docs/internal#connection-persistence).
- Returns:
- value or
null for none
-
setConnectionPersistenceOnUnhealthyBackends
public BackendServiceConnectionTrackingPolicy setConnectionPersistenceOnUnhealthyBackends(String connectionPersistenceOnUnhealthyBackends)
Specifies connection persistence when backends are unhealthy. The default value is
DEFAULT_FOR_PROTOCOL. If set to DEFAULT_FOR_PROTOCOL, the existing connections persist on
unhealthy backends only for connection-oriented protocols (TCP and SCTP) and only if the
Tracking Mode is PER_CONNECTION (default tracking mode) or the Session Affinity is configured
for 5-tuple. They do not persist for UDP. If set to NEVER_PERSIST, after a backend becomes
unhealthy, the existing connections on the unhealthy backend are never persisted on the
unhealthy backend. They are always diverted to newly selected healthy backends (unless all
backends are unhealthy). If set to ALWAYS_PERSIST, existing connections always persist on
unhealthy backends regardless of protocol and session affinity. It is generally not recommended
to use this mode overriding the default. For more details, see [Connection Persistence for
Network Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-
service#connection-persistence) and [Connection Persistence for Internal TCP/UDP Load
Balancing](https://cloud.google.com/load-balancing/docs/internal#connection-persistence).
- Parameters:
connectionPersistenceOnUnhealthyBackends - connectionPersistenceOnUnhealthyBackends or null for none
-
getEnableStrongAffinity
public Boolean getEnableStrongAffinity()
Enable Strong Session Affinity for external passthrough Network Load Balancers. This option is
not available publicly.
- Returns:
- value or
null for none
-
setEnableStrongAffinity
public BackendServiceConnectionTrackingPolicy setEnableStrongAffinity(Boolean enableStrongAffinity)
Enable Strong Session Affinity for external passthrough Network Load Balancers. This option is
not available publicly.
- Parameters:
enableStrongAffinity - enableStrongAffinity or null for none
-
getIdleTimeoutSec
public Integer getIdleTimeoutSec()
Specifies how long to keep a Connection Tracking entry while there is no matching traffic (in
seconds). For internal passthrough Network Load Balancers: - The minimum (default) is 10
minutes and the maximum is 16 hours. - It can be set only if Connection Tracking is less than
5-tuple (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION, CLIENT_IP or CLIENT_IP_PROTO, and
Tracking Mode is PER_SESSION). For external passthrough Network Load Balancers the default is
60 seconds. This option is not available publicly.
- Returns:
- value or
null for none
-
setIdleTimeoutSec
public BackendServiceConnectionTrackingPolicy setIdleTimeoutSec(Integer idleTimeoutSec)
Specifies how long to keep a Connection Tracking entry while there is no matching traffic (in
seconds). For internal passthrough Network Load Balancers: - The minimum (default) is 10
minutes and the maximum is 16 hours. - It can be set only if Connection Tracking is less than
5-tuple (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION, CLIENT_IP or CLIENT_IP_PROTO, and
Tracking Mode is PER_SESSION). For external passthrough Network Load Balancers the default is
60 seconds. This option is not available publicly.
- Parameters:
idleTimeoutSec - idleTimeoutSec or null for none
-
getTrackingMode
public String getTrackingMode()
Specifies the key used for connection tracking. There are two options: - PER_CONNECTION: This
is the default mode. The Connection Tracking is performed as per the Connection Key (default
Hash Method) for the specific protocol. - PER_SESSION: The Connection Tracking is performed as
per the configured Session Affinity. It matches the configured Session Affinity. For more
details, see [Tracking Mode for Network Load Balancing](https://cloud.google.com/load-
balancing/docs/network/networklb-backend-service#tracking-mode) and [Tracking Mode for Internal
TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal#tracking-mode).
- Returns:
- value or
null for none
-
setTrackingMode
public BackendServiceConnectionTrackingPolicy setTrackingMode(String trackingMode)
Specifies the key used for connection tracking. There are two options: - PER_CONNECTION: This
is the default mode. The Connection Tracking is performed as per the Connection Key (default
Hash Method) for the specific protocol. - PER_SESSION: The Connection Tracking is performed as
per the configured Session Affinity. It matches the configured Session Affinity. For more
details, see [Tracking Mode for Network Load Balancing](https://cloud.google.com/load-
balancing/docs/network/networklb-backend-service#tracking-mode) and [Tracking Mode for Internal
TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal#tracking-mode).
- Parameters:
trackingMode - trackingMode or null for none
-
set
public BackendServiceConnectionTrackingPolicy set(String fieldName,
Object value)
- Overrides:
set in class com.google.api.client.json.GenericJson
-
clone
public BackendServiceConnectionTrackingPolicy clone()
- Overrides:
clone in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy