public abstract class AbstractStreamBuilder<T extends ChainedCommonStreamBuilder<T>> extends Object implements ChainedCommonStreamBuilder<T>
Modifier and Type | Field and Description |
---|---|
protected @Nullable String |
slotName |
protected LogSequenceNumber |
startPosition |
protected int |
statusIntervalMs |
Constructor and Description |
---|
AbstractStreamBuilder() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
self() |
T |
withSlotName(String slotName)
Replication slots provide an automated way to ensure that the master does not remove WAL
segments until they have been received by all standbys, and that the master does not remove
rows which could cause a recovery conflict even when the standby is disconnected.
|
T |
withStartPosition(LogSequenceNumber lsn)
Specify start position from which backend will start stream changes.
|
T |
withStatusInterval(int time,
TimeUnit format)
Specifies the number of time between status packets sent back to the server.
|
protected int statusIntervalMs
protected LogSequenceNumber startPosition
protected @Nullable String slotName
protected abstract T self()
public T withStatusInterval(int time, TimeUnit format)
ChainedCommonStreamBuilder
withStatusInterval
in interface ChainedCommonStreamBuilder<T extends ChainedCommonStreamBuilder<T>>
time
- positive timeformat
- format for specified timepublic T withStartPosition(LogSequenceNumber lsn)
ChainedCommonStreamBuilder
withStartPosition
in interface ChainedCommonStreamBuilder<T extends ChainedCommonStreamBuilder<T>>
lsn
- not null position from which need start replicate changespublic T withSlotName(String slotName)
ChainedCommonStreamBuilder
withSlotName
in interface ChainedCommonStreamBuilder<T extends ChainedCommonStreamBuilder<T>>
slotName
- not null replication slot already exists on server.Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.