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 * @param connectionWeight
* The weight of the connection. null is acceptable, and anything * The weight of the connection used in load balancing.
* less than one will prevent the connection from being used. * 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) { public void setConnectionWeight(Integer connectionWeight) {
this.connectionWeight = connectionWeight; this.connectionWeight = connectionWeight;
} }
/** /**
* Returns the connection weight used in calculating the * Returns the connection weight used in applying weighted
* weighted algorithms. * load balancing algorithms.
* *
* @return * @return
* The connection weight as an Integer. * The connection weight used in applying weighted
* load balancing aglorithms.
*/ */
public Integer getConnectionWeight() { public Integer getConnectionWeight() {
return connectionWeight; 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"; 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"; 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 * Returns the weight of the connection used in applying weighted
* of 1 if the weight is undefined. * load balancing algorithms, or a default of 1 if the
* attribute is undefined.
* *
* @return * @return
* The weight of the connection. * The weight of the connection used in applying weighted
* load balancing algorithms.
*/ */
public int getConnectionWeight() { public int getConnectionWeight() {