public static final class BucketAllocator.Bucket extends Object
Modifier and Type | Field and Description |
---|---|
private long |
baseOffset |
private int |
freeCount |
private int[] |
freeList |
private int |
itemAllocationSize |
private int |
itemCount |
private int |
sizeIndex |
private int |
usedCount |
Constructor and Description |
---|
Bucket(long offset) |
Modifier and Type | Method and Description |
---|---|
void |
addAllocation(long offset) |
long |
allocate()
Allocate a block in this bucket, return the offset representing the position in physical
space
|
private void |
free(long offset) |
int |
freeCount() |
private boolean |
freeListContains(int blockNo) |
long |
getBaseOffset() |
int |
getFreeBytes() |
int |
getItemAllocationSize() |
int |
getUsedBytes() |
boolean |
hasFreeSpace() |
boolean |
isCompletelyFree() |
boolean |
isUninstantiated() |
(package private) void |
reconfigure(int sizeIndex,
int[] bucketSizes,
long bucketCapacity) |
int |
sizeIndex() |
int |
usedCount() |
private long baseOffset
private int itemAllocationSize
private int sizeIndex
private int itemCount
private int[] freeList
private int freeCount
private int usedCount
public Bucket(long offset)
void reconfigure(int sizeIndex, int[] bucketSizes, long bucketCapacity)
public boolean isUninstantiated()
public int sizeIndex()
public int getItemAllocationSize()
public boolean hasFreeSpace()
public boolean isCompletelyFree()
public int freeCount()
public int usedCount()
public int getFreeBytes()
public int getUsedBytes()
public long getBaseOffset()
public long allocate()
public void addAllocation(long offset) throws BucketAllocatorException
BucketAllocatorException
private void free(long offset)
private boolean freeListContains(int blockNo)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.