(TSDB tsdb)
| 27 | public 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() { |
nothing calls this directly
no test coverage detected