connectionPersistenceOnUnhealthyBackends = $connectionPersistenceOnUnhealthyBackends; } /** * @return self::CONNECTION_PERSISTENCE_ON_UNHEALTHY_BACKENDS_* */ public function getConnectionPersistenceOnUnhealthyBackends() { return $this->connectionPersistenceOnUnhealthyBackends; } /** * Enable Strong Session Affinity for external passthrough Network Load * Balancers. This option is not available publicly. * * @param bool $enableStrongAffinity */ public function setEnableStrongAffinity($enableStrongAffinity) { $this->enableStrongAffinity = $enableStrongAffinity; } /** * @return bool */ public function getEnableStrongAffinity() { return $this->enableStrongAffinity; } /** * 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. * * @param int $idleTimeoutSec */ public function setIdleTimeoutSec($idleTimeoutSec) { $this->idleTimeoutSec = $idleTimeoutSec; } /** * @return int */ public function getIdleTimeoutSec() { return $this->idleTimeoutSec; } /** * 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). * * Accepted values: INVALID_TRACKING_MODE, PER_CONNECTION, PER_SESSION * * @param self::TRACKING_MODE_* $trackingMode */ public function setTrackingMode($trackingMode) { $this->trackingMode = $trackingMode; } /** * @return self::TRACKING_MODE_* */ public function getTrackingMode() { return $this->trackingMode; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(BackendServiceConnectionTrackingPolicy::class, 'Google_Service_Compute_BackendServiceConnectionTrackingPolicy');