public static enum WALTailingReader.State extends Enum<WALTailingReader.State>
Enum Constant and Description |
---|
EOF_AND_RESET
This means we reach the EOF and the upper layer need to reset to see if there is more data.
|
EOF_AND_RESET_COMPRESSION
Mostly the same with the above
EOF_AND_RESET , the difference is that here we also
mess up the compression dictionary when reading data, so the upper layer should also clear
the compression context when reseting, which means when calling resetTo method, we need to
skip to the position instead of just seek to, which will impact performance. |
EOF_WITH_TRAILER
This means the WAL file has a trailer and we have reached it, which means we have finished
reading this file normally
|
ERROR_AND_RESET
This means we meet an error so the upper layer need to reset to read again
|
ERROR_AND_RESET_COMPRESSION
Mostly the same with the above
ERROR_AND_RESET , the difference is that here we also
mess up the compression dictionary when reading data, so the upper layer should also clear
the compression context when reseting, which means when calling resetTo method, we need to
skip to the position instead of just seek to, which will impact performance. |
NORMAL
This means we read an Entry without any error
|
Modifier and Type | Field and Description |
---|---|
private WALTailingReader.Result |
result
A dummy result for returning, as except
NORMAL , for other state we do not need to
provide fields other than state in the returned WALTailingReader.Result . |
Modifier and Type | Method and Description |
---|---|
boolean |
eof() |
WALTailingReader.Result |
getResult() |
boolean |
resetCompression() |
static WALTailingReader.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WALTailingReader.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WALTailingReader.State NORMAL
public static final WALTailingReader.State EOF_WITH_TRAILER
public static final WALTailingReader.State ERROR_AND_RESET
public static final WALTailingReader.State ERROR_AND_RESET_COMPRESSION
ERROR_AND_RESET
, the difference is that here we also
mess up the compression dictionary when reading data, so the upper layer should also clear
the compression context when reseting, which means when calling resetTo method, we need to
skip to the position instead of just seek to, which will impact performance.public static final WALTailingReader.State EOF_AND_RESET
public static final WALTailingReader.State EOF_AND_RESET_COMPRESSION
EOF_AND_RESET
, the difference is that here we also
mess up the compression dictionary when reading data, so the upper layer should also clear
the compression context when reseting, which means when calling resetTo method, we need to
skip to the position instead of just seek to, which will impact performance. The
implementation should try its best to not fall into this situation.private WALTailingReader.Result result
NORMAL
, for other state we do not need to
provide fields other than state in the returned WALTailingReader.Result
.public static WALTailingReader.State[] values()
for (WALTailingReader.State c : WALTailingReader.State.values()) System.out.println(c);
public static WALTailingReader.State valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic WALTailingReader.Result getResult()
public boolean resetCompression()
public boolean eof()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.