Interface ReplicationRequest.LogicalReplicationRequestBuilder
- All Superinterfaces:
ReplicationRequest.LogicalReplicationStep1, ReplicationRequest.LogicalReplicationStep2, ReplicationRequest.WithSlotName, ReplicationRequest.WithSlotOption, ReplicationRequest.WithStartPosition, ReplicationRequest.WithStatusInterval
- Enclosing class:
ReplicationRequest
public static interface ReplicationRequest.LogicalReplicationRequestBuilder
extends ReplicationRequest.LogicalReplicationStep1, ReplicationRequest.LogicalReplicationStep2, ReplicationRequest.WithSlotName, ReplicationRequest.WithStartPosition, ReplicationRequest.WithStatusInterval, ReplicationRequest.WithSlotOption
Fluent builder interface to configure a logical replication stream.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the logicalReplicationRequest.Replication slots provide an automated way to ensure that the primary does not remove WAL segments until they have been received by all standbys, and that the primary does not remove rows which could cause a recovery conflict even when the standby is disconnected.slotOption(String option, Object value) Configure slot option.Specify start position from which backend will start stream changes.statusInterval(Duration interval) Specifies the number of time between status packets sent back to the server.
-
Method Details
-
slotName
Replication slots provide an automated way to ensure that the primary does not remove WAL segments until they have been received by all standbys, and that the primary does not remove rows which could cause a recovery conflict even when the standby is disconnected.- Specified by:
slotNamein interfaceReplicationRequest.LogicalReplicationStep1- Specified by:
slotNamein interfaceReplicationRequest.WithSlotName- Parameters:
slotName- not null replication slot already exists on server- Returns:
thisbuilder
-
startPosition
Specify start position from which backend will start stream changes. If parameter will not specify, streaming starts from restart_lsn. For more details see pg_replication_slots description.- Specified by:
startPositionin interfaceReplicationRequest.LogicalReplicationStep2- Specified by:
startPositionin interfaceReplicationRequest.WithStartPosition- Parameters:
lsn- not null position from which need start replicate changes- Returns:
thisbuilder
-
statusInterval
Specifies the number of time between status packets sent back to the server. This allows for easier monitoring of the progress from server. A value of zero disables the periodic status updates completely, although an update will still be sent when requested by the server, to avoid timeout disconnect. The default value is 10 seconds.- Specified by:
statusIntervalin interfaceReplicationRequest.WithStatusInterval- Parameters:
interval- positive time- Returns:
thisbuilder.
-
slotOption
Configure slot option.- Specified by:
slotOptionin interfaceReplicationRequest.WithSlotOption- Parameters:
option- slot option namevalue- option value- Returns:
- this instance as a fluent interface
-
build
ReplicationRequest build()Returns the logicalReplicationRequest.- Returns:
- the logical
ReplicationRequest.
-