Package org.apache.derby.client.am
Class SectionManager
- java.lang.Object
-
- org.apache.derby.client.am.SectionManager
-
public class SectionManager extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Agent
agent_
private static java.lang.String
cursorNamePrefixWithHold__
private static java.lang.String
cursorNamePrefixWithNoHold__
private java.util.Stack<Section>
freeSectionsHold_
private java.util.Stack<Section>
freeSectionsNonHold_
(package private) byte[]
holdPKGNAMCBytes
private int
maxNumSections_
private int
nextAvailableSectionNumber_
(package private) byte[]
noHoldPKGNAMCBytes
private static java.lang.String
packageNameWithHold__
private static java.lang.String
packageNameWithNoHold__
private java.util.Hashtable<java.lang.String,Section>
positionedUpdateCursorNameToQuerySection_
private java.util.Hashtable<java.lang.String,java.lang.ref.WeakReference<ClientResultSet>>
positionedUpdateCursorNameToResultSet_
-
Constructor Summary
Constructors Constructor Description SectionManager(Agent agent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
freeSection(Section section, int resultSetHoldability)
(package private) Section
getDynamicSection(int resultSetHoldability)
(package private) ClientResultSet
getPositionedUpdateResultSet(java.lang.String cursorName)
(package private) Section
getPositionedUpdateSection(java.lang.String cursorName, boolean useExecuteImmediateSection)
(package private) Section
getPositionedUpdateSection(Section querySection)
private Section
getSection(java.util.Stack freeSections, java.lang.String packageName, java.lang.String cursorNamePrefix, int resultSetHoldability)
(package private) void
mapCursorNameToQuerySection(java.lang.String cursorName, Section section)
(package private) void
mapCursorNameToResultSet(java.lang.String cursorName, ClientResultSet resultSet)
(package private) void
removeCursorNameToQuerySectionMapping(java.lang.String clientCursorName, java.lang.String serverCursorName)
(package private) void
removeCursorNameToResultSetMapping(java.lang.String clientCursorName, java.lang.String serverCursorName)
(package private) void
setPKGNAMCBytes(byte[] b, int resultSetHoldability)
Store the Packagename and consistency token information This is called from Section.setPKGNAMCBytes
-
-
-
Field Detail
-
agent_
private Agent agent_
-
freeSectionsNonHold_
private final java.util.Stack<Section> freeSectionsNonHold_
-
freeSectionsHold_
private final java.util.Stack<Section> freeSectionsHold_
-
nextAvailableSectionNumber_
private int nextAvailableSectionNumber_
-
holdPKGNAMCBytes
byte[] holdPKGNAMCBytes
-
noHoldPKGNAMCBytes
byte[] noHoldPKGNAMCBytes
-
packageNameWithHold__
private static final java.lang.String packageNameWithHold__
- See Also:
- Constant Field Values
-
packageNameWithNoHold__
private static final java.lang.String packageNameWithNoHold__
- See Also:
- Constant Field Values
-
cursorNamePrefixWithHold__
private static final java.lang.String cursorNamePrefixWithHold__
- See Also:
- Constant Field Values
-
cursorNamePrefixWithNoHold__
private static final java.lang.String cursorNamePrefixWithNoHold__
- See Also:
- Constant Field Values
-
positionedUpdateCursorNameToQuerySection_
private final java.util.Hashtable<java.lang.String,Section> positionedUpdateCursorNameToQuerySection_
-
positionedUpdateCursorNameToResultSet_
private final java.util.Hashtable<java.lang.String,java.lang.ref.WeakReference<ClientResultSet>> positionedUpdateCursorNameToResultSet_
-
maxNumSections_
private final int maxNumSections_
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SectionManager
public SectionManager(Agent agent)
-
-
Method Detail
-
setPKGNAMCBytes
void setPKGNAMCBytes(byte[] b, int resultSetHoldability)
Store the Packagename and consistency token information This is called from Section.setPKGNAMCBytes- Parameters:
b
- bytearray that has the PKGNAMC information to be storedresultSetHoldability
- depending on the holdability store it in the correct byte array packagename and consistency token information for when holdability is set to HOLD_CURSORS_OVER_COMMIT is stored in holdPKGNAMCBytes and in noHoldPKGNAMCBytes when holdability is set to CLOSE_CURSORS_AT_COMMIT
-
getDynamicSection
Section getDynamicSection(int resultSetHoldability) throws SqlException
- Throws:
SqlException
-
getSection
private Section getSection(java.util.Stack freeSections, java.lang.String packageName, java.lang.String cursorNamePrefix, int resultSetHoldability) throws SqlException
- Throws:
SqlException
-
freeSection
void freeSection(Section section, int resultSetHoldability)
-
getPositionedUpdateSection
Section getPositionedUpdateSection(Section querySection) throws SqlException
- Throws:
SqlException
-
getPositionedUpdateSection
Section getPositionedUpdateSection(java.lang.String cursorName, boolean useExecuteImmediateSection) throws SqlException
- Throws:
SqlException
-
mapCursorNameToQuerySection
void mapCursorNameToQuerySection(java.lang.String cursorName, Section section)
-
mapCursorNameToResultSet
void mapCursorNameToResultSet(java.lang.String cursorName, ClientResultSet resultSet)
-
getPositionedUpdateResultSet
ClientResultSet getPositionedUpdateResultSet(java.lang.String cursorName) throws SqlException
- Throws:
SqlException
-
removeCursorNameToResultSetMapping
void removeCursorNameToResultSetMapping(java.lang.String clientCursorName, java.lang.String serverCursorName)
-
removeCursorNameToQuerySectionMapping
void removeCursorNameToQuerySectionMapping(java.lang.String clientCursorName, java.lang.String serverCursorName)
-
-