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
Nested Classes -
Field Summary
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkeyFields inherited from class com.aoindustries.aoserv.client.CachedObject
tableFields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITEFields inherited from interface com.aoapps.hodgepodge.io.BitRateProvider
MINIMUM_BIT_RATE -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, 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 TypeMethodDescriptionintaddFailoverFileLog(long startTime, long endTime, int scanned, int updated, long bytes, boolean isSuccessful) intaddFileBackupSetting(String path, boolean backupEnabled, boolean required) May be filtered.intprotected ObjectgetColumnImpl(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.booleanGets 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.booleanvoidInitializes this object from the raw database contents.voidread(StreamableInput in, AoservProtocol.Version protocolVersion) voidsetBitRate(Long bitRate) voidsetFailoverFileSchedules(List<Short> hours, List<Short> minutes) voidAoservObject.toString()implementation that is allowed to throw exceptions.voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCodeMethods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTableMethods 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, 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
-
addFailoverFileLog
public int addFailoverFileLog(long startTime, long endTime, int scanned, int updated, long bytes, boolean isSuccessful) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getBitRate
- Specified by:
getBitRatein interfaceBitRateProvider
-
setBitRate
- Throws:
IOExceptionSQLException
-
getBlockSize
public int getBlockSize()- Specified by:
getBlockSizein interfaceBitRateProvider
-
getColumnImpl
- Specified by:
getColumnImplin classAoservObject<Integer,FileReplication>
-
getFailoverFileSchedules
- Throws:
IOExceptionSQLException
-
getHost
- Throws:
SQLExceptionIOException
-
getBackupPartition
May be filtered.- Throws:
SQLExceptionIOException
-
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:
IOExceptionSQLException
-
getFailoverMysqlReplications
- Throws:
IOExceptionSQLException
-
getUseCompression
public boolean getUseCompression() -
getRetention
- Throws:
SQLExceptionIOException
-
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:
getTableIdin classAoservObject<Integer,FileReplication>
-
init
Description copied from class:AoservObjectInitializes this object from the raw database contents.- Specified by:
initin classAoservObject<Integer,FileReplication> - Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
- Specified by:
readin interfaceAoservReadable- Specified by:
readin interfaceAoservStreamable- Specified by:
readin classAoservObject<Integer,FileReplication> - Throws:
IOException
-
toStringImpl
Description copied from class:AoservObjectAoservObject.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:
toStringImplin classCachedObjectIntegerKey<FileReplication>- Throws:
SQLExceptionIOException
-
write
- Specified by:
writein interfaceAoservStreamable- Specified by:
writein interfaceAoservWritable- Specified by:
writein classAoservObject<Integer,FileReplication> - Throws:
IOException
-
addFileBackupSetting
public int addFileBackupSetting(String path, boolean backupEnabled, boolean required) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getFileBackupSetting
- Throws:
IOExceptionSQLException
-
getFileBackupSettings
- Throws:
IOExceptionSQLException
-
setFailoverFileSchedules
public void setFailoverFileSchedules(List<Short> hours, List<Short> minutes) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
setFileBackupSettings
public void setFileBackupSettings(List<String> paths, List<Boolean> backupEnableds, List<Boolean> requireds) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
requestReplicationDaemonAccess
- Throws:
IOExceptionSQLException
-
getActivity
- Throws:
IOExceptionSQLException
-
