|
Oracle Application Server TopLink API Reference 10g Release 2 (10.1.2) B15903-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Purpose: Define an interface to control sequencing functionality.
Description: This interface is accessed through DatabaseSession.getSequencingControl(). It allows to create, re-create, customize Sequencing object which is available through DatabaseSession.getSequencing() and provides sequencing values for all descriptors that use sequencing. Here's the lifecycle of Sequencing object used by DatabaseSession: 1. DatabaseSession created - sequencing object doesn't yet exist; 2. DatabaseSession.login() causes creation of Sequencing object; 3. DatabaseSession.logout() causes destruction of Sequencing object. In case sequencing object doesn't yet exist all the set parameters' values will be used during its creation. In case sequencing object already exists: 1. The following methods don't alter sequencing object - the corresponding parameters will only be used in case a new sequencing object is created: setShouldUseSeparateConnection; setLogin; setMinPoolSize; setMaxPoolSize. 2. The following methods cause immediate destruction of the sequencing object and creation of a new one: setValueGenerationPolicy; setShouldUseNativeSequencing; setShouldUseTableSequencing; resetSequencing; 3. The following methods cause change immediately: setPreallocationSize (next sequencing preallocation will use the set parameter's value).
Responsibilities:
SequencingValueGenerationPolicy
, DatabaseSession
Method Summary | |
DatabaseLogin |
getLogin() ADVANCED: Return a DatabaseLogin to be used by separate sequencing connection(s). |
int |
getMaxPoolSize() PUBLIC: Returns a maximum number of connections in sequencing connection pool |
int |
getMinPoolSize() PUBLIC: Returns a minimum number of connections in sequencing connection pool. |
int |
getPreallocationSize() PUBLIC: Returns a number of new sequencing objects to be obtained at a time. |
SequencingValueGenerationPolicy |
getValueGenerationPolicy() ADVANCED: Retun currently used sequencing value generation policy. |
void |
initializePreallocated() ADVANCED: Removes all preallocated sequencing objects. |
boolean |
isConnectedUsingSeparateConnection() PUBLIC: Indicates whether sequencing actually uses separate connection(s). |
void |
resetSequencing() ADVANCED: Immediately re-create sequencing object. |
void |
setLogin(DatabaseLogin login) ADVANCED: Returns a DatabaseLogin to be used by separate sequencing connection(s) The set value is ignored if shouldUseSeparateConnection() returns false. |
void |
setMaxPoolSize(int size) PUBLIC: Sets a maximum number of connections in sequencing connection pool The set value is ignored if shouldUseSeparateConnection() returns false. |
void |
setMinPoolSize(int size) PUBLIC: Sets a minimum number of connections in sequencing connection pool The set value is ignored if shouldUseSeparateConnection() returns false. |
void |
setPreallocationSize(int size) PUBLIC: Sets a number of new sequencing objects to be obtained at a time. |
void |
setShouldUseSeparateConnection(boolean shouldUseSeparateConnection) PUBLIC: Set whether separate connection(s) for sequencing could be used (by default it couldn't). |
void |
setValueGenerationPolicy(SequencingValueGenerationPolicy policy) ADVANCED: Set sequencing value generation policy. |
void |
shouldUseNativeSequencing() PUBLIC: In case native sequencing is not already used, immediately switches to native sequencing. |
boolean |
shouldUseSeparateConnection() PUBLIC: Indicate whether separate connection(s) for sequencing could be used (by default it couldn't). |
void |
shouldUseTableSequencing() PUBLIC: In case table sequencing is not already used, immediately switches to table sequencing. |
boolean |
usesCustomSequencing() ADVANCED: Indicate whether custom sequencing is used: neither native nor table. |
boolean |
usesNativeSequencing() PUBLIC: Indicate whether native sequencing is used. |
boolean |
usesTableSequencing() PUBLIC: Indicate whether table sequencing is used |
Method Detail |
public SequencingValueGenerationPolicy getValueGenerationPolicy()
SequencingValueGenerationPolicy
public void setValueGenerationPolicy(SequencingValueGenerationPolicy policy)
SequencingValueGenerationPolicy
public void resetSequencing()
public void shouldUseNativeSequencing()
public boolean usesNativeSequencing()
public void shouldUseTableSequencing()
public boolean usesTableSequencing()
public boolean usesCustomSequencing()
public boolean shouldUseSeparateConnection()
SequencingValueGenerationPolicy
public void setShouldUseSeparateConnection(boolean shouldUseSeparateConnection)
SequencingValueGenerationPolicy
public boolean isConnectedUsingSeparateConnection()
SequencingValueGenerationPolicy
public DatabaseLogin getLogin()
DatabaseLogin
public void setLogin(DatabaseLogin login)
DatabaseLogin
public int getMinPoolSize()
ConnectionPool
, ServerSession
public void setMinPoolSize(int size)
ConnectionPool
, ServerSession
public int getMaxPoolSize()
ConnectionPool
, ServerSession
public void setMaxPoolSize(int size)
ConnectionPool
, ServerSession
public int getPreallocationSize()
SequencingValueGenerationPolicy
public void setPreallocationSize(int size)
SequencingValueGenerationPolicy
public void initializePreallocated()
SequencingValueGenerationPolicy
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |