Skip to content
Permalink
Browse files

doc: correct documentation about last applied message fixes #760 (#1621)

  • Loading branch information
davecramer committed Nov 26, 2019
1 parent 6899a43 commit fdf898c781c00839210936d668d2341ca6c08406
Showing with 13 additions and 13 deletions.
  1. +13 −13 pgjdbc/src/main/java/org/postgresql/replication/PGReplicationStream.java
@@ -40,7 +40,7 @@
ByteBuffer read() throws SQLException;

/**
* <p>Read next wal record from backend. It method can't be block and in contrast to {@link
* <p>Read next WAL record from backend. This method does not block and in contrast to {@link
* PGReplicationStream#read()}. If message from backend absent return null. It allow periodically
* check message in stream and if they absent sleep some time, but it time should be less than
* {@link CommonOptions#getStatusInterval()} to avoid disconnect from the server.</p>
@@ -50,7 +50,7 @@
* at the page boundary. In other words, the first main WAL record and its continuation records
* can be sent in different XLogData messages.</p>
*
* @return byte array received by replication protocol or null if pending message from server
* @return byte array received by replication protocol or NULL if pending message from server
* absent. Returns ByteBuffer wrap around received byte array with use offset, so, use {@link
* ByteBuffer#array()} carefully.
* @throws SQLException when some internal exception occurs during read from stream
@@ -64,23 +64,23 @@
* method is called in the main thread after a successful {@link PGReplicationStream#read()} or
* {@link PGReplicationStream#readPending()}, to get the LSN corresponding to the received record.</p>
*
* @return not null LSN position that was receive last time via {@link PGReplicationStream#read()}
* @return NOT NULL LSN position that was receive last time via {@link PGReplicationStream#read()}
* method
*/
LogSequenceNumber getLastReceiveLSN();

/**
* <p>Last flushed lsn send in update message to backend. Parameter updates only via {@link
* <p>Last flushed LSN sent in update message to backend. Parameter updates only via {@link
* PGReplicationStream#setFlushedLSN(LogSequenceNumber)}</p>
*
* <p>It is safe to call this method in a thread different than the main thread.</p>
*
* @return not null location of the last WAL flushed to disk in the standby.
* @return NOT NULL location of the last WAL flushed to disk in the standby.
*/
LogSequenceNumber getLastFlushedLSN();

/**
* <p>Last applied lsn send in update message to backed. Parameter updates only via {@link
* <p>Last applied lsn sent in update message to backed. Parameter updates only via {@link
* PGReplicationStream#setAppliedLSN(LogSequenceNumber)}</p>
*
* <p>It is safe to call this method in a thread different than the main thread.</p>
@@ -90,32 +90,32 @@
LogSequenceNumber getLastAppliedLSN();

/**
* <p>Set flushed LSN. It parameter will be send to backend on next update status iteration. Flushed
* LSN position help backend define which wal can be recycle.</p>
* <p>Set flushed LSN. This parameter will be sent to backend on next update status iteration. Flushed
* LSN position help backend define which WAL can be recycled.</p>
*
* <p>It is safe to call this method in a thread different than the main thread. The updated value
* will be sent to the backend in the next status update run.</p>
*
* @param flushed not null location of the last WAL flushed to disk in the standby.
* @param flushed NOT NULL location of the last WAL flushed to disk in the standby.
* @see PGReplicationStream#forceUpdateStatus()
*/
void setFlushedLSN(LogSequenceNumber flushed);

/**
* <p>Parameter used only physical replication and define which lsn already was apply on standby.
* <p>Inform backend which LSN has been applied on standby.
* Feedback will send to backend on next update status iteration.</p>
*
* <p>It is safe to call this method in a thread different than the main thread. The updated value
* will be sent to the backend in the next status update run.</p>
*
* @param applied not null location of the last WAL applied in the standby.
* @param applied NOT NULL location of the last WAL applied in the standby.
* @see PGReplicationStream#forceUpdateStatus()
*/
void setAppliedLSN(LogSequenceNumber applied);

/**
* Force send to backend status about last received, flushed and applied LSN. You can not use it
* method explicit, because {@link PGReplicationStream} send status to backend periodical by
* Force send last received, flushed and applied LSN status to backend. You cannot send LSN status
* explicitly because {@link PGReplicationStream} sends the status to backend periodically by
* configured interval via {@link LogicalReplicationOptions#getStatusInterval}
*
* @throws SQLException when some internal exception occurs during read from stream

0 comments on commit fdf898c

Please sign in to comment.
You can’t perform that action at this time.