@ThreadSafe public final class BlockStoreLocation extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ANY_TIER
Special value to indicate any tier.
|
Constructor and Description |
---|
BlockStoreLocation(String tierAlias,
int dirIndex)
Creates a new instance of
BlockStoreLocation . |
BlockStoreLocation(String tierAlias,
int dirIndex,
String mediumType)
Creates a new instance of
BlockStoreLocation . |
Modifier and Type | Method and Description |
---|---|
static BlockStoreLocation |
anyDirInAnyTierWithMedium(String mediumType)
Convenience method to return the block store location representing any dir in any tier
with specific medium.
|
static BlockStoreLocation |
anyDirInTier(String tierAlias)
Convenience method to return the block store location representing any dir in the tier.
|
static BlockStoreLocation |
anyTier()
Convenience method to return the block store location representing any dir in any tier.
|
boolean |
belongsTo(BlockStoreLocation location)
Returns whether this location belongs to the specific location.
|
int |
dir()
Gets the directory index of the location.
|
boolean |
equals(Object o)
Compares to a specific object.
|
int |
hashCode() |
boolean |
hasNoRestriction()
Check whether the location has no restriction, i.e.,
ANY_TIER_LOCATION . |
boolean |
isAnyDir()
Check whether the location is
ANY_DIR . |
boolean |
isAnyDirWithTier()
Check whether the location is
ANY_DIR within the specified tier. |
boolean |
isAnyMedium()
Check whether the location is
ANY_MEDIUM . |
boolean |
isAnyTier()
Check whether the location is
ANY_TIER . |
String |
mediumType()
Gets the medium type of the location.
|
String |
tierAlias()
Gets the storage tier alias of the location.
|
BlockStoreLocationProto |
toProto()
Fill BlockStoreLocationproto with location information.
|
String |
toString()
Converts the location to a human readable form.
|
public static final String ANY_TIER
public BlockStoreLocation(String tierAlias, int dirIndex)
BlockStoreLocation
.tierAlias
- the tier alias to usedirIndex
- the directory index to usepublic BlockStoreLocation(String tierAlias, int dirIndex, String mediumType)
BlockStoreLocation
.tierAlias
- the tier alias to usedirIndex
- the directory index to usemediumType
- the medium type to usepublic static BlockStoreLocation anyTier()
public static BlockStoreLocation anyDirInTier(String tierAlias)
tierAlias
- The alias of the tier this returned block store location will representpublic static BlockStoreLocation anyDirInAnyTierWithMedium(String mediumType)
mediumType
- mediumType this returned block store location will representpublic String tierAlias()
public boolean hasNoRestriction()
ANY_TIER_LOCATION
.ANY_TIER_LOCATION
public boolean isAnyTier()
ANY_TIER
.ANY_TIER
public int dir()
ANY_DIR
for any directorypublic boolean isAnyDir()
ANY_DIR
.ANY_DIR
public boolean isAnyDirWithTier()
ANY_DIR
within the specified tier.ANY_DIR
within the specified tierpublic String mediumType()
public boolean isAnyMedium()
ANY_MEDIUM
.ANY_MEDIUM
public boolean belongsTo(BlockStoreLocation location)
location
- the target BlockStoreLocationpublic String toString()
public boolean equals(Object o)
equals
in class Object
o
- the object to compareBlockStoreLocation
and represents the same tier and dirpublic BlockStoreLocationProto toProto()
Copyright © 2023. All Rights Reserved.