org.apache.hadoop.hdfs.protocol
Enum DataTransferProtocol.Op

java.lang.Object
  extended by java.lang.Enum<DataTransferProtocol.Op>
      extended by org.apache.hadoop.hdfs.protocol.DataTransferProtocol.Op
All Implemented Interfaces:
Serializable, Comparable<DataTransferProtocol.Op>
Enclosing interface:
DataTransferProtocol

public static enum DataTransferProtocol.Op
extends Enum<DataTransferProtocol.Op>

Operation


Enum Constant Summary
BLOCK_CHECKSUM
           
COPY_BLOCK
           
READ_BLOCK
           
READ_METADATA
           
REPLACE_BLOCK
           
WRITE_BLOCK
           
 
Field Summary
 byte code
          The code for this operation.
 
Method Summary
static DataTransferProtocol.Op read(DataInput in)
          Read from in
static DataTransferProtocol.Op valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DataTransferProtocol.Op[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 void write(DataOutput out)
          Write to out
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WRITE_BLOCK

public static final DataTransferProtocol.Op WRITE_BLOCK

READ_BLOCK

public static final DataTransferProtocol.Op READ_BLOCK

READ_METADATA

public static final DataTransferProtocol.Op READ_METADATA

REPLACE_BLOCK

public static final DataTransferProtocol.Op REPLACE_BLOCK

COPY_BLOCK

public static final DataTransferProtocol.Op COPY_BLOCK

BLOCK_CHECKSUM

public static final DataTransferProtocol.Op BLOCK_CHECKSUM
Field Detail

code

public final byte code
The code for this operation.

Method Detail

values

public static DataTransferProtocol.Op[] 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 (DataTransferProtocol.Op c : DataTransferProtocol.Op.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DataTransferProtocol.Op valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

read

public static DataTransferProtocol.Op read(DataInput in)
                                    throws IOException
Read from in

Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Write to out

Throws:
IOException


Copyright © 2009 The Apache Software Foundation