@ThreadSafe public final class BlockStoreLocation extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ANY_DIR
Special value to indicate any dir.
|
static String |
ANY_MEDIUM
Special value to indicate any medium type.
|
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() |
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 static final int ANY_DIR
public static final String ANY_MEDIUM
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 int dir()
ANY_DIR
for any directorypublic String mediumType()
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.