001package org.kuali.common.util.runonce.smart; 002 003public interface RunOnce { 004 005 /** 006 * Do whatever is needed for isTrue() to return the correct value 007 */ 008 void initialize(); 009 010 /** 011 * Indicates it is safe to run something once. 012 */ 013 boolean isTrue(); 014 015 /** 016 * Update state in a way that persists across JVM restarts (eg database table, properties file, etc) 017 */ 018 void changeState(RunOnceState state); 019 020}