public abstract class UsageStatsPeriodical
extends org.graylog2.plugin.periodical.Periodical
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.EvictingQueue<UsageStatsRequest> |
cachedRequestsQueue |
protected org.graylog2.plugin.cluster.ClusterConfigService |
clusterConfigService |
protected UsageStatsConfiguration |
config |
protected String |
filenamePattern |
protected okhttp3.OkHttpClient |
httpClient |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
| Modifier | Constructor and Description |
|---|---|
protected |
UsageStatsPeriodical(UsageStatsConfiguration config,
org.graylog2.plugin.cluster.ClusterConfigService clusterConfigService,
com.google.common.collect.EvictingQueue<UsageStatsRequest> usageStatsRequestsQueue,
okhttp3.OkHttpClient httpClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
String filenamePattern) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract byte[] |
buildPayload() |
void |
doRun() |
int |
getInitialDelaySeconds() |
int |
getPeriodSeconds() |
protected abstract URL |
getUrl() |
boolean |
isDaemon() |
protected boolean |
isEnabled() |
boolean |
masterOnly() |
boolean |
runsForever() |
boolean |
stopOnGracefulShutdown() |
protected boolean |
uploadDataSet(UsageStatsRequest usageStatsRequest) |
protected void |
uploadQueuedDataSets() |
protected final UsageStatsConfiguration config
protected final org.graylog2.plugin.cluster.ClusterConfigService clusterConfigService
protected final com.google.common.collect.EvictingQueue<UsageStatsRequest> cachedRequestsQueue
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected final okhttp3.OkHttpClient httpClient
protected final String filenamePattern
protected UsageStatsPeriodical(UsageStatsConfiguration config, org.graylog2.plugin.cluster.ClusterConfigService clusterConfigService, com.google.common.collect.EvictingQueue<UsageStatsRequest> usageStatsRequestsQueue, okhttp3.OkHttpClient httpClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String filenamePattern)
protected abstract byte[] buildPayload()
protected abstract URL getUrl()
protected boolean isEnabled()
public void doRun()
doRun in class org.graylog2.plugin.periodical.Periodicalprotected void uploadQueuedDataSets()
protected boolean uploadDataSet(UsageStatsRequest usageStatsRequest)
public boolean runsForever()
runsForever in class org.graylog2.plugin.periodical.Periodicalpublic boolean stopOnGracefulShutdown()
stopOnGracefulShutdown in class org.graylog2.plugin.periodical.Periodicalpublic boolean masterOnly()
masterOnly in class org.graylog2.plugin.periodical.Periodicalpublic boolean isDaemon()
isDaemon in class org.graylog2.plugin.periodical.Periodicalpublic int getInitialDelaySeconds()
getInitialDelaySeconds in class org.graylog2.plugin.periodical.Periodicalpublic int getPeriodSeconds()
getPeriodSeconds in class org.graylog2.plugin.periodical.PeriodicalCopyright © 2015-2016 Graylog, Inc.. All Rights Reserved.