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) SqlException
accumulatedReadExceptions_
private boolean[]
batchedExceptionGenerated_
private int
batchedExceptionLabelIndex_
(package private) ClientConnection
connection_
(package private) CrossConverters
crossConverters_
private SqlException
deferredException_
private boolean
enableBatchedExceptionTracking_
LogWriter
logWriter_
(package private) SectionManager
sectionManager_
-
Constructor Summary
Constructors Modifier Constructor Description protected
Agent(ClientConnection connection, LogWriter logWriter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
accumulateChainBreakingReadExceptionAndThrow(DisconnectException e)
(package private) void
accumulateDeferredException(SqlException e)
private void
accumulateDisconnectException(DisconnectException e)
void
accumulateReadException(SqlException e)
private void
beginBatchedReadChain(ClientStatement statement, int batchSize)
(package private) void
beginBatchedWriteChain(ClientStatement statement)
protected void
beginReadChain(ClientStatement statement)
protected void
beginReadChainOutsideUOW()
void
beginWriteChain(ClientStatement statement)
abstract void
beginWriteChainOutsideUOW()
abstract void
checkForChainBreakingException_()
(package private) void
checkForDeferredExceptions()
protected void
checkForExceptions()
(package private) void
checkForSupportedDataType(int dataType)
Checks whether a data type is supported forsetObject(int, Object, int)
andsetObject(int, Object, int, int)
.void
close()
abstract void
close_()
(package private) void
disableBatchedExceptionTracking()
(package private) void
disconnectEvent()
private void
enableBatchedExceptionTracking(int batchSize)
(package private) void
endBatchedReadChain(long[] updateCounts, SqlException accumulatedExceptions)
private void
endBatchedWriteChain()
void
endReadChain()
protected abstract void
endWriteChain()
void
flow(ClientStatement statement)
(package private) void
flowBatch(ClientStatement statement, int batchSize)
void
flowOutsideUOW()
abstract void
flush_()
java.io.PrintWriter
getLogWriter()
private SqlException
labelAsBatchedException(SqlException e, int index)
boolean
loggingEnabled()
protected abstract void
markChainBreakingException_()
(package private) void
resetAgent(ClientConnection connection, LogWriter logWriter, int loginTimeout, java.lang.String server, int port)
private void
resetAgent(LogWriter logWriter)
protected abstract void
resetAgent_(LogWriter logWriter, int loginTimeout, java.lang.String server, int port)
void
setBatchedExceptionLabelIndex(int index)
void
setLogWriter(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 SqlException
Checks 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
-
-