MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / initialize

Method initialize

test/tsd/DummyRpcPlugin.java:29–44  ·  view source on GitHub ↗
(TSDB tsdb)

Source from the content-addressed store, hash-verified

27public class DummyRpcPlugin extends RpcPlugin {
28
29 @Override
30 public void initialize(TSDB tsdb) {
31 if (tsdb == null) {
32 throw new IllegalArgumentException("The TSDB object was null");
33 }
34 // some dummy configs to check to throw exceptions
35 if (!tsdb.getConfig().hasProperty("tsd.rpcplugin.DummyRPCPlugin.hosts")) {
36 throw new IllegalArgumentException("Missing hosts config");
37 }
38 if (tsdb.getConfig().getString("tsd.rpcplugin.DummyRPCPlugin.hosts")
39 .isEmpty()) {
40 throw new IllegalArgumentException("Empty Hosts config");
41 }
42 // throw an NFE for fun
43 tsdb.getConfig().getInt("tsd.rpcplugin.DummyRPCPlugin.port");
44 }
45
46 @Override
47 public Deferred<Object> shutdown() {

Callers

nothing calls this directly

Calls 5

isEmptyMethod · 0.80
hasPropertyMethod · 0.45
getConfigMethod · 0.45
getStringMethod · 0.45
getIntMethod · 0.45

Tested by

no test coverage detected