| Modifier and Type | Field and Description |
|---|---|
| private final RandomAccessFile | |
| private long | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | FileAllocationTree(long maxSize, RandomAccessFile file)
Create a file allocation tree for the given file, capping it's size at maxSize. |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized Region | |
| private void | |
| private void | |
| public synchronized void | clear()
Overrides net. Implements java. |
| public synchronized void | |
| public synchronized long | |
| private void | |
| public synchronized void | |
| private void |
| data | back to summary |
|---|---|
| private final RandomAccessFile data | |
| fileSize | back to summary |
|---|---|
| private long fileSize | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| FileAllocationTree | back to summary |
|---|---|
| public FileAllocationTree(long maxSize, RandomAccessFile file) Create a file allocation tree for the given file, capping it's size at maxSize. | |
| alloc | back to summary |
|---|---|
| public synchronized Region alloc(long size) Allocate a new region of the given size. | |
| checkGrow | back to summary |
|---|---|
| private void checkGrow(Region alloc) | |
| checkShrink | back to summary |
|---|---|
| private void checkShrink(Region free) | |
| clear | back to summary |
|---|---|
| public synchronized void clear() Overrides net. Implements java. Mark this whole file as free
| |
| free | back to summary |
|---|---|
| public synchronized void free(Region r) Mark this region as free. | |
| getFileSize | back to summary |
|---|---|
| public synchronized long getFileSize() Return the current occupied size of this file. | |
| grow | back to summary |
|---|---|
| private void grow(long size) | |
| mark | back to summary |
|---|---|
| public synchronized void mark(Region r) Mark this region as used | |
| shrink | back to summary |
|---|---|
| private void shrink(long size) | |