- protected void reap(String reapTable, String reapColumn) {
- if (this.reapTable != null || this.reapColumn != null)
- throw new RuntimeException("reapTable/reapColumn already set");
- this.reapTable = reapTable;
- this.reapColumn = reapColumn;
- if (reapTable != null && reapColumn != null)
- Main.cron.executeLater(1000 * REAPER_INTERVAL_SECONDS, new Reaper());
+ public class SqliteTable {
+ public final String name;
+ private String reapColumn = null;
+ private SqliteTable(String name) {
+ this.name = name;
+ tables.put(name, this);
+ }
+ protected void reap(String reapColumn) {
+ if (this.reapColumn != null) throw new RuntimeException("reapColumn already set");
+ this.reapColumn = reapColumn;
+ Main.cron.executeLater(1000 * REAPER_INTERVAL_SECONDS, new Reaper(name, reapColumn));
+ }