クラス ReplicationStreamBuilder

java.lang.Object
org.postgresql.replication.fluent.ReplicationStreamBuilder
すべての実装されたインタフェース:
ChainedStreamBuilder

public class ReplicationStreamBuilder extends Object implements ChainedStreamBuilder
  • コンストラクタの詳細

    • ReplicationStreamBuilder

      public ReplicationStreamBuilder(BaseConnection connection)
      パラメータ:
      connection - not null connection with that will be associate replication
  • メソッドの詳細

    • logical

      public ChainedLogicalStreamBuilder logical()
      インタフェースからコピーされた説明: ChainedStreamBuilder

      Create logical replication stream that decode raw wal logs by output plugin to logical form. Default about logical decoding you can see by following link Logical Decoding Concepts .

      Example usage:

         
      
          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
          }
      
         
       
      定義:
      logical インタフェース内 ChainedStreamBuilder
      戻り値:
      not null fluent api
    • physical

      public ChainedPhysicalStreamBuilder physical()
      インタフェースからコピーされた説明: ChainedStreamBuilder

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

      Example usage:

         
      
          LogSequenceNumber lsn = getCurrentLSN();
      
          PGReplicationStream stream =
              pgConnection
                  .getReplicationAPI()
                  .replicationStream()
                  .physical()
                  .withStartPosition(lsn)
                  .start();
      
          while (true) {
            ByteBuffer buffer = stream.read();
            //process binary WAL logs
          }
      
         
       
      定義:
      physical インタフェース内 ChainedStreamBuilder
      戻り値:
      not null fluent api