Enum Class WALEntryStream.HasNext
java.lang.Object
java.lang.Enum<WALEntryStream.HasNext>
org.apache.hadoop.hbase.replication.regionserver.WALEntryStream.HasNext
- All Implemented Interfaces:
Serializable
,Comparable<WALEntryStream.HasNext>
,Constable
- Enclosing class:
- WALEntryStream
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionmeans there is no new entry and stream is end, the upper layer should close this stream and release other resources as wellmeans there are something wrong or we have reached EOF of the current file but it is not closed yet and there is no new file in the replication queue yet, you should sleep a while and try to call hasNext againUsually this means we have finished reading a WAL file, and for simplify the implementation of this class, we just let the upper layer issue a new hasNext call again to open the next WAL file.means there is a new entry and you could use peek or next to get current entry -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic WALEntryStream.HasNext
Returns the enum constant of this class with the specified name.static WALEntryStream.HasNext[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
YES
means there is a new entry and you could use peek or next to get current entry -
RETRY
means there are something wrong or we have reached EOF of the current file but it is not closed yet and there is no new file in the replication queue yet, you should sleep a while and try to call hasNext again -
RETRY_IMMEDIATELY
Usually this means we have finished reading a WAL file, and for simplify the implementation of this class, we just let the upper layer issue a new hasNext call again to open the next WAL file. -
NO
means there is no new entry and stream is end, the upper layer should close this stream and release other resources as well
-
-
Constructor Details
-
HasNext
private HasNext()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-