001 // GarbageCollector.java, created by wbeebee 002 // Copyright (C) 2001 Wes Beebee <wbeebee@mit.edu> 003 // Licensed under the terms of the GNU GPL; see COPYING for details. 004 package javax.realtime; 005 006 /** 007 * @author Wes Beebee <<a href="mailto:wbeebee@mit.edu">wbeebee@mit.edu</a>> 008 */ 009 010 /** The system shall provide dynamic ans static information characterizing 011 * the temporal behavior and imposed overhead of any garbage collection 012 * algorithm provided by the system. This information shall be made 013 * available to applications via methods on subclasses of 014 * <code>GarbageCollector</code>. Implementations are allowed to provide 015 * any set of methods in subclasses as long as the temporal behavior and 016 * overhead are sufficiently categorized. The implementations are also 017 * required to fully document the subclasses. In addition, the method(s) 018 * in <code>GarbageCollector</code> shall be made available by all implementation. 019 */ 020 public abstract class GarbageCollector { 021 022 public GarbageCollector() {} 023 024 /** Preemption latency is a measure of the maximum time a 025 * <code>RealtimeThread</code> may have to wait for the collector to 026 * reach a preemption-safe point. Instances of <code>RealtimeThread</code> 027 * are allowed to preempt the garbage collector (instances of 028 * <code>NoHeapRealtimeThread</code> preempt immediately but instances 029 * of <code>RealtimeThread</code> must wait until the collector reaches 030 * a preemption-safe point). 031 * 032 * @return The preempting latency of the garbage collection algorithm 033 * represented by <code>this</code> if applicable. May return 034 * zero, if there is no collector available. 035 */ 036 public abstract RelativeTime getPreemptionLatency(); 037 }