org.exolab.jms.persistence
Class SeedGenerator
java.lang.Object
|
+--org.exolab.jms.persistence.SeedGenerator
- public class SeedGenerator
- extends java.lang.Object
This class generates seeds
- Version:
- $Revision: 1.6 $ $Date: 2004/01/11 02:35:45 $
- Author:
- Tim Anderson
Method Summary |
void |
close()
Issue a close, which in this case invalidates the singleton
TODO: do we really need this |
static SeedGenerator |
initialise()
Initialise the seed generator |
static SeedGenerator |
instance()
Returns the singleton instance. |
long |
next(java.sql.Connection connection,
java.lang.String name)
Return the next seed value for the given name |
void |
removeAll(java.sql.Connection connection)
Remove all seeds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SeedGenerator
protected SeedGenerator()
- Constructor
- Parameters:
connectionPool
- the connection poolmanager
- the transaction manager
instance
public static SeedGenerator instance()
- Returns the singleton instance.
Note that initialise() must have been invoked first for this
to return a valid instance.
- Returns:
- SeedGenerator the singleton instance
initialise
public static SeedGenerator initialise()
- Initialise the seed generator
- Returns:
- SeedGenerator the singleton instance
next
public long next(java.sql.Connection connection,
java.lang.String name)
throws PersistenceException
- Return the next seed value for the given name
- Parameters:
connection
- - the connection usedseed
- - the name of the seed- Returns:
- long - the next seed value
- Throws:
PersistenceException
- - if the seed cannot be retrieved
removeAll
public void removeAll(java.sql.Connection connection)
throws PersistenceException
- Remove all seeds.
- Parameters:
connection
- - the connection to use- Throws:
PersistenceException
- - is thrown if the request does not
complete
close
public void close()
- Issue a close, which in this case invalidates the singleton
TODO: do we really need this
Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.