public abstract class JdbcProbe extends Probe<String,Number> implements UrlProbe, IndexedProbe
| Modifier and Type | Field and Description |
|---|---|
protected JdbcStarter |
starter |
| Modifier and Type | Method and Description |
|---|---|
void |
configure() |
void |
configure(int port,
String user,
String passwd) |
void |
configure(int port,
String user,
String passwd,
String dbName) |
String |
getDbName() |
String |
getIndexName() |
String |
getName() |
Map<String,Number> |
getNewSampleValues()
The method that return a map of data collected.
It should return return as raw as possible, they can even be opaque data tied to the probe. |
String |
getPassword() |
Integer |
getPort() |
abstract List<String> |
getQueries() |
String |
getSourceType() |
long |
getUptime()
This function should return the uptime of the probe
If it's not overriden or fixed with setUptime, it will return Long.MAX_VALUE
that's make it useless, as it used to make the probe pause
after a restart of the probe.
|
URL |
getUrl() |
String |
getUrlAsString() |
String |
getUser() |
boolean |
isCollectRunning() |
abstract Map<String,Number> |
parseRs(ResultSet rs) |
protected List<Map<String,Object>> |
parseRsHorizontaly(ResultSet rs,
boolean numFilter) |
protected List<Map<String,Object>> |
parseRsVerticaly(ResultSet rs,
boolean numFilter) |
Map<String,Number> |
select2Map(String query)
Parse all the collumns of a query and return a List of Map
where the column name is the key
|
Map<String,Object> |
select2Map(String query,
String keyCol,
String valCol) |
void |
setDbName(String dbName) |
void |
setPassword(String password) |
void |
setPort(Integer port) |
void |
setUser(String user) |
addGraph, addGraph, checkStore, checkStoreFile, collect, compareTo, create, dsExist, dumpAsXml, dumpAsXml, fetchData, fetchData, fetchData, filterValues, getCollectMapping, getDsDefs, getGraphList, getHost, getLabel, getLastUpdate, getLastValues, getNamedLogger, getPd, getQualifiedName, getRrdDef, getRrdName, getTags, hashCode, log, log, modifySample, readProperties, readSpecific, setHost, setLabel, setName, setPd, setUptime, toStringconfigureStarters, find, find, find, find, find, getHostList, getLevel, getParent, getStarters, getStep, getTimeout, isStarted, registerStarter, registerStarter, setParent, setParent, setStep, setTimeout, startCollect, stopCollectprotected final JdbcStarter starter
public JdbcProbe()
public JdbcProbe(ProbeDesc pd)
public void configure()
public Map<String,Number> getNewSampleValues()
ProbeProbeDesc. A key not associated with an existent datastore will generate a warning
but will not prevent the other values to be stored.java.lang.Number
getNewSampleValues in class Probe<String,Number>protected List<Map<String,Object>> parseRsVerticaly(ResultSet rs, boolean numFilter) throws SQLException
SQLExceptionprotected List<Map<String,Object>> parseRsHorizontaly(ResultSet rs, boolean numFilter) throws SQLException
SQLExceptionpublic abstract Map<String,Number> parseRs(ResultSet rs) throws SQLException
SQLExceptionpublic Map<String,Number> select2Map(String query)
query - numFilter - force all value to be a Numberpublic Integer getPort()
public void setPort(Integer port)
port - The port to set.public String getUser()
public void setUser(String user)
user - The user to set.public String getPassword()
public void setPassword(String password)
password - The user to set.public String getDbName()
public void setDbName(String dbName)
dbName - public String getUrlAsString()
getUrlAsString in interface UrlProbepublic boolean isCollectRunning()
isCollectRunning in class StarterNodepublic String getSourceType()
getSourceType in class Probe<String,Number>public long getUptime()
Probepublic String getIndexName()
getIndexName in interface IndexedProbe