private void scanReferenceSet(TraceLocal trace, Set<ReferenceValue> set) { for (ReferenceValue value : set) { ObjectReference referent = value.getObjectValue(); if (trace.isReferentLive(referent)) { value.processReference(trace); } else { value.clear(); } } }
/** * {@inheritDoc} * * <p>Only relevant to collectors like MarkCompact. */ @Override public void forward(TraceLocal trace, boolean nursery) { Trace.trace( Item.REFERENCES, "Forwarding %s references: %s", semantics, nursery ? "nursery" : "full-heap"); for (ReferenceValue value : oldRefs) { value.forwardReference(trace); } }
/** * Discover a reference value while scanning stacks * * @param ref Reference value */ public static void discover(ReferenceValue ref) { processors.get(ref.getSemantics()).add(ref); }