Package org.apache.derby.client.am
Class Agent
- java.lang.Object
-
- org.apache.derby.client.am.Agent
-
- Direct Known Subclasses:
NetAgent
public abstract class Agent extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) SqlExceptionaccumulatedReadExceptions_private boolean[]batchedExceptionGenerated_private intbatchedExceptionLabelIndex_(package private) ClientConnectionconnection_(package private) CrossConverterscrossConverters_private SqlExceptiondeferredException_private booleanenableBatchedExceptionTracking_LogWriterlogWriter_(package private) SectionManagersectionManager_
-
Constructor Summary
Constructors Modifier Constructor Description protectedAgent(ClientConnection connection, LogWriter logWriter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccumulateChainBreakingReadExceptionAndThrow(DisconnectException e)(package private) voidaccumulateDeferredException(SqlException e)private voidaccumulateDisconnectException(DisconnectException e)voidaccumulateReadException(SqlException e)private voidbeginBatchedReadChain(ClientStatement statement, int batchSize)(package private) voidbeginBatchedWriteChain(ClientStatement statement)protected voidbeginReadChain(ClientStatement statement)protected voidbeginReadChainOutsideUOW()voidbeginWriteChain(ClientStatement statement)abstract voidbeginWriteChainOutsideUOW()abstract voidcheckForChainBreakingException_()(package private) voidcheckForDeferredExceptions()protected voidcheckForExceptions()(package private) voidcheckForSupportedDataType(int dataType)Checks whether a data type is supported forsetObject(int, Object, int)andsetObject(int, Object, int, int).voidclose()abstract voidclose_()(package private) voiddisableBatchedExceptionTracking()(package private) voiddisconnectEvent()private voidenableBatchedExceptionTracking(int batchSize)(package private) voidendBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions)private voidendBatchedWriteChain()voidendReadChain()protected abstract voidendWriteChain()voidflow(ClientStatement statement)(package private) voidflowBatch(ClientStatement statement, int batchSize)voidflowOutsideUOW()abstract voidflush_()java.io.PrintWritergetLogWriter()private SqlExceptionlabelAsBatchedException(SqlException e, int index)booleanloggingEnabled()protected abstract voidmarkChainBreakingException_()(package private) voidresetAgent(ClientConnection connection, LogWriter logWriter, int loginTimeout, java.lang.String server, int port)private voidresetAgent(LogWriter logWriter)protected abstract voidresetAgent_(LogWriter logWriter, int loginTimeout, java.lang.String server, int port)voidsetBatchedExceptionLabelIndex(int index)voidsetLogWriter(LogWriter logWriter)
-
-
-
Field Detail
-
accumulatedReadExceptions_
SqlException accumulatedReadExceptions_
-
enableBatchedExceptionTracking_
private boolean enableBatchedExceptionTracking_
-
batchedExceptionLabelIndex_
private int batchedExceptionLabelIndex_
-
batchedExceptionGenerated_
private boolean[] batchedExceptionGenerated_
-
connection_
ClientConnection connection_
-
sectionManager_
SectionManager sectionManager_
-
logWriter_
public LogWriter logWriter_
-
crossConverters_
final CrossConverters crossConverters_
-
deferredException_
private SqlException deferredException_
-
-
Constructor Detail
-
Agent
protected Agent(ClientConnection connection, LogWriter logWriter)
-
-
Method Detail
-
checkForDeferredExceptions
void checkForDeferredExceptions() throws SqlException- Throws:
SqlException
-
checkForSupportedDataType
void checkForSupportedDataType(int dataType) throws SqlExceptionChecks whether a data type is supported forsetObject(int, Object, int)andsetObject(int, Object, int, int).- Parameters:
dataType- the data type to check- Throws:
SqlException- if the type is not supported
-
accumulateDeferredException
void accumulateDeferredException(SqlException e)
-
resetAgent
private void resetAgent(LogWriter logWriter)
-
resetAgent
void resetAgent(ClientConnection connection, LogWriter logWriter, int loginTimeout, java.lang.String server, int port) throws SqlException
- Throws:
SqlException
-
resetAgent_
protected abstract void resetAgent_(LogWriter logWriter, int loginTimeout, java.lang.String server, int port) throws SqlException
- Throws:
SqlException
-
loggingEnabled
public final boolean loggingEnabled()
-
setLogWriter
public final void setLogWriter(LogWriter logWriter)
-
getLogWriter
public final java.io.PrintWriter getLogWriter()
-
accumulateReadException
public final void accumulateReadException(SqlException e)
-
accumulateDisconnectException
private void accumulateDisconnectException(DisconnectException e)
-
accumulateChainBreakingReadExceptionAndThrow
public final void accumulateChainBreakingReadExceptionAndThrow(DisconnectException e) throws DisconnectException
- Throws:
DisconnectException
-
markChainBreakingException_
protected abstract void markChainBreakingException_()
-
checkForChainBreakingException_
public abstract void checkForChainBreakingException_() throws SqlException- Throws:
SqlException
-
enableBatchedExceptionTracking
private final void enableBatchedExceptionTracking(int batchSize)
-
disableBatchedExceptionTracking
final void disableBatchedExceptionTracking()
-
setBatchedExceptionLabelIndex
public final void setBatchedExceptionLabelIndex(int index)
-
labelAsBatchedException
private final SqlException labelAsBatchedException(SqlException e, int index)
-
checkForExceptions
protected final void checkForExceptions() throws SqlException- Throws:
SqlException
-
flow
public final void flow(ClientStatement statement) throws SqlException
- Throws:
SqlException
-
flowBatch
final void flowBatch(ClientStatement statement, int batchSize) throws SqlException
- Throws:
SqlException
-
flowOutsideUOW
public final void flowOutsideUOW() throws SqlException- Throws:
SqlException
-
flush_
public abstract void flush_() throws DisconnectException- Throws:
DisconnectException
-
close_
public abstract void close_() throws SqlException- Throws:
SqlException
-
close
public void close() throws SqlException- Throws:
SqlException
-
disconnectEvent
final void disconnectEvent()
-
beginWriteChainOutsideUOW
public abstract void beginWriteChainOutsideUOW() throws SqlException- Throws:
SqlException
-
beginWriteChain
public void beginWriteChain(ClientStatement statement) throws SqlException
- Throws:
SqlException
-
beginBatchedWriteChain
final void beginBatchedWriteChain(ClientStatement statement) throws SqlException
- Throws:
SqlException
-
endWriteChain
protected abstract void endWriteChain()
-
endBatchedWriteChain
private final void endBatchedWriteChain()
-
beginReadChain
protected void beginReadChain(ClientStatement statement) throws SqlException
- Throws:
SqlException
-
beginBatchedReadChain
private void beginBatchedReadChain(ClientStatement statement, int batchSize) throws SqlException
- Throws:
SqlException
-
beginReadChainOutsideUOW
protected void beginReadChainOutsideUOW() throws SqlException- Throws:
SqlException
-
endReadChain
public void endReadChain() throws SqlException- Throws:
SqlException
-
endBatchedReadChain
final void endBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions) throws java.sql.BatchUpdateException- Throws:
java.sql.BatchUpdateException
-
-