01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.utils;
07:
08: /**
09: * A store interface that keeps track of multiple unique ID counters.
10: *
11: * @author Peter Kharchenko {@link <a href="mailto:pkharchenko@interactivebusiness.com"">pkharchenko@interactivebusiness.com"</a>}
12: * @version $Revision: 36690 $
13: */
14: public interface ICounterStore {
15:
16: /**
17: * Create a new coutner
18: *
19: * @param counterName a name for the new counter
20: * @exception Exception if an error occurs
21: */
22: public void createCounter(String counterName) throws Exception;
23:
24: /**
25: * Reset a value of a counter.
26: *
27: * @param counterName a counter name
28: * @param value a new counter value
29: * @exception Exception if an error occurs
30: */
31: public void setCounter(String counterName, int value)
32: throws Exception;
33:
34: /**
35: * Obtain current coutner value and increment it.
36: *
37: * @param counterName a <code>String</code> value
38: * @return an <code>int</code> value
39: * @exception Exception if an error occurs
40: */
41: public int getIncrementIntegerId(String counterName)
42: throws Exception;
43:
44: }
|