uPortal 2.4.1
API Documentation

org.jasig.portal.utils
Class RDBMCounterStore

java.lang.Object
  extended byorg.jasig.portal.utils.RDBMCounterStore
All Implemented Interfaces:
ICounterStore

public class RDBMCounterStore
extends java.lang.Object
implements ICounterStore

A reference implementation for the counter store

Version:
$Revision: 1.11.2.1 $
Author:
George Lindholm, george.lindholm@ubc.ca, Peter Kharchenko, Eric Dalquist edalquist@unicon.net

Constructor Summary
RDBMCounterStore()
           
 
Method Summary
 void createCounter(java.lang.String counterName)
          Creates a new counter with an initial value of 0.
 int getIncrementIntegerId(java.lang.String counterName)
          Gets the next number in the sequence.
 void setCounter(java.lang.String counterName, int value)
          Sets the counter to the specified value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDBMCounterStore

public RDBMCounterStore()
Method Detail

createCounter

public void createCounter(java.lang.String counterName)
                   throws java.lang.Exception
Creates a new counter with an initial value of 0. Does not check to see if the counter already exists.

Specified by:
createCounter in interface ICounterStore
Parameters:
counterName - a name for the new counter
Throws:
java.lang.Exception - if an error occurs
See Also:
ICounterStore.createCounter(java.lang.String)

setCounter

public void setCounter(java.lang.String counterName,
                       int value)
                throws java.lang.Exception
Sets the counter to the specified value. Does not check to make sure the counter already exists.

Specified by:
setCounter in interface ICounterStore
Parameters:
counterName - a counter name
value - a new counter value
Throws:
java.lang.Exception - if an error occurs
See Also:
ICounterStore.setCounter(java.lang.String, int)

getIncrementIntegerId

public int getIncrementIntegerId(java.lang.String counterName)
                          throws java.lang.Exception
Gets the next number in the sequence. If the counter does not exist it is first created.

Specified by:
getIncrementIntegerId in interface ICounterStore
Parameters:
counterName - a String value
Returns:
an int value
Throws:
java.lang.Exception - if an error occurs
See Also:
ICounterStore.getIncrementIntegerId(java.lang.String)

uPortal 2.4.1
API Documentation