/** * Get the job object at the specified index array * * @param location * @return Job at the specified location or null if no such job was found */ public synchronized Job get(int[] location) { NamedNode n = nodeAt(location); if (n == null) { return null; } return n.contents; }
/** * Get the job object at the specified index array * * @param location * @return Job at the specified location or null if no such job was found */ public synchronized Job get(int[] location) { NamedNode n = nodeAt(location); if (n == null) { return null; } return n.contents; }
/** * Get the job object at the specified index array * * @param location * @return Job at the specified location or null if no such job was found */ public synchronized Job get(int[] location) { NamedNode n = nodeAt(location); if (n == null) { return null; } return n.contents; }
/** * Recursively fetch contents of all nodes under the specified index array, * used by the prefix matching iteration strategy */ public synchronized List<Job> jobsWithPrefix(int[] prefix) { List<Job> jobs = new ArrayList<Job>(); NamedNode prefixNode = nodeAt(prefix); if (prefixNode != null) { getJobsUnder(prefixNode, jobs); } return jobs; }
/** * Recursively fetch contents of all nodes under the specified index array, * used by the prefix matching iteration strategy */ public synchronized List<Job> jobsWithPrefix(int[] prefix) { List<Job> jobs = new ArrayList<Job>(); NamedNode prefixNode = nodeAt(prefix); if (prefixNode != null) { getJobsUnder(prefixNode, jobs); } return jobs; }
/** * Recursively fetch contents of all nodes under the specified index array, * used by the prefix matching iteration strategy */ public synchronized List<Job> jobsWithPrefix(int[] prefix) { List<Job> jobs = new ArrayList<Job>(); NamedNode prefixNode = nodeAt(prefix); if (prefixNode != null) { getJobsUnder(prefixNode, jobs); } return jobs; }
/** * Chop the cache off at the specified index * * @param indexArray */ public synchronized void cut(int[] indexArray) { if (indexArray.length > 0) { int[] newIndex = tail(indexArray); NamedNode node = nodeAt(newIndex); if (node != null) { if (node.children.size() >= indexArray[indexArray.length - 1]) { node.children.set(indexArray[indexArray.length - 1], null); } } } }
/** * Chop the cache off at the specified index * * @param indexArray */ public synchronized void cut(int[] indexArray) { if (indexArray.length > 0) { int[] newIndex = tail(indexArray); NamedNode node = nodeAt(newIndex); if (node != null) { if (node.children.size() >= indexArray[indexArray.length - 1]) { node.children.set(indexArray[indexArray.length - 1], null); } } } }
/** * Chop the cache off at the specified index * * @param indexArray */ public synchronized void cut(int[] indexArray) { if (indexArray.length > 0) { int[] newIndex = tail(indexArray); NamedNode node = nodeAt(newIndex); if (node != null) { if (node.children.size() >= indexArray[indexArray.length - 1]) { node.children.set(indexArray[indexArray.length - 1], null); } } } }