public class TreeCache extends Object
Modifier and Type | Class and Description |
---|---|
class |
TreeCache.NamedNode |
Constructor and Description |
---|
TreeCache() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsLocation(int[] location)
Does the location exist?
|
void |
cut(int[] indexArray)
Chop the cache off at the specified index
|
Job |
get(int[] location)
Get the job object at the specified index array
|
int |
getIndexLength()
The length of index arrays of jobs within the TreeCache.
|
void |
insertJob(Job j)
Add a job to the cache, the job is inserted at a position corresponding
to its index array property
|
List<Job> |
jobsWithPrefix(int[] prefix)
Recursively fetch contents of all nodes under the specified index array,
used by the prefix matching iteration strategy
|
protected TreeCache.NamedNode |
nodeAt(int[] position) |
String |
toString()
Show the tree structure, printing each node recursively
|
public String toString()
public int getIndexLength()
If no jobs have been submitted this method returns -1
public void insertJob(Job j)
j
- protected TreeCache.NamedNode nodeAt(int[] position)
public void cut(int[] indexArray)
indexArray
- public List<Job> jobsWithPrefix(int[] prefix)
public boolean containsLocation(int[] location)
location
- public Job get(int[] location)
location
- Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.