public class LogicalStreamBuilder extends AbstractStreamBuilder<ChainedLogicalStreamBuilder> implements ChainedLogicalStreamBuilder, LogicalReplicationOptions
slotName, startPosition, statusIntervalMs
Constructor and Description |
---|
LogicalStreamBuilder(StartLogicalReplicationCallback startCallback) |
Modifier and Type | Method and Description |
---|---|
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 wich 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
public 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
public ChainedLogicalStreamBuilder withSlotOption(String optionName, int optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
public ChainedLogicalStreamBuilder withSlotOption(String optionName, String optionValue)
withSlotOption
in interface ChainedLogicalStreamBuilder
public ChainedLogicalStreamBuilder withSlotOptions(Properties options)
withSlotOptions
in interface ChainedLogicalStreamBuilder
public LogSequenceNumber getStartLSNPosition()
getStartLSNPosition
in interface CommonOptions
public Properties getSlotOptions()
LogicalReplicationOptions
getSlotOptions
in interface LogicalReplicationOptions
public int getStatusInterval()
CommonOptions
getStatusInterval
in interface CommonOptions
Copyright © 2017 PostgreSQL Global Development Group. All rights reserved.