jenkins.plugins.logstash.persistence
public class RedisDao extends Object
LogstashIndexerDao.IndexerType| Modifier and Type | Field and Description |
|---|---|
protected String |
host |
protected String |
key |
protected String |
password |
protected static redis.clients.jedis.JedisPool |
pool |
protected int |
port |
protected String |
username |
| Modifier and Type | Method and Description |
|---|---|
net.sf.json.JSONObject |
buildPayload(BuildData buildData,
String jenkinsUrl,
List<String> logLines)
Builds a JSON payload compatible with the Logstash schema.
|
String |
getHost() |
LogstashIndexerDao.IndexerType |
getIndexerType() |
int |
getPort() |
long |
push(String data,
PrintStream logger)
Sends the log data to the Logstash indexer.
|
protected static redis.clients.jedis.JedisPool pool
protected String host
protected int port
protected String key
protected String username
protected String password
public long push(String data, PrintStream logger)
LogstashIndexerDaodata - The serialized data, not nulllogger - A logger to append messages to, not nullpublic LogstashIndexerDao.IndexerType getIndexerType()
public net.sf.json.JSONObject buildPayload(BuildData buildData, String jenkinsUrl, List<String> logLines)
LogstashIndexerDaobuildPayload in interface LogstashIndexerDaobuildData - Metadata about the current build, not nulljenkinsUrl - The host name of the Jenkins instance, not nulllogLines - The log data to transmit, not nullpublic String getHost()
getHost in interface LogstashIndexerDaopublic int getPort()
getPort in interface LogstashIndexerDaoCopyright © 2004-2015. All Rights Reserved.