@Test public void testOldReclaimer() { assertReclaim(newOldReclaimer(TAIL, newGCGeneration(0, 0, false), 1)); assertReclaim(newOldReclaimer(FULL, newGCGeneration(1, 1, false), 1), "00w"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(2, 1, false), 1), "00w", "11w"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(3, 1, false), 1), "00w", "11w", "21w"); assertReclaim(newOldReclaimer(FULL, newGCGeneration(4, 2, false), 1), "00w", "11w", "11c", "21w", "21c", "31w", "31c"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(5, 2, false), 1), "00w", "11w", "11c", "21w", "21c", "31w", "31c", "42w"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(6, 2, false), 1), "00w", "11w", "11c", "21w", "21c", "31w", "31c", "42w", "52w"); assertReclaim(newOldReclaimer(FULL, newGCGeneration(7, 3, false), 1), "00w", "11w", "11c", "21w", "21c", "31w", "31c", "42w", "42c", "52w", "52c", "62w", "62c"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(0, 0, false), 2)); assertReclaim(newOldReclaimer(FULL, newGCGeneration(1, 1, false), 2)); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(2, 1, false), 2), "00w"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(3, 1, false), 2), "00w", "11w"); assertReclaim(newOldReclaimer(FULL, newGCGeneration(4, 2, false), 2), "00w", "11w", "21w"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(5, 2, false), 2), "00w", "11w", "11c", "21w", "21c", "31w", "31c"); assertReclaim(newOldReclaimer(TAIL, newGCGeneration(6, 2, false), 2), "00w", "11w", "11c", "21w", "21c", "31w", "31c", "42w"); assertReclaim(newOldReclaimer(FULL, newGCGeneration(7, 3, false), 2), "00w", "11w", "11c", "21w", "21c", "31w", "31c", "42w", "52w"); }
static Predicate<GCGeneration> newOldReclaimer( @NotNull GCType lastGCType, @NotNull final GCGeneration referenceGeneration, int retainedGenerations) { switch (checkNotNull(lastGCType)) { case FULL: return newOldFullReclaimer(referenceGeneration, retainedGenerations); case TAIL: return newOldTailReclaimer(referenceGeneration, retainedGenerations); default: throw new IllegalArgumentException("Invalid gc type: " + lastGCType); } }
Reclaimers { static Predicate<GCGeneration> newOldReclaimer( @NotNull GCType lastGCType, @NotNull final GCGeneration referenceGeneration, int retainedGenerations) { switch (checkNotNull(lastGCType)) { case FULL: return newOldFullReclaimer(referenceGeneration, retainedGenerations); case TAIL: return newOldTailReclaimer(referenceGeneration, retainedGenerations); default: throw new IllegalArgumentException("Invalid gc type: " + lastGCType); } } }
Reclaimers { static Predicate<GCGeneration> newOldReclaimer( @NotNull GCType lastGCType, @NotNull final GCGeneration referenceGeneration, int retainedGenerations) { switch (checkNotNull(lastGCType)) { case FULL: return newOldFullReclaimer(referenceGeneration, retainedGenerations); case TAIL: return newOldTailReclaimer(referenceGeneration, retainedGenerations); default: throw new IllegalArgumentException("Invalid gc type: " + lastGCType); } } private  Reclaimers(); }
Reclaimers { static Predicate<GCGeneration> newOldReclaimer( @NotNull GCType lastGCType, @NotNull final GCGeneration referenceGeneration, int retainedGenerations) { switch (checkNotNull(lastGCType)) { case FULL: return newOldFullReclaimer(referenceGeneration, retainedGenerations); case TAIL: return newOldTailReclaimer(referenceGeneration, retainedGenerations); default: throw new IllegalArgumentException("Invalid gc type: " + lastGCType); } } private  Reclaimers();  }
Reclaimers { static Predicate<GCGeneration> newOldReclaimer( @NotNull GCType lastGCType, @NotNull final GCGeneration referenceGeneration, int retainedGenerations) { switch (checkNotNull(lastGCType)) { case FULL: return newOldFullReclaimer(referenceGeneration, retainedGenerations); case TAIL: return newOldTailReclaimer(referenceGeneration, retainedGenerations); default: throw new IllegalArgumentException("Invalid gc type: " + lastGCType); } } private  Reclaimers();   }