Class FileReplication
java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,FileReplication>
com.aoindustries.aoserv.client.CachedObject<Integer,FileReplication>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<FileReplication>
com.aoindustries.aoserv.client.backup.FileReplication
- All Implemented Interfaces:
BitRateProvider
,Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,SingleTableObject<Integer,
FileReplication>
public final class FileReplication
extends CachedObjectIntegerKey<FileReplication>
implements BitRateProvider
Causes a server to replicate itself to another machine on a regular basis.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
-
Field Summary
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
Fields inherited from interface com.aoapps.hodgepodge.io.BitRateProvider
MINIMUM_BIT_RATE
-
Constructor Summary
ConstructorDescriptionDeprecated.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionint
addFailoverFileLog
(long startTime, long endTime, int scanned, int updated, long bytes, boolean isSuccessful) int
addFileBackupSetting
(String path, boolean backupEnabled, boolean required) May be filtered.int
protected Object
getColumnImpl
(int i) Gets a connect address that should override the normal address resolution mechanisms.Gets the address connections should be made from that overrides the normal address resolution mechanism.boolean
Gets the enabled flag for this replication.getFailoverFileLogs
(int maxRows) Gets the most recent (by start time) log entries for failover file replications, up to the maximum number of rows.getFileBackupSetting
(String path) getHost()
When set, the group ID will always be set to this value, regardless what the client sends.boolean
void
Initializes this object from the raw database contents.void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) void
setBitRate
(Long bitRate) void
setFailoverFileSchedules
(List<Short> hours, List<Short> minutes) 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
-
Constructor Details
-
FileReplication
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
addFailoverFileLog
public int addFailoverFileLog(long startTime, long endTime, int scanned, int updated, long bytes, boolean isSuccessful) throws IOException, SQLException - Throws:
IOException
SQLException
-
getBitRate
- Specified by:
getBitRate
in interfaceBitRateProvider
-
setBitRate
- Throws:
IOException
SQLException
-
getBlockSize
public int getBlockSize()- Specified by:
getBlockSize
in interfaceBitRateProvider
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
FileReplication>
-
getFailoverFileSchedules
- Throws:
IOException
SQLException
-
getHost
- Throws:
SQLException
IOException
-
getBackupPartition
May be filtered.- Throws:
SQLException
IOException
-
getFailoverFileLogs
Gets the most recent (by start time) log entries for failover file replications, up to the maximum number of rows. May return less than this number of rows. The results are sorted by start_time descending (most recent at index zero).- Throws:
IOException
SQLException
-
getFailoverMysqlReplications
- Throws:
IOException
SQLException
-
getUseCompression
public boolean getUseCompression() -
getRetention
- Throws:
SQLException
IOException
-
getConnectAddress
Gets a connect address that should override the normal address resolution mechanisms. This allows a replication to be specifically sent through a gigabit connection or alternate route. -
getConnectFrom
Gets the address connections should be made from that overrides the normal address resolution mechanism. This allows a replication to be specifically sent through a gigabit connection or alternate route. -
getEnabled
public boolean getEnabled()Gets the enabled flag for this replication. -
getQuotaGid
When set, the group ID will always be set to this value, regardless what the client sends. This gid is only unique per backup_partition, thus on a single host the same gid may be used for different accounts. Also, the gid will not exist in /etc/groups and has nothing to do with the shell accounts on the server. This is to track quotas per backup partition by group ID. This may only be set (and must be set) when stored on a backup_partition with quota_enabled. -
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
FileReplication>
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
FileReplication> - 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,
FileReplication> - Throws:
IOException
-
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<FileReplication>
- Throws:
SQLException
IOException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
FileReplication> - Throws:
IOException
-
addFileBackupSetting
public int addFileBackupSetting(String path, boolean backupEnabled, boolean required) throws IOException, SQLException - Throws:
IOException
SQLException
-
getFileBackupSetting
- Throws:
IOException
SQLException
-
getFileBackupSettings
- Throws:
IOException
SQLException
-
setFailoverFileSchedules
public void setFailoverFileSchedules(List<Short> hours, List<Short> minutes) throws IOException, SQLException - Throws:
IOException
SQLException
-
setFileBackupSettings
public void setFileBackupSettings(List<String> paths, List<Boolean> backupEnableds, List<Boolean> requireds) throws IOException, SQLException - Throws:
IOException
SQLException
-
requestReplicationDaemonAccess
- Throws:
IOException
SQLException
-
getActivity
- Throws:
IOException
SQLException
-