public enum BlockStatus extends Enum<BlockStatus>
| Enum Constant and Description |
|---|
Needed
This status indicates that we still need this block and have not yet assigned it to a peer.
|
Requested
This status indicates that we still need this block and have requested it from a peer.
|
Stored
This status indicates that we received and stored the bytes of this piece but the
Piece as an
entirety needs to be on this status before we can verify that the received information is correct. |
Verified
The block information we have is verified to match the expected data.
|
| Modifier and Type | Method and Description |
|---|---|
static BlockStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BlockStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BlockStatus Needed
public static final BlockStatus Requested
public static final BlockStatus Stored
Piece as an
entirety needs to be on this status before we can verify that the received information is correct.public static final BlockStatus Verified
public static BlockStatus[] values()
for (BlockStatus c : BlockStatus.values()) System.out.println(c);
public static BlockStatus valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016. All rights reserved.