Package alluxio.worker.block.meta
Interface StorageTier
-
public interface StorageTier
Represents a tier of storage, for example memory or SSD. It serves as a container ofStorageDir
which actually contains metadata information about blocks stored and space used/available.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getAvailableBytes()
long
getCapacityBytes()
StorageDir
getDir(int dirIndex)
Returns a directory for the given index.java.util.List<java.lang.String>
getLostStorage()
java.util.List<StorageDir>
getStorageDirs()
java.lang.String
getTierAlias()
int
getTierOrdinal()
void
removeStorageDir(StorageDir dir)
Removes a directory.
-
-
-
Method Detail
-
getTierOrdinal
int getTierOrdinal()
- Returns:
- the tier ordinal
-
getTierAlias
java.lang.String getTierAlias()
- Returns:
- the tier alias
-
getCapacityBytes
long getCapacityBytes()
- Returns:
- the capacity (in bytes)
-
getAvailableBytes
long getAvailableBytes()
- Returns:
- the remaining capacity (in bytes)
-
getDir
@Nullable StorageDir getDir(int dirIndex)
Returns a directory for the given index.- Parameters:
dirIndex
- the directory index- Returns:
- a directory, or null if the directory does not exist
-
getStorageDirs
java.util.List<StorageDir> getStorageDirs()
- Returns:
- a list of directories in this tier
-
getLostStorage
java.util.List<java.lang.String> getLostStorage()
- Returns:
- a list of lost storage paths
-
removeStorageDir
void removeStorageDir(StorageDir dir)
Removes a directory.- Parameters:
dir
- directory to be removed
-
-