public class SqlDataSourceRT extends PollingDataSource
| Modifier and Type | Field and Description |
|---|---|
private java.sql.Connection |
conn |
static int |
DATA_SOURCE_EXCEPTION_EVENT |
private org.apache.commons.logging.Log |
log |
static int |
STATEMENT_EXCEPTION_EVENT |
private int |
timeoutCount |
private int |
timeoutsToReconnect |
private SqlDataSourceVO |
vo |
dataPoints, pointListChangedaddedChangedPoints, ATTR_DISCONNECTED_KEY, ATTR_UNRELIABLE_KEY, pointListChangeLock, removedPoints| Constructor and Description |
|---|
SqlDataSourceRT(SqlDataSourceVO vo) |
| Modifier and Type | Method and Description |
|---|---|
private void |
doColumnPollImpl(long time,
java.sql.PreparedStatement stmt) |
protected void |
doPoll(long time) |
private void |
doRowPollImpl(long time,
java.sql.PreparedStatement stmt) |
private long |
getTimeOverride(java.sql.ResultSetMetaData meta,
int column,
java.sql.ResultSet rs,
long time) |
private MangoValue |
getValue(SqlPointLocatorVO locatorVO,
java.sql.ResultSet rs,
java.lang.String fieldName,
long time) |
void |
initialize() |
void |
setPointValue(DataPointRT dataPoint,
PointValueTime valueTime,
SetPointSource source) |
void |
terminate() |
beginPolling, joinTermination, scheduleTimeout, setPollingPeriod, updateChangedPointsaddDataPoint, forcePointRead, getExceptionMessage, getId, getName, getPersistentData, getSerialExceptionMessage, raiseEvent, relinquish, removeDataPoint, returnToNormal, setPersistentDatapublic static final int DATA_SOURCE_EXCEPTION_EVENT
public static final int STATEMENT_EXCEPTION_EVENT
private final org.apache.commons.logging.Log log
private final SqlDataSourceVO vo
private java.sql.Connection conn
private int timeoutCount
private int timeoutsToReconnect
public SqlDataSourceRT(SqlDataSourceVO vo)
public void setPointValue(DataPointRT dataPoint, PointValueTime valueTime, SetPointSource source)
setPointValue in class DataSourceRTprotected void doPoll(long time)
doPoll in class PollingDataSourceprivate void doColumnPollImpl(long time,
java.sql.PreparedStatement stmt)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void doRowPollImpl(long time,
java.sql.PreparedStatement stmt)
throws java.sql.SQLException
java.sql.SQLExceptionprivate MangoValue getValue(SqlPointLocatorVO locatorVO, java.sql.ResultSet rs, java.lang.String fieldName, long time) throws java.sql.SQLException, java.io.IOException
java.sql.SQLExceptionjava.io.IOExceptionprivate long getTimeOverride(java.sql.ResultSetMetaData meta,
int column,
java.sql.ResultSet rs,
long time)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void initialize()
initialize in interface com.serotonin.util.ILifecycleinitialize in class DataSourceRTpublic void terminate()
terminate in interface com.serotonin.util.ILifecycleterminate in class PollingDataSource