public interface AllocateStrategy
Modifier and Type | Method and Description |
---|---|
boolean |
fitInPossible(StorageDir[] storageDirs,
long requestSizeBytes)
Check whether it is possible to get enough space by evicting some blocks
|
StorageDir |
getStorageDir(StorageDir[] storageDirs,
long userId,
long requestSizeBytes)
Allocate space on StorageDirs.
|
boolean fitInPossible(StorageDir[] storageDirs, long requestSizeBytes)
storageDirs
- candidates of StorageDirs which space will be allocated inrequestSizeBytes
- requested space in bytesStorageDir getStorageDir(StorageDir[] storageDirs, long userId, long requestSizeBytes)
storageDirs
- candidates of StorageDirs that space will be allocated inuserId
- id of userrequestSizeBytes
- size to request in bytesCopyright © 2015. All Rights Reserved.