Class Server
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.postgresql.Server
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,SingleTableObject<Integer,
Server>
A
PostgresServer
corresponds to a unique PostgreSQL install
space on one server. The server name must be unique per server.
PostgresDatabase
s and PostgresServerUser
s are
unique per PostgresServer
.- Author:
- AO Industries, Inc.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Represents a name that may be used for a PostgreSQL installation.static enum
Deprecated.2019-07-14: Is this still used? -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PosixPath
The directory that contains the PostgreSQL data files.static final Port
The default PostSQL port.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
ConstructorsConstructorDescriptionServer()
Deprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionint
addPostgresDatabase
(Database.Name name, UserServer datdba, Encoding encoding, boolean enablePostgis) int
getBind()
int
protected Object
getColumnImpl
(int i) boolean
getFsync()
int
getName()
getPostgresServerUser
(User.Name username) int
int
int
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 PostSQL port. -
DATA_BASE_DIR
The directory that contains the PostgreSQL data files.
-
-
Constructor Details
-
Server
Deprecated, for removal: This API element is subject to removal in a future version.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
-
getAoServer_server_pkey
public int getAoServer_server_pkey() -
getLinuxServer
- Throws:
SQLException
IOException
-
getVersion_version_id
public int getVersion_version_id() -
getVersion
- Throws:
SQLException
IOException
-
getMaxConnections
public int getMaxConnections() -
getSortMem
public int getSortMem() -
getFsync
public boolean getFsync() -
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
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
Server>
-
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
-
addPostgresDatabase
public int addPostgresDatabase(Database.Name name, UserServer datdba, Encoding encoding, boolean enablePostgis) throws IOException, SQLException - Throws:
IOException
SQLException
-
getDataDirectory
-
getName
-
getPostgresDatabase
- Throws:
IOException
SQLException
-
getPostgresDatabases
- Throws:
IOException
SQLException
-
getPostgresServerUser
- Throws:
IOException
SQLException
-
getPostgresServerUsers
- Throws:
IOException
SQLException
-
getPostgresUsers
- Throws:
SQLException
IOException
-
isPostgresDatabaseNameAvailable
- Throws:
IOException
SQLException
-
restartPostgresql
- Throws:
IOException
SQLException
-
startPostgresql
- Throws:
IOException
SQLException
-
stopPostgresql
- Throws:
IOException
SQLException
-