mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUACAMOLE-102: Initial addition of connection weight to JDBC authentication extension
This commit is contained in:
committed by
Nick Couchman
parent
91920d0b2d
commit
025f77d1c4
@@ -87,6 +87,11 @@ public class MySQLEnvironment extends JDBCEnvironment {
|
||||
*/
|
||||
private int DEFAULT_MAX_CONNECTIONS = 0;
|
||||
|
||||
/**
|
||||
* The default value for the connection weight for a connection in
|
||||
* a balancing group.
|
||||
private int DEFAULT_CONNECTION_WEIGHT = 0;
|
||||
|
||||
/**
|
||||
* The default value for the default maximum number of connections to be
|
||||
* allowed to any one connection group. Note that, as long as the legacy
|
||||
@@ -194,6 +199,14 @@ public class MySQLEnvironment extends JDBCEnvironment {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultConnectionWeight() throws GuacamoleException {
|
||||
return getProperty(
|
||||
MySQLGuacamoleProperties.MYSQL_DEFAULT_CONNECTION_WEIGHT,
|
||||
DEFAULT_CONNECTION_WEIGHT
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultMaxGroupConnections() throws GuacamoleException {
|
||||
return getProperty(
|
||||
|
@@ -174,6 +174,18 @@ public class MySQLGuacamoleProperties {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* The connection weight for connections in balancing groups.
|
||||
*/
|
||||
public static final IntegerGuacamoleProperty
|
||||
MYSQL_DEFAULT_CONNECTION_WEIGHT =
|
||||
new IntegerGuacamoleProperty() {
|
||||
|
||||
@Overide
|
||||
public String getName() { return "mysql-default-connection-weight"; }
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* The maximum number of concurrent connections to allow to any one
|
||||
* connection group by an individual user. Zero denotes
|
||||
|
Reference in New Issue
Block a user