Package alluxio.stress.client
Enum ClientIOOperation
- java.lang.Object
-
- java.lang.Enum<ClientIOOperation>
-
- alluxio.stress.client.ClientIOOperation
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ClientIOOperation>
public enum ClientIOOperation extends java.lang.Enum<ClientIOOperation>
The operations for the client io stress tests. There are 2 main types of reads: streaming and positioned. The streaming reads do not take file offsets as part of the api, so a random, streaming read is implemented with a seek() call before the read call. For positioned reads, the file offset is an explicit parameter in the api, so no seek() calls are necessary to read from any file offset.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description POS_READPositioned read api.POS_READ_FULLYPositioned read fully api.READ_ARRAYStreaming read api, using arrays.READ_BYTE_BUFFERStreaming read api, using byte buffers.READ_FULLYStreaming read fully api.WRITEThe write operation, for writing data for the read operations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientIOOperationfromString(java.lang.String text)Creates an instance type from the string.static booleanisPosRead(ClientIOOperation operation)static booleanisRead(ClientIOOperation operation)java.lang.StringtoString()static ClientIOOperationvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ClientIOOperation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WRITE
public static final ClientIOOperation WRITE
The write operation, for writing data for the read operations.
-
READ_ARRAY
public static final ClientIOOperation READ_ARRAY
Streaming read api, using arrays.
-
READ_BYTE_BUFFER
public static final ClientIOOperation READ_BYTE_BUFFER
Streaming read api, using byte buffers.
-
READ_FULLY
public static final ClientIOOperation READ_FULLY
Streaming read fully api.
-
POS_READ
public static final ClientIOOperation POS_READ
Positioned read api.
-
POS_READ_FULLY
public static final ClientIOOperation POS_READ_FULLY
Positioned read fully api.
-
-
Method Detail
-
values
public static ClientIOOperation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClientIOOperation c : ClientIOOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClientIOOperation valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
isRead
public static boolean isRead(ClientIOOperation operation)
- Parameters:
operation- the operation- Returns:
- true if the operation is a read
-
isPosRead
public static boolean isPosRead(ClientIOOperation operation)
- Parameters:
operation- the operation- Returns:
- true if the operation is a positioned read
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<ClientIOOperation>
-
fromString
public static ClientIOOperation fromString(java.lang.String text)
Creates an instance type from the string. This method is case insensitive.- Parameters:
text- the instance type in string- Returns:
- the created instance
-
-