Enum 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 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_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 name
        java.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:
        toString in class java.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