All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.gamelift.model.RuntimeConfiguration Maven / Gradle / Ivy

/*
 * Copyright 2017-2022 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.gamelift.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A collection of server process configurations that describe the set of processes to run on each instance in a fleet. * Server processes run either an executable in a custom game build or a Realtime Servers script. GameLift launches the * configured processes, manages their life cycle, and replaces them as needed. Each instance checks regularly for an * updated runtime configuration. *

*

* A GameLift instance is limited to 50 processes running concurrently. To calculate the total number of processes in a * runtime configuration, add the values of the ConcurrentExecutions parameter for each * ServerProcess. Learn more about Running Multiple * Processes on a Fleet. *

*

* Related actions *

*

* DescribeRuntimeConfiguration | UpdateRuntimeConfiguration *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RuntimeConfiguration implements Serializable, Cloneable, StructuredPojo { /** *

* A collection of server process configurations that identify what server processes to run on each instance in a * fleet. *

*/ private java.util.List serverProcesses; /** *

* The number of game sessions in status ACTIVATING to allow on an instance. This setting limits the * instance resources that can be used for new game activations at any one time. *

*/ private Integer maxConcurrentGameSessionActivations; /** *

* The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host * players. During this time, the game session is in status ACTIVATING. If the game session does not * become active before the timeout, it is ended and the game session status is changed to TERMINATED. *

*/ private Integer gameSessionActivationTimeoutSeconds; /** *

* A collection of server process configurations that identify what server processes to run on each instance in a * fleet. *

* * @return A collection of server process configurations that identify what server processes to run on each instance * in a fleet. */ public java.util.List getServerProcesses() { return serverProcesses; } /** *

* A collection of server process configurations that identify what server processes to run on each instance in a * fleet. *

* * @param serverProcesses * A collection of server process configurations that identify what server processes to run on each instance * in a fleet. */ public void setServerProcesses(java.util.Collection serverProcesses) { if (serverProcesses == null) { this.serverProcesses = null; return; } this.serverProcesses = new java.util.ArrayList(serverProcesses); } /** *

* A collection of server process configurations that identify what server processes to run on each instance in a * fleet. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setServerProcesses(java.util.Collection)} or {@link #withServerProcesses(java.util.Collection)} if you * want to override the existing values. *

* * @param serverProcesses * A collection of server process configurations that identify what server processes to run on each instance * in a fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public RuntimeConfiguration withServerProcesses(ServerProcess... serverProcesses) { if (this.serverProcesses == null) { setServerProcesses(new java.util.ArrayList(serverProcesses.length)); } for (ServerProcess ele : serverProcesses) { this.serverProcesses.add(ele); } return this; } /** *

* A collection of server process configurations that identify what server processes to run on each instance in a * fleet. *

* * @param serverProcesses * A collection of server process configurations that identify what server processes to run on each instance * in a fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public RuntimeConfiguration withServerProcesses(java.util.Collection serverProcesses) { setServerProcesses(serverProcesses); return this; } /** *

* The number of game sessions in status ACTIVATING to allow on an instance. This setting limits the * instance resources that can be used for new game activations at any one time. *

* * @param maxConcurrentGameSessionActivations * The number of game sessions in status ACTIVATING to allow on an instance. This setting limits * the instance resources that can be used for new game activations at any one time. */ public void setMaxConcurrentGameSessionActivations(Integer maxConcurrentGameSessionActivations) { this.maxConcurrentGameSessionActivations = maxConcurrentGameSessionActivations; } /** *

* The number of game sessions in status ACTIVATING to allow on an instance. This setting limits the * instance resources that can be used for new game activations at any one time. *

* * @return The number of game sessions in status ACTIVATING to allow on an instance. This setting * limits the instance resources that can be used for new game activations at any one time. */ public Integer getMaxConcurrentGameSessionActivations() { return this.maxConcurrentGameSessionActivations; } /** *

* The number of game sessions in status ACTIVATING to allow on an instance. This setting limits the * instance resources that can be used for new game activations at any one time. *

* * @param maxConcurrentGameSessionActivations * The number of game sessions in status ACTIVATING to allow on an instance. This setting limits * the instance resources that can be used for new game activations at any one time. * @return Returns a reference to this object so that method calls can be chained together. */ public RuntimeConfiguration withMaxConcurrentGameSessionActivations(Integer maxConcurrentGameSessionActivations) { setMaxConcurrentGameSessionActivations(maxConcurrentGameSessionActivations); return this; } /** *

* The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host * players. During this time, the game session is in status ACTIVATING. If the game session does not * become active before the timeout, it is ended and the game session status is changed to TERMINATED. *

* * @param gameSessionActivationTimeoutSeconds * The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to * host players. During this time, the game session is in status ACTIVATING. If the game session * does not become active before the timeout, it is ended and the game session status is changed to * TERMINATED. */ public void setGameSessionActivationTimeoutSeconds(Integer gameSessionActivationTimeoutSeconds) { this.gameSessionActivationTimeoutSeconds = gameSessionActivationTimeoutSeconds; } /** *

* The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host * players. During this time, the game session is in status ACTIVATING. If the game session does not * become active before the timeout, it is ended and the game session status is changed to TERMINATED. *

* * @return The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to * host players. During this time, the game session is in status ACTIVATING. If the game * session does not become active before the timeout, it is ended and the game session status is changed to * TERMINATED. */ public Integer getGameSessionActivationTimeoutSeconds() { return this.gameSessionActivationTimeoutSeconds; } /** *

* The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host * players. During this time, the game session is in status ACTIVATING. If the game session does not * become active before the timeout, it is ended and the game session status is changed to TERMINATED. *

* * @param gameSessionActivationTimeoutSeconds * The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to * host players. During this time, the game session is in status ACTIVATING. If the game session * does not become active before the timeout, it is ended and the game session status is changed to * TERMINATED. * @return Returns a reference to this object so that method calls can be chained together. */ public RuntimeConfiguration withGameSessionActivationTimeoutSeconds(Integer gameSessionActivationTimeoutSeconds) { setGameSessionActivationTimeoutSeconds(gameSessionActivationTimeoutSeconds); 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 (getServerProcesses() != null) sb.append("ServerProcesses: ").append(getServerProcesses()).append(","); if (getMaxConcurrentGameSessionActivations() != null) sb.append("MaxConcurrentGameSessionActivations: ").append(getMaxConcurrentGameSessionActivations()).append(","); if (getGameSessionActivationTimeoutSeconds() != null) sb.append("GameSessionActivationTimeoutSeconds: ").append(getGameSessionActivationTimeoutSeconds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RuntimeConfiguration == false) return false; RuntimeConfiguration other = (RuntimeConfiguration) obj; if (other.getServerProcesses() == null ^ this.getServerProcesses() == null) return false; if (other.getServerProcesses() != null && other.getServerProcesses().equals(this.getServerProcesses()) == false) return false; if (other.getMaxConcurrentGameSessionActivations() == null ^ this.getMaxConcurrentGameSessionActivations() == null) return false; if (other.getMaxConcurrentGameSessionActivations() != null && other.getMaxConcurrentGameSessionActivations().equals(this.getMaxConcurrentGameSessionActivations()) == false) return false; if (other.getGameSessionActivationTimeoutSeconds() == null ^ this.getGameSessionActivationTimeoutSeconds() == null) return false; if (other.getGameSessionActivationTimeoutSeconds() != null && other.getGameSessionActivationTimeoutSeconds().equals(this.getGameSessionActivationTimeoutSeconds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServerProcesses() == null) ? 0 : getServerProcesses().hashCode()); hashCode = prime * hashCode + ((getMaxConcurrentGameSessionActivations() == null) ? 0 : getMaxConcurrentGameSessionActivations().hashCode()); hashCode = prime * hashCode + ((getGameSessionActivationTimeoutSeconds() == null) ? 0 : getGameSessionActivationTimeoutSeconds().hashCode()); return hashCode; } @Override public RuntimeConfiguration clone() { try { return (RuntimeConfiguration) 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.gamelift.model.transform.RuntimeConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy