AATreeSet.AbstractTreeNode<E>, AATreeSet.Node<E>
Modifier and Type | Field and Description |
---|---|
private java.io.RandomAccessFile |
data |
private long |
fileSize |
private static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
FileAllocationTree(long maxSize,
java.io.RandomAccessFile file)
Create a file allocation tree for the given file, capping it's size at maxSize.
|
Modifier and Type | Method and Description |
---|---|
Region |
alloc(long size)
Allocate a new region of the given size.
|
private void |
checkGrow(Region alloc) |
private void |
checkShrink(Region free) |
void |
clear()
Mark this whole file as free
|
void |
free(Region r)
Mark this region as free.
|
long |
getFileSize()
Return the current occupied size of this file.
|
private void |
grow(long size) |
void |
mark(Region r)
Mark this region as used
|
private void |
shrink(long size) |
find, find, removeAndReturn
add, comparator, first, getRoot, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet
addAll, contains, containsAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
private static final org.slf4j.Logger LOGGER
private long fileSize
private final java.io.RandomAccessFile data
public FileAllocationTree(long maxSize, java.io.RandomAccessFile file)
public Region alloc(long size)
public void mark(Region r)
public void free(Region r)
public void clear()
private void checkGrow(Region alloc)
private void checkShrink(Region free)
private void grow(long size)
private void shrink(long size)
public long getFileSize()