|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChainedStreamBuilder
Start point for fluent API that build replication stream(logical or physical). Api not thread safe, and can be use only for crate single stream.
Method Summary | |
---|---|
ChainedLogicalStreamBuilder |
logical()
Create logical replication stream that decode raw wal logs by output plugin to logical form. |
ChainedPhysicalStreamBuilder |
physical()
Create physical replication stream for process wal logs in binary form. |
Method Detail |
---|
ChainedLogicalStreamBuilder logical()
PGReplicationStream stream =
pgConnection
.getReplicationAPI()
.replicationStream()
.logical()
.withSlotName("test_decoding")
.withSlotOption("include-xids", false)
.withSlotOption("skip-empty-xacts", true)
.start();
while (true) {
ByteBuffer buffer = stream.read();
//process logical changes
}
ChainedPhysicalStreamBuilder physical()
LogSequenceNumber lsn = getCurrentLSN();
PGReplicationStream stream =
pgConnection
.getReplicationAPI()
.replicationStream()
.physical()
.withStartPosition(lsn)
.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 |