|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.utils.PooledCounterStore
public class PooledCounterStore
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
|---|---|
PooledCounterStore()
|
|
| Method Summary | |
|---|---|
void |
createCounter(String counterName)
Create a new coutner |
int |
getIncrement()
|
int |
getIncrementIntegerId(String counterName)
Obtain current coutner value and increment it. |
int |
getInitialValue()
|
int |
getMaxWait()
|
int |
getMinWait()
|
int |
getRetryCount()
|
void |
reset()
|
void |
setCounter(String counterName,
int value)
Reset a value of a counter. |
void |
setDataSource(DataSource dataSource)
The DataSource to use for counter generation |
void |
setIncrement(int increment)
In-memory counter value pool size. |
void |
setInitialValue(int initialValue)
Initial value to set for a counter when creating it |
void |
setMaxWait(int maxWait)
Maximum number of milliseconds to wait between retries |
void |
setMinWait(int minWait)
Minimum number of milliseconds to wait between retries |
void |
setRetryCount(int retryCount)
Number of attempts to make when a database update fails to to concurrent update from another machine |
void |
setTransactionManager(PlatformTransactionManager transactionManager)
The transaction manager to use for updates to the counter table |
protected void |
waitToRetry()
Blocks for the number of milliseconds computed via the minWait and maxWait properties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public PooledCounterStore()
| Method Detail |
|---|
public void setDataSource(DataSource dataSource)
public void setTransactionManager(PlatformTransactionManager transactionManager)
public int getInitialValue()
public void setInitialValue(int initialValue)
public int getIncrement()
public void setIncrement(int increment)
public int getRetryCount()
public void setRetryCount(int retryCount)
public int getMinWait()
public void setMinWait(int minWait)
public int getMaxWait()
public void setMaxWait(int maxWait)
public void createCounter(String counterName)
ICounterStore
createCounter in interface ICounterStorecounterName - a name for the new counterpublic int getIncrementIntegerId(String counterName)
ICounterStore
getIncrementIntegerId in interface ICounterStorecounterName - a String value
int value
public void setCounter(String counterName,
int value)
ICounterStore
setCounter in interface ICounterStorecounterName - a counter namevalue - a new counter valuepublic void reset()
protected void waitToRetry()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||