public class LogicalStreamBuilder extends AbstractStreamBuilder<ChainedLogicalStreamBuilder> implements ChainedLogicalStreamBuilder, LogicalReplicationOptions
slotName, startPosition, statusIntervalMs| Constructor and Description |
|---|
LogicalStreamBuilder(StartLogicalReplicationCallback startCallback) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable String |
getSlotName()
Required parameter for logical replication.
|
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(String optionName,
boolean optionValue) |
ChainedLogicalStreamBuilder |
withSlotOption(String optionName,
int optionValue) |
ChainedLogicalStreamBuilder |
withSlotOption(String optionName,
String optionValue) |
ChainedLogicalStreamBuilder |
withSlotOptions(Properties options) |
ChainedLogicalStreamBuilder |
withStartPosition(LogSequenceNumber lsn)
Specify start position from which backend will start stream changes.
|
withSlotName, withStatusIntervalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithSlotName, withStatusIntervalpublic 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 SQLException
ChainedLogicalStreamBuilderstart in interface ChainedLogicalStreamBuilderSQLException - if there are errorspublic @Nullable String getSlotName()
LogicalReplicationOptionsgetSlotName in interface CommonOptionsgetSlotName in interface LogicalReplicationOptionspublic ChainedLogicalStreamBuilder withStartPosition(LogSequenceNumber lsn)
ChainedCommonStreamBuilderwithStartPosition in interface ChainedCommonStreamBuilder<ChainedLogicalStreamBuilder>withStartPosition in class AbstractStreamBuilder<ChainedLogicalStreamBuilder>lsn - not null position from which need start replicate changespublic ChainedLogicalStreamBuilder withSlotOption(String optionName, boolean optionValue)
withSlotOption in interface ChainedLogicalStreamBuilderoptionName - name of optionoptionValue - boolean valuepublic ChainedLogicalStreamBuilder withSlotOption(String optionName, int optionValue)
withSlotOption in interface ChainedLogicalStreamBuilderoptionName - name of optionoptionValue - integer valuepublic ChainedLogicalStreamBuilder withSlotOption(String optionName, String optionValue)
withSlotOption in interface ChainedLogicalStreamBuilderoptionName - name of optionoptionValue - String valuepublic ChainedLogicalStreamBuilder withSlotOptions(Properties options)
withSlotOptions in interface ChainedLogicalStreamBuilderoptions - propertiespublic LogSequenceNumber getStartLSNPosition()
getStartLSNPosition in interface CommonOptionspublic Properties getSlotOptions()
LogicalReplicationOptionsgetSlotOptions in interface LogicalReplicationOptionspublic int getStatusInterval()
CommonOptionsgetStatusInterval in interface CommonOptionsCopyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.