Enum 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>
- Enclosing class:
- WALEntryStream
-
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 type with the specified name.static WALEntryStream.HasNext[]
values()
Returns an array containing the constants of this enum type, 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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-