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 Agentagent_private static java.lang.StringcursorNamePrefixWithHold__private static java.lang.StringcursorNamePrefixWithNoHold__private java.util.Stack<Section>freeSectionsHold_private java.util.Stack<Section>freeSectionsNonHold_(package private) byte[]holdPKGNAMCBytesprivate intmaxNumSections_private intnextAvailableSectionNumber_(package private) byte[]noHoldPKGNAMCBytesprivate static java.lang.StringpackageNameWithHold__private static java.lang.StringpackageNameWithNoHold__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) voidfreeSection(Section section, int resultSetHoldability)(package private) SectiongetDynamicSection(int resultSetHoldability)(package private) ClientResultSetgetPositionedUpdateResultSet(java.lang.String cursorName)(package private) SectiongetPositionedUpdateSection(java.lang.String cursorName, boolean useExecuteImmediateSection)(package private) SectiongetPositionedUpdateSection(Section querySection)private SectiongetSection(java.util.Stack freeSections, java.lang.String packageName, java.lang.String cursorNamePrefix, int resultSetHoldability)(package private) voidmapCursorNameToQuerySection(java.lang.String cursorName, Section section)(package private) voidmapCursorNameToResultSet(java.lang.String cursorName, ClientResultSet resultSet)(package private) voidremoveCursorNameToQuerySectionMapping(java.lang.String clientCursorName, java.lang.String serverCursorName)(package private) voidremoveCursorNameToResultSetMapping(java.lang.String clientCursorName, java.lang.String serverCursorName)(package private) voidsetPKGNAMCBytes(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)
-
-