net.opentsdb.tsd
public abstract class RpcPlugin extends Object
initialize(net.opentsdb.core.TSDB)
method and if there is a problem, such as failure to bind to a socket or
missing config options, throw an exception so the user can fix the issue.
Initially this plugin should be used to accept incoming data points. Simply
parse the data and call TSDB.addPoint(java.lang.String, long, long, java.util.Map
.
Note: Implementations must have a parameterless constructor. The
initialize(TSDB)
method will be called immediately after the plugin is
instantiated and before any other methods are called.
Constructor and Description |
---|
RpcPlugin() |
Modifier and Type | Method and Description |
---|---|
abstract void |
collectStats(StatsCollector collector)
Called by the TSD when a request for statistics collection has come in.
|
abstract void |
initialize(TSDB tsdb)
Called by TSDB to initialize the plugin
Implementations are responsible for setting up any IO they need as well
as starting any required background threads.
|
abstract com.stumbleupon.async.Deferred<Object> |
shutdown()
Called to gracefully shutdown the plugin.
|
abstract String |
version()
Should return the version of this plugin in the format:
MAJOR.MINOR.MAINT, e.g.
|
public abstract void initialize(TSDB tsdb)
tsdb
- The parent TSDB objectIllegalArgumentException
- if required configuration parameters are
missingException
- if something else goes wrongpublic abstract com.stumbleupon.async.Deferred<Object> shutdown()
Object
has not special meaning and can be null
(think of it as Deferred<Void>
).public abstract String version()
public abstract void collectStats(StatsCollector collector)
collector
- The collector used for emitting statistics