Top Description Methods
org.postgresql.replication.fluent

public Interface ChainedCreateReplicationSlotBuilder

Known Direct Implementers
org.postgresql.replication.fluent.ReplicationCreateSlotBuilder
Imports
org.postgresql.replication.fluent.logical.ChainedLogicalCreateSlotBuilder, org.postgresql.replication.fluent.physical.ChainedPhysicalCreateSlotBuilder

Fluent interface for specify common parameters for Logical and Physical replication.

Method Summary

Modifier and TypeMethod and Description
public ChainedLogicalCreateSlotBuilder

Returns:

not null fluent api
logical
()

Get the logical slot builder.

public ChainedPhysicalCreateSlotBuilder

Returns:

not null fluent api
physical
()

Create physical replication stream for process wal logs in binary form.

Method Detail

logicalback to summary
public ChainedLogicalCreateSlotBuilder logical()

Get the logical slot builder. Example usage:

  pgConnection
       .getReplicationAPI()
       .createReplicationSlot()
       .logical()
       .withSlotName("mySlot")
       .withOutputPlugin("test_decoding")
       .make();

   PGReplicationStream stream =
       pgConnection
           .getReplicationAPI()
           .replicationStream()
           .logical()
           .withSlotName("mySlot")
           .withSlotOption("include-xids", false)
           .withSlotOption("skip-empty-xacts", true)
           .start();

   while (true) {
     ByteBuffer buffer = stream.read();
     //process logical changes
   }

  
Returns:ChainedLogicalCreateSlotBuilder

not null fluent api

physicalback to summary
public ChainedPhysicalCreateSlotBuilder physical()

Create physical replication stream for process wal logs in binary form.

Example usage:

  pgConnection
       .getReplicationAPI()
       .createReplicationSlot()
       .physical()
       .withSlotName("mySlot")
       .make();

   PGReplicationStream stream =
       pgConnection
           .getReplicationAPI()
           .replicationStream()
           .physical()
           .withSlotName("mySlot")
           .start();

   while (true) {
     ByteBuffer buffer = stream.read();
     //process binary WAL logs
   }

  
Returns:ChainedPhysicalCreateSlotBuilder

not null fluent api