@NotThreadSafe public final class StorageTier extends Object
StorageDir
which actually contains metadata information about blocks stored and space
used/available.Modifier and Type | Method and Description |
---|---|
long |
getAvailableBytes() |
long |
getCapacityBytes() |
StorageDir |
getDir(int dirIndex)
Returns a directory for the given index.
|
List<String> |
getLostStorage() |
List<StorageDir> |
getStorageDirs() |
String |
getTierAlias() |
int |
getTierOrdinal() |
static StorageTier |
newStorageTier(String tierAlias,
boolean isMultiTier)
Factory method to create
StorageTier . |
void |
removeStorageDir(StorageDir dir)
Removes a directory.
|
public static StorageTier newStorageTier(String tierAlias, boolean isMultiTier) throws BlockAlreadyExistsException, IOException, WorkerOutOfSpaceException
StorageTier
.tierAlias
- the tier aliasisMultiTier
- whether this tier is part of a multi-tier setupBlockAlreadyExistsException
- if the tier already existsWorkerOutOfSpaceException
- if there is not enough space availableIOException
public int getTierOrdinal()
public String getTierAlias()
public long getCapacityBytes()
public long getAvailableBytes()
@Nullable public StorageDir getDir(int dirIndex)
dirIndex
- the directory indexpublic List<StorageDir> getStorageDirs()
public void removeStorageDir(StorageDir dir)
dir
- directory to be removedCopyright © 2023. All Rights Reserved.