|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.project.DiskBackedProjectFilePartSet
public class DiskBackedProjectFilePartSet
A memory sensitive Set implementation for managing ProjectFileParts. If too many parts exist, some are stored to disk. Automatically sorted.
| Constructor Summary | |
|---|---|
DiskBackedProjectFilePartSet()
Creates a new instance of DiskBackedProjectFilePartSet |
|
| Method Summary | ||
|---|---|---|
boolean |
add(ProjectFilePart o)
Adds a project file part set to the list of project file part sets. |
|
boolean |
addAll(java.util.Collection<? extends ProjectFilePart> c)
Throws RuntimeException |
|
void |
clear()
Resets the object. |
|
boolean |
contains(java.lang.Object o)
Throws RuntimeException |
|
boolean |
containsAll(java.util.Collection<?> c)
Throws RuntimeException |
|
void |
destroy()
Explicity destroy the disk-backed collection. |
|
protected void |
finalize()
Help prevent amassing large num. |
|
int |
getMaxBufferSize()
Returns the maximum size. |
|
boolean |
isEmpty()
Returns whether the set does not contain any project file parts. |
|
java.util.Iterator<ProjectFilePart> |
iterator()
Returns an iterator of the set of project file parts. |
|
boolean |
remove(java.lang.Object o)
Throws RuntimeException |
|
boolean |
removeAll(java.util.Collection<?> c)
Throws RuntimeException |
|
boolean |
retainAll(java.util.Collection<?> c)
Throws RuntimeException |
|
void |
setMaxBufferSize(int maxBufferSize)
Sets the maximum buffer size. |
|
int |
size()
Returns the number of project file parts. |
|
java.lang.Object[] |
toArray()
Returns an array of project file parts. |
|
|
toArray(T[] a)
Returns an array of project file parts. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public DiskBackedProjectFilePartSet()
Creates a new instance of DiskBackedProjectFilePartSet
| Method Detail |
|---|
protected void finalize()
finalize in class java.lang.Objectpublic void destroy()
Explicity destroy the disk-backed collection. If don't, GC will garbage collect OR temp dir cleaned out when tool reran.
public boolean contains(java.lang.Object o)
Throws RuntimeException
contains in interface java.util.Collection<ProjectFilePart>contains in interface java.util.Set<ProjectFilePart>o -
public boolean remove(java.lang.Object o)
Throws RuntimeException
remove in interface java.util.Collection<ProjectFilePart>remove in interface java.util.Set<ProjectFilePart>o -
public <T> T[] toArray(T[] a)
Returns an array of project file parts.
toArray in interface java.util.Collection<ProjectFilePart>toArray in interface java.util.Set<ProjectFilePart>T - a -
public boolean addAll(java.util.Collection<? extends ProjectFilePart> c)
Throws RuntimeException
addAll in interface java.util.Collection<ProjectFilePart>addAll in interface java.util.Set<ProjectFilePart>c -
public boolean add(ProjectFilePart o)
Adds a project file part set to the list of project file part sets.
add in interface java.util.Collection<ProjectFilePart>add in interface java.util.Set<ProjectFilePart>o -
public boolean containsAll(java.util.Collection<?> c)
Throws RuntimeException
containsAll in interface java.util.Collection<ProjectFilePart>containsAll in interface java.util.Set<ProjectFilePart>c -
public boolean removeAll(java.util.Collection<?> c)
Throws RuntimeException
removeAll in interface java.util.Collection<ProjectFilePart>removeAll in interface java.util.Set<ProjectFilePart>c -
public boolean retainAll(java.util.Collection<?> c)
Throws RuntimeException
retainAll in interface java.util.Collection<ProjectFilePart>retainAll in interface java.util.Set<ProjectFilePart>c -
public void clear()
Resets the object.
clear in interface java.util.Collection<ProjectFilePart>clear in interface java.util.Set<ProjectFilePart>public boolean isEmpty()
Returns whether the set does not contain any project file parts.
isEmpty in interface java.util.Collection<ProjectFilePart>isEmpty in interface java.util.Set<ProjectFilePart>public java.util.Iterator<ProjectFilePart> iterator()
Returns an iterator of the set of project file parts.
iterator in interface java.lang.Iterable<ProjectFilePart>iterator in interface java.util.Collection<ProjectFilePart>iterator in interface java.util.Set<ProjectFilePart>public int size()
Returns the number of project file parts.
size in interface java.util.Collection<ProjectFilePart>size in interface java.util.Set<ProjectFilePart>public java.lang.Object[] toArray()
Returns an array of project file parts.
toArray in interface java.util.Collection<ProjectFilePart>toArray in interface java.util.Set<ProjectFilePart>public int getMaxBufferSize()
Returns the maximum size.
public void setMaxBufferSize(int maxBufferSize)
Sets the maximum buffer size.
maxBufferSize -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||