|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.datasource.ids.AbstractIdGenerator
org.apache.avalon.excalibur.datasource.ids.AbstractDataSourceIdGenerator
org.apache.avalon.excalibur.datasource.ids.AbstractDataSourceBlockIdGenerator
The AbstractDataSourceBlockIdGenerator allocates blocks of ids from a DataSource and then provides them as needed. This is useful in reducing communication with the DataSource.
| Field Summary |
| Fields inherited from class org.apache.avalon.excalibur.datasource.ids.AbstractDataSourceIdGenerator |
m_dataSource, m_nextId |
| Fields inherited from interface org.apache.avalon.excalibur.datasource.ids.IdGenerator |
ROLE |
| Constructor Summary | |
AbstractDataSourceBlockIdGenerator()
|
|
| Method Summary | |
protected abstract java.math.BigDecimal |
allocateBigDecimalIdBlock(int blockSize)
Allocates a block, of the given size, of ids from the database. |
protected abstract long |
allocateLongIdBlock(int blockSize)
Allocates a block, of the given size, of ids from the database. |
void |
configure(Configuration configuration)
Called by the Container to configure the component. |
protected java.math.BigDecimal |
getNextBigDecimalIdInner()
Gets the next id as a Big Decimal. |
protected long |
getNextLongIdInner()
Gets the next id as a long. |
void |
initialize()
Called by the Container to initialize the component. |
| Methods inherited from class org.apache.avalon.excalibur.datasource.ids.AbstractDataSourceIdGenerator |
dispose, getConnection, service |
| Methods inherited from class org.apache.avalon.excalibur.datasource.ids.AbstractIdGenerator |
getNextBigDecimalId, getNextByteId, getNextIntegerId, getNextLongId, getNextLongIdChecked, getNextShortId, isUsingBigDecimals, setUseBigDecimals |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractDataSourceBlockIdGenerator()
| Method Detail |
protected abstract java.math.BigDecimal allocateBigDecimalIdBlock(int blockSize)
throws IdException
blockSize - number of Ids which are to be allocated.
IdException - if there it was not possible to allocate a block of ids.
protected abstract long allocateLongIdBlock(int blockSize)
throws IdException
blockSize - number of Ids which are to be allocated.
IdException - if there it was not possible to allocate a block of ids.
protected java.math.BigDecimal getNextBigDecimalIdInner()
throws IdException
getNextBigDecimalIdInner in class AbstractIdGeneratorIdException - if an Id could not be allocated for any reason.
protected long getNextLongIdInner()
throws IdException
getNextLongIdInner in class AbstractIdGeneratorIdException - if an Id could not be allocated for any reason.
public void configure(Configuration configuration)
throws ConfigurationException
configure in interface Configurableconfigure in class AbstractDataSourceIdGeneratorconfiguration - configuration info used to setup the component.
ConfigurationException - if there are any problems with the configuration.
public void initialize()
throws java.lang.Exception
initialize in interface Initializableinitialize in class AbstractDataSourceIdGeneratorjava.lang.Exception - if there were any problems durring initialization.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||