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, withStatusInterval
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 SQLException
ChainedLogicalStreamBuilder
start
in interface ChainedLogicalStreamBuilder
SQLException
- if there are errorspublic @Nullable 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(String optionName, boolean optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
optionName
- name of optionoptionValue
- boolean valuepublic ChainedLogicalStreamBuilder withSlotOption(String optionName, int optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
optionName
- name of optionoptionValue
- integer valuepublic ChainedLogicalStreamBuilder withSlotOption(String optionName, String optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
optionName
- name of optionoptionValue
- String valuepublic ChainedLogicalStreamBuilder withSlotOptions(Properties options)
withSlotOptions
in interface ChainedLogicalStreamBuilder
options
- propertiespublic LogSequenceNumber getStartLSNPosition()
getStartLSNPosition
in interface CommonOptions
public Properties getSlotOptions()
LogicalReplicationOptions
getSlotOptions
in interface LogicalReplicationOptions
public int getStatusInterval()
CommonOptions
getStatusInterval
in interface CommonOptions
Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.