GUACAMOLE-102: Improve commentary around connection weight methods and variables.

This commit is contained in:
Nick Couchman
2017-06-06 08:39:02 -04:00
parent 955d5fb11f
commit 06e27d30ff
2 changed files with 15 additions and 10 deletions

View File

@@ -172,22 +172,25 @@ public class ConnectionModel extends ChildObjectModel {
}
/**
* Sets the connection weight.
* Sets the connection weight for load balancing.
*
* @param connectionWeight
* The weight of the connection. null is acceptable, and anything
* less than one will prevent the connection from being used.
* The weight of the connection used in load balancing.
* The value is not required for the connection (null), and
* values less than 1 will prevent the connection from being
* used.
*/
public void setConnectionWeight(Integer connectionWeight) {
this.connectionWeight = connectionWeight;
}
/**
* Returns the connection weight used in calculating the
* weighted algorithms.
* Returns the connection weight used in applying weighted
* load balancing algorithms.
*
* @return
* The connection weight as an Integer.
* The connection weight used in applying weighted
* load balancing aglorithms.
*/
public Integer getConnectionWeight() {
return connectionWeight;

View File

@@ -117,7 +117,7 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
public static final String MAX_CONNECTIONS_PER_USER_NAME = "max-connections-per-user";
/**
* The connection weight for weighted algorithms.
* The connection weight attribute used for weighted load balancing algorithms.
*/
public static final String CONNECTION_WEIGHT = "weight";
@@ -412,11 +412,13 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
}
/**
* Returns the weight of the connection, or a default
* of 1 if the weight is undefined.
* Returns the weight of the connection used in applying weighted
* load balancing algorithms, or a default of 1 if the
* attribute is undefined.
*
* @return
* The weight of the connection.
* The weight of the connection used in applying weighted
* load balancing algorithms.
*/
public int getConnectionWeight() {