/** {@inheritDoc} */ @Override public Collection<Accountable> getChildResources() { return Collections.singleton(Accountables.namedAccountable("file", file)); } }
@Override public Collection<Accountable> getChildResources() { List<Accountable> resources = new ArrayList<>(); resources.addAll(Accountables.namedAccountables("field", fields)); resources.add(Accountables.namedAccountable("delegate", postingsReader)); return Collections.unmodifiableList(resources); }
/** * Returns a String description of an Accountable and any nested resources. * This is intended for development and debugging. */ public static String toString(Accountable a) { StringBuilder sb = new StringBuilder(); toString(sb, a, 0); return sb.toString(); }
@Override public Collection<Accountable> getChildResources() { return Accountables.namedAccountables("format", formats); }
@Override public Collection<Accountable> getChildResources() { return Accountables.namedAccountables("file", fileMap); }
@Override public Collection<Accountable> getChildResources() { return Collections.singleton(Accountables.namedAccountable("cache", cache)); } }
@Override public Collection<Accountable> getChildResources() { List<Accountable> resources = new ArrayList<>(); resources.addAll(Accountables.namedAccountables("field", bloomsByFieldName)); if (delegateFieldsProducer != null) { resources.add(Accountables.namedAccountable("delegate", delegateFieldsProducer)); } return Collections.unmodifiableList(resources); }
@Override public Collection<Accountable> getChildResources() { return Accountables.namedAccountables("format", formats); }
private static StringBuilder toString(StringBuilder dest, Accountable a, int depth) { for (int i = 1; i < depth; i++) { dest.append(" "); } if (depth > 0) { dest.append("|-- "); } dest.append(a.toString()); dest.append(": "); dest.append(RamUsageEstimator.humanReadableUnits(a.ramBytesUsed())); dest.append(System.lineSeparator()); for (Accountable child : a.getChildResources()) { toString(dest, child, depth + 1); } return dest; }
/** * Returns an accountable with the provided description and bytes. */ public static Accountable namedAccountable(String description, long bytes) { return namedAccountable(description, Collections.<Accountable>emptyList(), bytes); }
@Override public Collection<Accountable> getChildResources() { List<Accountable> resources = new ArrayList<>(); resources.addAll(Accountables.namedAccountables("field", fields)); resources.add(Accountables.namedAccountable("delegate", postingsReader)); return Collections.unmodifiableCollection(resources); }
/** {@inheritDoc} */ @Override public synchronized Collection<Accountable> getChildResources() { return Accountables.namedAccountables("file", new HashMap<>(fileMap)); }
msg(infoStream, Accountables.toString(reader));
@Override public Collection<Accountable> getChildResources() { return Collections.singleton(Accountables.namedAccountable("term vector index", indexReader)); }
@Override public Collection<Accountable> getChildResources() { List<Accountable> resources = new ArrayList<>(); resources.addAll(Accountables.namedAccountables("field", fields)); resources.add(Accountables.namedAccountable("delegate", postingsReader)); return Collections.unmodifiableList(resources); }
@Override public Collection<Accountable> getChildResources() { lock.lock(); try { return Accountables.namedAccountables("segment", cache); } finally { lock.unlock(); } }
@Override public Collection<Accountable> getChildResources() { return Collections.singleton(Accountables.namedAccountable("file", file)); }
@Override public Collection<Accountable> getChildResources() { List<Accountable> resources = new ArrayList<>(); resources.addAll(Accountables.namedAccountables("field", fields)); resources.add(Accountables.namedAccountable("delegate", postingsReader)); return Collections.unmodifiableList(resources); }
@Override public synchronized Collection<Accountable> getChildResources() { return Accountables.namedAccountables("segment", ordsCache); } }
@Override public Collection<Accountable> getChildResources() { List<Accountable> resources = new ArrayList<>(); resources.add(Accountables.namedAccountable("global ord deltas", globalOrdDeltas)); resources.add(Accountables.namedAccountable("first segments", firstSegments)); resources.add(Accountables.namedAccountable("segment map", segmentMap)); // TODO: would be nice to return actual child segment deltas too, but the optimizations are confusing return resources; } }