01: // Prevayler(TM) - The Open-Source Prevalence Layer.
02: // Copyright (C) 2001 Klaus Wuestefeld.
03: // This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
04:
05: package org.prevayler;
06:
07: import java.io.Serializable;
08:
09: /**
10: * A system that implements this interface can be made transparently persistent with Prevayler. All business objects in this system must be deterministic. i.e.: Any two PrevalentSystems of the same class must produce the same results given the same commands.
11: * @see org.prevayler.Prevayler
12: */
13: public interface PrevalentSystem extends Serializable {
14:
15: /**
16: * Sets the clock to be used by this system for ALL its date/time related functions. This method is called only once by Prevayler during the first system initialization.
17: */
18: public void clock(AlarmClock clock);
19:
20: /**
21: * Returns the clock used by this system for ALL its date/time related functions.
22: */
23: public AlarmClock clock();
24:
25: }
|