org.postgresql.replication
Class LogSequenceNumber
java.lang.Object
org.postgresql.replication.LogSequenceNumber
public final class LogSequenceNumber
- extends Object
LSN (Log Sequence Number) data which is a pointer to a location in the XLOG
INVALID_LSN
public static final LogSequenceNumber 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.
valueOf
public static LogSequenceNumber valueOf(long value)
- Parameters:
value
- numeric represent position in the write-ahead log stream
- Returns:
- not null LSN instance
valueOf
public static LogSequenceNumber 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 example 16/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
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
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2017 PostgreSQL Global Development Group. All rights reserved.