public class HashAllocator extends java.lang.Object implements Allocator
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<PageStoreDir> |
mDirs |
| Constructor and Description |
|---|
HashAllocator(java.util.List<PageStoreDir> dirs) |
HashAllocator(java.util.List<PageStoreDir> dirs,
java.util.function.Function<java.lang.String,java.lang.Integer> hashFunction) |
| Modifier and Type | Method and Description |
|---|---|
PageStoreDir |
allocate(java.lang.String fileId,
long fileLength) |
protected final java.util.List<PageStoreDir> mDirs
public HashAllocator(java.util.List<PageStoreDir> dirs)
dirs - page store directoriespublic HashAllocator(java.util.List<PageStoreDir> dirs, java.util.function.Function<java.lang.String,java.lang.Integer> hashFunction)
dirs - page store directorieshashFunction - hash functionpublic PageStoreDir allocate(java.lang.String fileId, long fileLength)
Copyright © 2022. All Rights Reserved.