java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,Server>
com.aoindustries.aoserv.client.CachedObject<Integer,Server>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<Server>
com.aoindustries.aoserv.client.mysql.Server
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,SingleTableObject<Integer,
Server>
A
MysqlServer
corresponds to a unique MySQL install
space on one server. The server name must be unique per server.
MysqlDatabase
s and MysqlServerUser
s are
unique per MysqlServer
.- Author:
- AO Industries, Inc.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
Represents a name that may be used for a MySQL installation.static enum
Deprecated.2019-07-14: Is this still used? -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final PosixPath
The directory that contains the MySQL data files.static final Port
The default MySQL port.static final int
Deprecated.Please useServer.Name.MAX_LENGTH
instead.Gets the versions of MySQL in order of preference.static final String
The supported versions of MySQL.static final String
The supported versions of MySQL.static final String
The supported versions of MySQL.static final String
The supported versions of MySQL.static final String
The supported versions of MySQL.static final String
The supported versions of MySQL.static final String
The supported versions of MySQL.Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
Fields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
addMysqlDatabase
(Database.Name name, Package pack) int
getBind()
int
protected Object
getColumnImpl
(int i) Gets the master status ornull
if no master status provided by MySQL.int
Gets the minor version number in X.X[-max] format.getMysqlServerUser
(User.Name username) getName()
void
Initializes this object from the raw database contents.boolean
void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) void
void
void
AoservObject.toString()
implementation that is allowed to throw exceptions.void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
Methods inherited from class com.aoindustries.aoserv.client.AoservObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxId, getLinuxUserName, getMacAddress, getMysqlDatabaseName, getMysqlServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
Field Details
-
DEFAULT_PORT
The default MySQL port. -
VERSION_8_0_PREFIX
The supported versions of MySQL.- See Also:
-
VERSION_5_7_PREFIX
The supported versions of MySQL.- See Also:
-
VERSION_5_6_PREFIX
The supported versions of MySQL.- See Also:
-
VERSION_5_1_PREFIX
The supported versions of MySQL.- See Also:
-
VERSION_5_0_PREFIX
The supported versions of MySQL.- See Also:
-
VERSION_4_1_PREFIX
The supported versions of MySQL.- See Also:
-
VERSION_4_0_PREFIX
The supported versions of MySQL.- See Also:
-
DATA_BASE_DIR
The directory that contains the MySQL data files. -
PREFERRED_VERSION_PREFIXES
Gets the versions of MySQL in order of preference. Index0
is the most preferred. -
COLUMN_AO_SERVER_name
- See Also:
-
COLUMN_NAME_name
- See Also:
-
MAX_SERVER_NAME_LENGTH
Deprecated.Please useServer.Name.MAX_LENGTH
instead.The maximum length of the name.- See Also:
-
-
Constructor Details
-
Server
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
Server>
-
getBind_id
public int getBind_id() -
getBind
- Throws:
SQLException
IOException
-
getName
-
getAoServer_server_pkey
public int getAoServer_server_pkey() -
getLinuxServer
- Throws:
SQLException
IOException
-
getVersion
- Throws:
SQLException
IOException
-
getMaxConnections
public int getMaxConnections() -
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
Server> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
Server> - Throws:
IOException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
Server> - Throws:
IOException
-
addMysqlDatabase
- Throws:
IOException
SQLException
-
getDataDirectory
-
getMinorVersion
Gets the minor version number in X.X[-max] format. This corresponds to the installation directory under /usr/mysql/X.X[-max] or /opt/mysql-X.X[-max]- Throws:
SQLException
IOException
-
getMysqlDatabase
- Throws:
IOException
SQLException
-
getFailoverMysqlReplications
- Throws:
IOException
SQLException
-
getMysqlDatabases
- Throws:
IOException
SQLException
-
getMysqlDbUsers
- Throws:
IOException
SQLException
-
getMysqlServerUser
- Throws:
IOException
SQLException
-
getMysqlServerUsers
- Throws:
IOException
SQLException
-
getMysqlUsers
- Throws:
IOException
SQLException
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
Server>
-
isMysqlDatabaseNameAvailable
- Throws:
IOException
SQLException
-
restartMysql
- Throws:
IOException
SQLException
-
startMysql
- Throws:
IOException
SQLException
-
stopMysql
- Throws:
IOException
SQLException
-
toStringImpl
Description copied from class:AoservObject
AoservObject.toString()
implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAoservObject.toString()
on the key (fromAoservObject.getKey()
). When the key isnull
, uses the default implementation fromObject.toString()
.- Overrides:
toStringImpl
in classCachedObjectIntegerKey<Server>
- Throws:
SQLException
IOException
-
getMasterStatus
Gets the master status ornull
if no master status provided by MySQL. If any error occurs, throws either IOException or SQLException.- Throws:
IOException
SQLException
-