public class V3ReplicationProtocol extends java.lang.Object implements ReplicationProtocol
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER |
private PGStream |
pgStream |
private QueryExecutor |
queryExecutor |
Constructor and Description |
---|
V3ReplicationProtocol(QueryExecutor queryExecutor,
PGStream pgStream) |
Modifier and Type | Method and Description |
---|---|
private void |
configureSocketTimeout(CommonOptions options) |
private java.lang.String |
createStartLogicalQuery(LogicalReplicationOptions options)
START_REPLICATION SLOT slot_name LOGICAL XXX/XXX [ ( option_name [option_value] [, ...
|
private java.lang.String |
createStartPhysicalQuery(PhysicalReplicationOptions options)
START_REPLICATION [SLOT slot_name] [PHYSICAL] XXX/XXX.
|
private PGReplicationStream |
initializeReplication(java.lang.String query,
CommonOptions options,
ReplicationType replicationType) |
PGReplicationStream |
startLogical(LogicalReplicationOptions options) |
PGReplicationStream |
startPhysical(PhysicalReplicationOptions options) |
private static final java.util.logging.Logger LOGGER
private final QueryExecutor queryExecutor
private final PGStream pgStream
public V3ReplicationProtocol(QueryExecutor queryExecutor, PGStream pgStream)
public PGReplicationStream startLogical(LogicalReplicationOptions options) throws java.sql.SQLException
startLogical
in interface ReplicationProtocol
options
- not null options for logical replication streamjava.sql.SQLException
- on errorpublic PGReplicationStream startPhysical(PhysicalReplicationOptions options) throws java.sql.SQLException
startPhysical
in interface ReplicationProtocol
options
- not null options for physical replication streamjava.sql.SQLException
- on errorprivate PGReplicationStream initializeReplication(java.lang.String query, CommonOptions options, ReplicationType replicationType) throws java.sql.SQLException
java.sql.SQLException
private java.lang.String createStartPhysicalQuery(PhysicalReplicationOptions options)
private java.lang.String createStartLogicalQuery(LogicalReplicationOptions options)
private void configureSocketTimeout(CommonOptions options) throws PSQLException
PSQLException