Class V3ReplicationProtocol
- java.lang.Object
-
- org.postgresql.core.v3.replication.V3ReplicationProtocol
-
- All Implemented Interfaces:
ReplicationProtocol
public class V3ReplicationProtocol extends java.lang.Object implements ReplicationProtocol
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.LoggerLOGGERprivate PGStreampgStreamprivate QueryExecutorqueryExecutor
-
Constructor Summary
Constructors Constructor Description V3ReplicationProtocol(QueryExecutor queryExecutor, PGStream pgStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidconfigureSocketTimeout(CommonOptions options)private java.lang.StringcreateStartLogicalQuery(LogicalReplicationOptions options)START_REPLICATION SLOT slot_name LOGICAL XXX/XXX [ ( option_name [option_value] [, ...private java.lang.StringcreateStartPhysicalQuery(PhysicalReplicationOptions options)START_REPLICATION [SLOT slot_name] [PHYSICAL] XXX/XXX.private PGReplicationStreaminitializeReplication(java.lang.String query, CommonOptions options, ReplicationType replicationType)PGReplicationStreamstartLogical(LogicalReplicationOptions options)PGReplicationStreamstartPhysical(PhysicalReplicationOptions options)
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
queryExecutor
private final QueryExecutor queryExecutor
-
pgStream
private final PGStream pgStream
-
-
Constructor Detail
-
V3ReplicationProtocol
public V3ReplicationProtocol(QueryExecutor queryExecutor, PGStream pgStream)
-
-
Method Detail
-
startLogical
public PGReplicationStream startLogical(LogicalReplicationOptions options) throws java.sql.SQLException
- Specified by:
startLogicalin interfaceReplicationProtocol- Parameters:
options- not null options for logical replication stream- Returns:
- not null stream instance from which available fetch wal logs that was decode by output plugin
- Throws:
java.sql.SQLException- on error
-
startPhysical
public PGReplicationStream startPhysical(PhysicalReplicationOptions options) throws java.sql.SQLException
- Specified by:
startPhysicalin interfaceReplicationProtocol- Parameters:
options- not null options for physical replication stream- Returns:
- not null stream instance from which available fetch wal logs
- Throws:
java.sql.SQLException- on error
-
initializeReplication
private PGReplicationStream initializeReplication(java.lang.String query, CommonOptions options, ReplicationType replicationType) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
createStartPhysicalQuery
private java.lang.String createStartPhysicalQuery(PhysicalReplicationOptions options)
START_REPLICATION [SLOT slot_name] [PHYSICAL] XXX/XXX.
-
createStartLogicalQuery
private java.lang.String createStartLogicalQuery(LogicalReplicationOptions options)
START_REPLICATION SLOT slot_name LOGICAL XXX/XXX [ ( option_name [option_value] [, ... ] ) ]
-
configureSocketTimeout
private void configureSocketTimeout(CommonOptions options) throws PSQLException
- Throws:
PSQLException
-
-