|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractSet<T> net.sf.ehcache.store.disk.ods.AATreeSet<Region> net.sf.ehcache.store.disk.ods.FileAllocationTree
public final class FileAllocationTree
File allocation tree allows C-like alloc/free operations on a random access file.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.ehcache.store.disk.ods.AATreeSet |
---|
AATreeSet.AbstractTreeNode<E>, AATreeSet.Node<E> |
Constructor Summary | |
---|---|
FileAllocationTree(long maxSize,
RandomAccessFile file)
Create a file allocation tree for the given file, capping it's size at maxSize. |
Method Summary | |
---|---|
Region |
alloc(long size)
Allocate a new region of the given size. |
void |
clear()
Mark this whole file as free |
Region |
find(long size)
Find a region of the the given size. |
Region |
find(Object o)
Find the node within this tree equal to the probe node. |
void |
free(Region r)
Mark this region as free. |
long |
getFileSize()
Return the current occupied size of this file. |
void |
mark(Region r)
Mark this region as used |
Region |
removeAndReturn(Object o)
Remove the node matching this object and return it. |
Methods inherited from class net.sf.ehcache.store.disk.ods.AATreeSet |
---|
add, comparator, first, getRoot, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
addAll, contains, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public FileAllocationTree(long maxSize, RandomAccessFile file)
Method Detail |
---|
public Region alloc(long size)
public void mark(Region r)
public void free(Region r)
public void clear()
clear
in interface Collection<Region>
clear
in interface Set<Region>
clear
in class AATreeSet<Region>
public long getFileSize()
public Region removeAndReturn(Object o)
AATreeSet
removeAndReturn
in class AATreeSet<Region>
public Region find(Object o)
AATreeSet
find
in class AATreeSet<Region>
public Region find(long size)
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |