public String stats() { StringBuilder b = new StringBuilder(); int n = 0; int size = 0; int alloc = 0; b.append("Segments: ").append(segments.length).append("\n"); for (Segment<T,A> seg : segments) { int ssize = 0; int salloc = 0; seg.lock(); try { ssize = seg.count(); salloc = seg.entryTable.length; } finally { seg.unlock(); } size += ssize; alloc += salloc; b.append("seg[").append(n++).append("]: size: ").append(ssize) .append(" alloc: ").append(salloc).append("\n"); } b.append("Total: size: ").append(size) .append(" alloc: ").append(alloc).append("\n"); return b.toString(); }
public String stats() { StringBuilder b = new StringBuilder(); int n = 0; int size = 0; int alloc = 0; b.append("Segments: ").append(segments.length).append("\n"); for (Segment<T,A> seg : segments) { int ssize = 0; int salloc = 0; seg.lock(); try { ssize = seg.count(); salloc = seg.entryTable.length; } finally { seg.unlock(); } size += ssize; alloc += salloc; b.append("seg[").append(n++).append("]: size: ").append(ssize) .append(" alloc: ").append(salloc).append("\n"); } b.append("Total: size: ").append(size) .append(" alloc: ").append(alloc).append("\n"); return b.toString(); }
public String stats() { StringBuilder b = new StringBuilder(); int n = 0; int size = 0; int alloc = 0; b.append("Segments: ").append(segments.length).append("\n"); for (Segment<T,A> seg : segments) { int ssize = 0; int salloc = 0; seg.lock(); try { ssize = seg.count(); salloc = seg.entryTable.length; } finally { seg.unlock(); } size += ssize; alloc += salloc; b.append("seg[").append(n++).append("]: size: ").append(ssize) .append(" alloc: ").append(salloc).append("\n"); } b.append("Total: size: ").append(size) .append(" alloc: ").append(alloc).append("\n"); return b.toString(); }
public void run() { for ( ;; ) { try { sleep(VULTURE_RUN_FREQ_SECONDS * 1000); } catch (InterruptedException e) {} boolean dump = size() > 200; if (dump) { LOG.debug("***Vulture {} waking, stats:", id); LOG.debug(stats()); } for (int i = segments.length; --i >= 0; ) { Segment<T,A> seg = segments[i]; seg.lock(); try { seg.expunge(); } finally { seg.unlock(); } yield(); } if (dump) { LOG.debug("***Vulture {} sleeping, stats:", id); LOG.debug(stats()); } } } };
public void run() { for ( ;; ) { try { sleep(VULTURE_RUN_FREQ_SECONDS * 1000); } catch (InterruptedException e) {} boolean dump = size() > 200; if (dump) { LOG.debug("***Vulture {} waking, stats:", id); LOG.debug(stats()); } for (int i = segments.length; --i >= 0; ) { Segment<T,A> seg = segments[i]; seg.lock(); try { seg.expunge(); } finally { seg.unlock(); } yield(); } if (dump) { LOG.debug("***Vulture {} sleeping, stats:", id); LOG.debug(stats()); } } } };
public void run() { for ( ;; ) { try { sleep(VULTURE_RUN_FREQ_SECONDS * 1000); } catch (InterruptedException e) {} boolean dump = size() > 200; if (dump) { LOG.debug("***Vulture {} waking, stats:", id); LOG.debug(stats()); } for (int i = segments.length; --i >= 0; ) { Segment<T,A> seg = segments[i]; seg.lock(); try { seg.expunge(); } finally { seg.unlock(); } yield(); } if (dump) { LOG.debug("***Vulture {} sleeping, stats:", id); LOG.debug(stats()); } } } };
public String stats() { StringBuilder b = new StringBuilder(); int n = 0; int size = 0; int alloc = 0; b.append("Segments: ").append(segments.length).append("\n"); for (Segment<T,A> seg : segments) { int ssize = 0; int salloc = 0; seg.lock(); try { ssize = seg.count(); salloc = seg.entryTable.length; } finally { seg.unlock(); } size += ssize; alloc += salloc; b.append("seg[").append(n++).append("]: size: ").append(ssize) .append(" alloc: ").append(salloc).append("\n"); } b.append("Total: size: ").append(size) .append(" alloc: ").append(alloc).append("\n"); return b.toString(); }
public void run() { for ( ;; ) { try { sleep(VULTURE_RUN_FREQ_SECONDS * 1000); } catch (InterruptedException e) {} boolean dump = size() > 200; if (dump) { LOG.debug("***Vulture {} waking, stats:", id); LOG.debug(stats()); } for (int i = segments.length; --i >= 0; ) { Segment<T,A> seg = segments[i]; seg.lock(); try { seg.expunge(); } finally { seg.unlock(); } yield(); } if (dump) { LOG.debug("***Vulture {} sleeping, stats:", id); LOG.debug(stats()); } } } };