Class Lsn
java.lang.Object
io.debezium.connector.postgresql.connection.Lsn
- All Implemented Interfaces:
Comparable<Lsn>
Abstraction of PostgreSQL log sequence number, adapted from
LogSequenceNumber.- Author:
- Jiri Pechanec
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LsnZero is used indicate an invalid pointer.private final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.postgresql.replication.LogSequenceNumberlongasLong()asString()intbooleaninthashCode()booleanisValid()toString()static Lsnstatic LsnCreate LSN instance by string represent LSN.static LsnvalueOf(org.postgresql.replication.LogSequenceNumber value)
-
Field Details
-
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. -
value
private final long value
-
-
Constructor Details
-
Lsn
private Lsn(long value)
-
-
Method Details
-
valueOf
- Parameters:
value- numeric represent position in the write-ahead log stream- Returns:
- not null LSN instance
-
valueOf
- Parameters:
value- PostgreSQL JDBC driver domain type representing position in the write-ahead log stream- Returns:
- not null LSN instance
-
valueOf
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
- 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
-
equals
-
hashCode
public int hashCode() -
isValid
public boolean isValid() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Lsn>
-