public class LogicalStreamBuilder extends AbstractStreamBuilder<ChainedLogicalStreamBuilder> implements ChainedLogicalStreamBuilder, LogicalReplicationOptions
automaticFlush, slotName, startPosition, statusIntervalMs
Constructor and Description |
---|
LogicalStreamBuilder(StartLogicalReplicationCallback startCallback) |
Modifier and Type | Method and Description |
---|---|
boolean |
getAutomaticFlush() |
java.lang.String |
getSlotName()
Required parameter for logical replication.
|
java.util.Properties |
getSlotOptions()
Parameters for output plugin.
|
LogSequenceNumber |
getStartLSNPosition() |
int |
getStatusInterval()
Specifies the number of millisecond between status packets sent back to the server.
|
protected ChainedLogicalStreamBuilder |
self() |
PGReplicationStream |
start()
Open logical replication stream.
|
ChainedLogicalStreamBuilder |
withSlotOption(java.lang.String optionName,
boolean optionValue) |
ChainedLogicalStreamBuilder |
withSlotOption(java.lang.String optionName,
int optionValue) |
ChainedLogicalStreamBuilder |
withSlotOption(java.lang.String optionName,
java.lang.String optionValue) |
ChainedLogicalStreamBuilder |
withSlotOptions(java.util.Properties options) |
ChainedLogicalStreamBuilder |
withStartPosition(LogSequenceNumber lsn)
Specify start position from which backend will start stream changes.
|
withAutomaticFlush, withSlotName, withStatusInterval
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
withAutomaticFlush, withSlotName, withStatusInterval
public LogicalStreamBuilder(StartLogicalReplicationCallback startCallback)
startCallback
- not null callback that should be execute after build parameters for start
replicationprotected ChainedLogicalStreamBuilder self()
self
in class AbstractStreamBuilder<ChainedLogicalStreamBuilder>
public PGReplicationStream start() throws java.sql.SQLException
ChainedLogicalStreamBuilder
start
in interface ChainedLogicalStreamBuilder
java.sql.SQLException
- if there are errorspublic java.lang.String getSlotName()
LogicalReplicationOptions
getSlotName
in interface CommonOptions
getSlotName
in interface LogicalReplicationOptions
public ChainedLogicalStreamBuilder withStartPosition(LogSequenceNumber lsn)
ChainedCommonStreamBuilder
withStartPosition
in interface ChainedCommonStreamBuilder<ChainedLogicalStreamBuilder>
withStartPosition
in class AbstractStreamBuilder<ChainedLogicalStreamBuilder>
lsn
- not null position from which need start replicate changespublic ChainedLogicalStreamBuilder withSlotOption(java.lang.String optionName, boolean optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
optionName
- name of optionoptionValue
- boolean valuepublic ChainedLogicalStreamBuilder withSlotOption(java.lang.String optionName, int optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
optionName
- name of optionoptionValue
- integer valuepublic ChainedLogicalStreamBuilder withSlotOption(java.lang.String optionName, java.lang.String optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
optionName
- name of optionoptionValue
- String valuepublic ChainedLogicalStreamBuilder withSlotOptions(java.util.Properties options)
withSlotOptions
in interface ChainedLogicalStreamBuilder
options
- propertiespublic LogSequenceNumber getStartLSNPosition()
getStartLSNPosition
in interface CommonOptions
public java.util.Properties getSlotOptions()
LogicalReplicationOptions
getSlotOptions
in interface LogicalReplicationOptions
public int getStatusInterval()
CommonOptions
getStatusInterval
in interface CommonOptions
public boolean getAutomaticFlush()
getAutomaticFlush
in interface CommonOptions
Copyright © 2025 PostgreSQL Global Development Group. All rights reserved.