protected static class PostgresReplicationConnection.ReplicationConnectionBuilder extends Object implements ReplicationConnection.Builder
| Modifier and Type | Field and Description |
|---|---|
private Configuration |
config |
private boolean |
dropSlotOnClose |
private String |
pluginName |
private String |
slotName |
private Integer |
statusUpdateIntervalMillis |
DEFAULT_DROP_SLOT_ON_CLOSE, DEFAULT_PLUGIN_NAME, DEFAULT_SLOT_NAME| Modifier | Constructor and Description |
|---|---|
protected |
ReplicationConnectionBuilder(Configuration config) |
| Modifier and Type | Method and Description |
|---|---|
ReplicationConnection |
build()
Creates a new
ReplicationConnection instance |
PostgresReplicationConnection.ReplicationConnectionBuilder |
dropSlotOnClose(boolean dropSlotOnClose)
Whether or not to drop the replication slot once the replication connection closes
|
PostgresReplicationConnection.ReplicationConnectionBuilder |
statusUpdateIntervalMillis(Integer statusUpdateIntervalMillis)
The number of milli-seconds the replication connection should periodically send updates to the server.
|
PostgresReplicationConnection.ReplicationConnectionBuilder |
withPlugin(String pluginName)
Sets the name for the PG logical decoding plugin
|
PostgresReplicationConnection.ReplicationConnectionBuilder |
withSlot(String slotName)
Sets the name for the PG logical replication slot
|
private Configuration config
private String slotName
private String pluginName
private boolean dropSlotOnClose
private Integer statusUpdateIntervalMillis
protected ReplicationConnectionBuilder(Configuration config)
public PostgresReplicationConnection.ReplicationConnectionBuilder withSlot(String slotName)
ReplicationConnection.BuilderwithSlot in interface ReplicationConnection.BuilderslotName - the name of the slot, may not be null.ReplicationConnection.Builder.DEFAULT_SLOT_NAMEpublic PostgresReplicationConnection.ReplicationConnectionBuilder withPlugin(String pluginName)
ReplicationConnection.BuilderwithPlugin in interface ReplicationConnection.BuilderpluginName - the name of the slot, may not be null.ReplicationConnection.Builder.DEFAULT_PLUGIN_NAMEpublic PostgresReplicationConnection.ReplicationConnectionBuilder dropSlotOnClose(boolean dropSlotOnClose)
ReplicationConnection.BuilderdropSlotOnClose in interface ReplicationConnection.BuilderdropSlotOnClose - true if the slot should be dropped once the connection is closed, false otherwiseReplicationConnection.Builder.DEFAULT_DROP_SLOT_ON_CLOSEpublic PostgresReplicationConnection.ReplicationConnectionBuilder statusUpdateIntervalMillis(Integer statusUpdateIntervalMillis)
ReplicationConnection.BuilderstatusUpdateIntervalMillis in interface ReplicationConnection.BuilderstatusUpdateIntervalMillis - a number of milli-seconds; null or non-positive value causes Postgres' default to be appliedpublic ReplicationConnection build()
ReplicationConnection.BuilderReplicationConnection instancebuild in interface ReplicationConnection.BuilderCopyright © 2017 JBoss by Red Hat. All rights reserved.