1 package org.kuali.common.util.runonce.smart;
2
3 public interface RunOnce {
4
5 /**
6 * Do whatever is needed for isTrue() to return the correct value
7 */
8 void initialize();
9
10 /**
11 * Indicates it is safe to run something once.
12 */
13 boolean isTrue();
14
15 /**
16 * Update state in a way that persists across JVM restarts (eg database table, properties file, etc)
17 */
18 void changeState(RunOnceState state);
19
20 }