Class Lsn
- java.lang.Object
-
- io.debezium.connector.postgresql.connection.Lsn
-
- All Implemented Interfaces:
Comparable<Lsn>
public class Lsn extends Object implements Comparable<Lsn>
Copied from Debezium 1.9.8.final without changes due to the NoSuchMethodError, caused by the fact that current Debezium release java version is 11, so we need to compile this file by java 8 compiler. More info. Abstraction of PostgreSQL log sequence number, adapted fromLogSequenceNumber.Line 32: add NO_STOPPING_LSN
-
-
Field Summary
Fields Modifier and Type Field Description static LsnINVALID_LSNZero is used indicate an invalid pointer.static LsnNO_STOPPING_LSNThe max lsn for the wal file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.postgresql.replication.LogSequenceNumberasLogSequenceNumber()longasLong()StringasString()intcompareTo(Lsn o)booleanequals(Object o)inthashCode()booleanisNonStopping()booleanisValid()StringtoString()static LsnvalueOf(Long value)static LsnvalueOf(String strValue)Create LSN instance by string represent LSN.static LsnvalueOf(org.postgresql.replication.LogSequenceNumber value)
-
-
-
Field Detail
-
INVALID_LSN
public static final Lsn INVALID_LSN
Zero is used indicate an invalid pointer. Bootstrap skips the first possible WAL segment, initializing the first WAL page at XLOG_SEG_SIZE, so no XLOG record can begin at zero.
-
NO_STOPPING_LSN
public static final Lsn NO_STOPPING_LSN
The max lsn for the wal file.
-
-
Method Detail
-
valueOf
public static Lsn valueOf(Long value)
- Parameters:
value- numeric represent position in the write-ahead log stream- Returns:
- not null LSN instance
-
valueOf
public static Lsn valueOf(org.postgresql.replication.LogSequenceNumber value)
- Parameters:
value- PostgreSQL JDBC driver domain type representing position in the write-ahead log stream- Returns:
- not null LSN instance
-
valueOf
public static Lsn valueOf(String strValue)
Create LSN instance by string represent LSN.- Parameters:
strValue- not null string as two hexadecimal numbers of up to 8 digits each, separated by a slash. For example16/3002D50,0/15D68C50- Returns:
- not null LSN instance where if specified string represent have not valid form
INVALID_LSN
-
asLong
public long asLong()
- Returns:
- Long represent position in the write-ahead log stream
-
asLogSequenceNumber
public org.postgresql.replication.LogSequenceNumber asLogSequenceNumber()
- Returns:
- PostgreSQL JDBC driver representation of position in the write-ahead log stream
-
asString
public String asString()
- Returns:
- String represent position in the write-ahead log stream as two hexadecimal numbers of
up to 8 digits each, separated by a slash. For example
16/3002D50,0/15D68C50
-
isValid
public boolean isValid()
-
isNonStopping
public boolean isNonStopping()
-
compareTo
public int compareTo(Lsn o)
- Specified by:
compareToin interfaceComparable<Lsn>
-
-