Top Fields Constructors Methods
org.postgresql.replication.fluent.physical

public Class PhysicalStreamBuilder

extends AbstractStreamBuilder<ChainedPhysicalStreamBuilder>
implements ChainedPhysicalStreamBuilder, PhysicalReplicationOptions
Class Inheritance
All Implemented Interfaces
org.postgresql.replication.fluent.physical.PhysicalReplicationOptions, org.postgresql.replication.fluent.CommonOptions, org.postgresql.replication.fluent.physical.ChainedPhysicalStreamBuilder, org.postgresql.replication.fluent.ChainedCommonStreamBuilder
Imports
org.postgresql.replication.LogSequenceNumber, .PGReplicationStream, org.postgresql.replication.fluent.AbstractStreamBuilder, org.checkerframework.checker.nullness.qual.Nullable, java.sql.SQLException

Field Summary

Modifier and TypeField and Description
private final StartPhysicalReplicationCallback
Inherited from org.postgresql.replication.fluent.AbstractStreamBuilder:
slotNamestartPositionstatusIntervalMs

Constructor Summary

AccessConstructor and Description
public
PhysicalStreamBuilder(StartPhysicalReplicationCallback
not null callback that should be execute after build parameters for start replication
startCallback
)

Method Summary

Modifier and TypeMethod and Description
public @Nullable String
getSlotName()

Implements org.postgresql.replication.fluent.CommonOptions.getSlotName.

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.

public LogSequenceNumber
public int
getStatusInterval()

Implements org.postgresql.replication.fluent.CommonOptions.getStatusInterval.

Specifies the number of millisecond between status packets sent back to the server.

protected ChainedPhysicalStreamBuilder
public PGReplicationStream
Inherited from org.postgresql.replication.fluent.AbstractStreamBuilder:
withSlotNamewithStartPositionwithStatusInterval

Field Detail

startCallbackback to summary
private final StartPhysicalReplicationCallback startCallback

Constructor Detail

PhysicalStreamBuilderback to summary
public PhysicalStreamBuilder(StartPhysicalReplicationCallback startCallback)
Parameters
startCallback:StartPhysicalReplicationCallback

not null callback that should be execute after build parameters for start replication

Method Detail

getSlotNameback to summary
public @Nullable String getSlotName()

Implements org.postgresql.replication.fluent.CommonOptions.getSlotName.

Doc from org.postgresql.replication.fluent.CommonOptions.getSlotName.

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.

Returns:@Nullable String

nullable replication slot name that already exists on server and free.

Annotations
@Override
getStartLSNPositionback to summary
public LogSequenceNumber getStartLSNPosition()

Implements org.postgresql.replication.fluent.CommonOptions.getStartLSNPosition.

Returns:LogSequenceNumber

Doc from org.postgresql.replication.fluent.CommonOptions.getStartLSNPosition.

the position to start replication. This cannot be null.

Annotations
@Override
getStatusIntervalback to summary
public int getStatusInterval()

Implements org.postgresql.replication.fluent.CommonOptions.getStatusInterval.

Doc from org.postgresql.replication.fluent.CommonOptions.getStatusInterval.

Specifies the number of millisecond between status packets sent back to the server. This allows for easier monitoring of the progress from server. A value of zero disables the periodic status updates completely, although an update will still be sent when requested by the server, to avoid timeout disconnect. The default value is 10 seconds.

Returns:int

the current status interval

Annotations
@Override
selfback to summary
protected ChainedPhysicalStreamBuilder self()

Implements abstract org.postgresql.replication.fluent.AbstractStreamBuilder.self.

Annotations
@Override
startback to summary
public PGReplicationStream start() throws SQLException

Implements org.postgresql.replication.fluent.physical.ChainedPhysicalStreamBuilder.start.

Doc from org.postgresql.replication.fluent.physical.ChainedPhysicalStreamBuilder.start.

Open physical replication stream.

Returns:PGReplicationStream

not null PGReplicationStream available for fetch wal logs in binary form

Annotations
@Override
Exceptions
SQLException:
on error