|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ChainedCreateReplicationSlotBuilder
Fluent interface for specify common parameters for Logical and Physical replication.
| Method Summary | |
|---|---|
ChainedLogicalCreateSlotBuilder |
logical()
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
}
|
ChainedPhysicalCreateSlotBuilder |
physical()
Create physical replication stream for process wal logs in binary form. |
| Method Detail |
|---|
ChainedLogicalCreateSlotBuilder logical()
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
}
ChainedPhysicalCreateSlotBuilder physical()
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
}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||