public class PGReplicationConnectionImpl extends java.lang.Object implements PGReplicationConnection
Modifier and Type | Field and Description |
---|---|
private BaseConnection |
connection |
Constructor and Description |
---|
PGReplicationConnectionImpl(BaseConnection connection) |
Modifier and Type | Method and Description |
---|---|
ChainedCreateReplicationSlotBuilder |
createReplicationSlot()
Create replication slot, that can be next use in
PGReplicationConnection.replicationStream() |
void |
dropReplicationSlot(java.lang.String slotName) |
ChainedStreamBuilder |
replicationStream()
After start replication stream this connection not available to use for another queries until
replication stream will not close.
|
private BaseConnection connection
public PGReplicationConnectionImpl(BaseConnection connection)
public ChainedStreamBuilder replicationStream()
PGReplicationConnection
replicationStream
in interface PGReplicationConnection
public ChainedCreateReplicationSlotBuilder createReplicationSlot()
PGReplicationConnection
Create replication slot, that can be next use in PGReplicationConnection.replicationStream()
Replication slots provide an automated way to ensure that the master does not remove WAL segments until they have been received by all standbys, and that the master does not remove rows which could cause a recovery conflict even when the standby is disconnected.
createReplicationSlot
in interface PGReplicationConnection
public void dropReplicationSlot(java.lang.String slotName) throws java.sql.SQLException
dropReplicationSlot
in interface PGReplicationConnection
slotName
- not null replication slot name exists in database that should be dropjava.sql.SQLException
- if the replication slot cannot be dropped.