com.pivotal.gemfirexd.internal.client.am

## Class Agent

- java.lang.Object
- - com.pivotal.gemfirexd.internal.client.am.Agent

Direct Known Subclasses:
  NetAgent

    public abstract class Agent
    extends Object

### Field Summary

Fields
`SqlException` `accumulatedReadExceptions_`
`boolean` `disableDisconnectEvent_`
`boolean` `forSqlException_`
`LogWriter` `logWriter_`
`SectionManager` `sectionManager_`

### Constructor Summary

Constructors
`protected` `Agent(Connection connection, LogWriter logWriter)`

### Method Summary

Methods
`void` `accumulateChainBreakingReadExceptionAndThrow(DisconnectException e)`
`void` `accumulateDeferredException(SqlException e)`
`void` `accumulateDisconnectException(DisconnectException e)`
`void` `accumulateReadException(SqlException e)`
`protected void` `beginBatchedReadChain(Statement statement, int batchSize)`
`void` `beginBatchedWriteChain(Statement statement)`
`protected void` `beginReadChain(Statement statement)`
`protected void` `beginReadChainOutsideUOW()`
`void` `beginWriteChain(Statement statement)`
`void` `beginWriteChainOutsideUOW()`
`abstract void` `checkForChainBreakingException_()`
`protected void` `checkForExceptions()`
`abstract void` `close_()`
`void` `close()`
`void` `disconnectEvent()`
`void` `endBatchedReadChain(int[] updateCounts, SqlException accumulatedExceptions)`
`protected void` `endBatchedWriteChain()`
`void` `endReadChain()`
`protected void` `endWriteChain()`
`void` `flow(Statement statement)`
`void` `flowBatch(Statement statement, int batchSize)`
`void` `flowOutsideUOW()`
`abstract void` `flush_()`
`PrintWriter` `getLogWriter()`
`abstract int` `getPort()`
`abstract String` `getServer()`
`abstract String` `getServerLocation()`
`boolean` `loggingEnabled()`
`protected abstract void` `markChainBreakingException_()`
`abstract LogWriter` `newLogWriter_(PrintWriter printWriter, int traceLevel)`
`protected abstract void` `resetAgent_(LogWriter logWriter, int loginTimeout, String server, int port)`
`void` `resetAgent(Connection connection, LogWriter logWriter, int loginTimeout, String server, int port)`
`protected void` `resetAgent(LogWriter logWriter)`
`void` `setBatchedExceptionLabelIndex(int index)`
`void` `setLogWriter(LogWriter logWriter)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### accumulatedReadExceptions_

    public SqlException accumulatedReadExceptions_

#### sectionManager_

    public SectionManager sectionManager_

#### logWriter_

    public LogWriter logWriter_

#### disableDisconnectEvent_

    public boolean disableDisconnectEvent_

#### forSqlException_

    public boolean forSqlException_

### Constructor Detail

#### Agent

    protected Agent(Connection connection,
         LogWriter logWriter)

### Method Detail

#### accumulateDeferredException

    public void accumulateDeferredException(SqlException e)

#### resetAgent

    protected void resetAgent(LogWriter logWriter)

#### resetAgent

    public void resetAgent(Connection connection,
                  LogWriter logWriter,
                  int loginTimeout,
                  String server,
                  int port)
                    throws SqlException

Throws:
  `SqlException`

#### resetAgent_

    protected abstract void resetAgent_(LogWriter logWriter,
                   int loginTimeout,
                   String server,
                   int port)
                                 throws SqlException

Throws:
  `SqlException`

#### loggingEnabled

    public final boolean loggingEnabled()

#### setLogWriter

    public final void setLogWriter(LogWriter logWriter)

#### getLogWriter

    public final PrintWriter getLogWriter()

#### newLogWriter_

    public abstract LogWriter newLogWriter_(PrintWriter printWriter,
                          int traceLevel)

#### accumulateReadException

    public final void accumulateReadException(SqlException e)

#### accumulateDisconnectException

    public final 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`

#### setBatchedExceptionLabelIndex

    public final void setBatchedExceptionLabelIndex(int index)

#### checkForExceptions

    protected final void checkForExceptions()
                                     throws SqlException

Throws:
  `SqlException`

#### flow

    public final void flow(Statement statement)
                    throws SqlException

Throws:
  `SqlException`

#### flowBatch

    public final void flowBatch(Statement 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`

#### getPort

    public abstract int getPort()

#### getServer

    public abstract String getServer()

#### getServerLocation

    public abstract String getServerLocation()

#### disconnectEvent

    public final void disconnectEvent()

#### beginWriteChainOutsideUOW

    public void beginWriteChainOutsideUOW()
                                   throws SqlException

Throws:
  `SqlException`

#### beginWriteChain

    public void beginWriteChain(Statement statement)
                         throws SqlException

Throws:
  `SqlException`

#### beginBatchedWriteChain

    public final void beginBatchedWriteChain(Statement statement)
                                      throws SqlException

Throws:
  `SqlException`

#### endWriteChain

    protected void endWriteChain()

#### endBatchedWriteChain

    protected final void endBatchedWriteChain()

#### beginReadChain

    protected void beginReadChain(Statement statement)
                           throws SqlException

Throws:
  `SqlException`

#### beginBatchedReadChain

    protected final void beginBatchedReadChain(Statement statement,
                             int batchSize)
                                        throws SqlException

Throws:
  `SqlException`

#### beginReadChainOutsideUOW

    protected void beginReadChainOutsideUOW()
                                     throws SqlException

Throws:
  `SqlException`

#### endReadChain

    public void endReadChain()
                      throws SqlException

Throws:
  `SqlException`

#### endBatchedReadChain

    public final void endBatchedReadChain(int[] updateCounts,
                           SqlException accumulatedExceptions)
                                   throws BatchUpdateException

Throws:
  `BatchUpdateException`