Class LogSequenceNumber
java.lang.Object
io.r2dbc.postgresql.replication.LogSequenceNumber
- All Implemented Interfaces:
 Comparable<LogSequenceNumber>
LSN (Log Sequence Number). The value represents a pointer to a location in the XLOG.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LogSequenceNumberZero is used indicate an invalid pointer. - 
Method Summary
Modifier and TypeMethodDescriptionlongasLong()asString()intbooleaninthashCode()toString()static LogSequenceNumbervalueOf(long value) static LogSequenceNumberCreate LSN instance by string represent LSN. 
- 
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. 
 - 
 - 
Method Details
- 
valueOf
- Parameters:
 value- numeric represent 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:
 - the LSN or 
INVALID_LSNif specified string does not have not valid form 
 - 
asLong
public long asLong()- Returns:
 - Long represent 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
 - 
toString
 - 
compareTo
- Specified by:
 compareToin interfaceComparable<LogSequenceNumber>
 
 -