GUACAMOLE-317: Add "failover_only" column to database schema for Guacamole connections.

This commit is contained in:
Michael Jumper
2017-06-06 13:29:22 -07:00
parent eb087ae290
commit 3c553b965c
7 changed files with 75 additions and 13 deletions

View File

@@ -61,6 +61,13 @@ public class ConnectionModel extends ChildObjectModel {
*/
private Integer connectionWeight;
/**
* Whether this connection should be reserved for failover. Failover-only
* connections within a balancing group are only used when all non-failover
* connections are unavailable.
*/
private boolean failoverOnly;
/**
* The identifiers of all readable sharing profiles associated with this
* connection.
@@ -196,6 +203,32 @@ public class ConnectionModel extends ChildObjectModel {
return connectionWeight;
}
/**
* Returns whether this connection should be reserved for failover.
* Failover-only connections within a balancing group are only used when
* all non-failover connections are unavailable.
*
* @return
* true if this connection should be reserved for failover, false
* otherwise.
*/
public boolean isFailoverOnly() {
return failoverOnly;
}
/**
* Sets whether this connection should be reserved for failover.
* Failover-only connections within a balancing group are only used when
* all non-failover connections are unavailable.
*
* @param failoverOnly
* true if this connection should be reserved for failover, false
* otherwise.
*/
public void setFailoverOnly(boolean failoverOnly) {
this.failoverOnly = failoverOnly;
}
/**
* Sets the maximum number of connections that can be established to this
* connection concurrently by any one user.