oracle.toplink.essentials.internal.sequencing |
|
Java Source File Name | Type | Comment |
ClientSessionSequencing.java | Class | ClientSessionSequencing is private to TopLink. |
DatabaseSessionConnectionHandler.java | Class | |
PreallocationHandler.java | Class | |
Sequencing.java | Interface |
Purpose: Define interface to use sequencing. |
SequencingCallback.java | Interface |
Purpose: Define interface for sequencing callback. |
SequencingConnectionHandler.java | Interface | |
SequencingFactory.java | Class | SequencingFactory is private to TopLink. |
SequencingHome.java | Interface |
Purpose: Define interface for getting all sequencing interfaces. |
SequencingLogInOut.java | Interface | |
SequencingManager.java | Class | SequencingManager is private to TopLink.
It provides most of sequencing functionality.
It's accessed by DatabaseSession through getSequencingHome() method.
Here's the lifecycle of SequencingManager.
InitialState: SequencingManager doesn't exist.
Action: SequencingManager created -> Not connected State.
State: Not connected.
isConnected() returns false;
getSequencingControl() could be used;
getSequencing() == getSequencingServer() == getSequencingCallback() == null;
Action: onConnect is called -> Connected State.
State: Connected.
isConnected() returns true;
getSequencingControl() could be used;
getSequencing() could be used;
in case ownwerSession is a ServerSession getSequencingServer() could be used;
Action: onDisconnect is called -> Not connected State.
Here's a sketch of SequencingManager architecture.
The main 4 objects comprising SessionManager are:
valueGenarationPolicy;
preallocationHandler;
connectionHandler;
state;
That's how they evolve during lifetime of SequencingManager object:
Not connected State:
preallocationHandler doesn't have any preallocated sequencing values.
connectionHandler == null;
state == null;
Connected State:
preallocationHandler may contain preallocated sequencing values.
valueGenarationPolicy != null;
state != null;
The most important method of the class is onConnect():
that's where, using values of the attributes'(accessible through SequencingControl):
shouldUseSeparateConnection;
login;
minPoolSize;
maxPoolSize;
as well as boolean flags returned by valueGenerationPolicy methods:
shouldAcquireValueAfterInsert();
shouldUsePreallocation();
shouldUseSeparateConnection();
shouldUseTransaction();
one of implementors of inner interface State is created.
Once in Connected State, neither changes to attributes, nor to returns of valueGenerationPolicy's
four should... |
SequencingServer.java | Interface |
Purpose: Define interface for sequencing server. |
ServerSessionConnectionHandler.java | Class | |