001 /* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013 package org.mmtk.vm; 014 015 import org.mmtk.plan.TraceLocal; 016 import org.vmmagic.pragma.Uninterruptible; 017 018 /** 019 * This class manages finalizable objects. 020 */ 021 @Uninterruptible 022 public abstract class FinalizableProcessor { 023 024 /** 025 * Clear the contents of the table. This is called when finalization is 026 * disabled to make it easier for VMs to change this setting at runtime. 027 */ 028 public abstract void clear(); 029 030 /** 031 * Scan through the list of references. 032 * 033 * @param trace the thread local trace element. 034 * @param nursery {@code true} if it is safe to only scan new references. 035 */ 036 public abstract void scan(TraceLocal trace, boolean nursery); 037 038 /** 039 * Iterate over and forward entries in the table. 040 */ 041 public abstract void forward(TraceLocal trace, boolean nursery); 042 }