(TSDB tsdb)
| 23 | public final class DummySearchPlugin extends SearchPlugin { |
| 24 | |
| 25 | @Override |
| 26 | public void initialize(TSDB tsdb) { |
| 27 | if (tsdb == null) { |
| 28 | throw new IllegalArgumentException("The TSDB object was null"); |
| 29 | } |
| 30 | // some dummy configs to check to throw exceptions |
| 31 | if (!tsdb.getConfig().hasProperty("tsd.search.DummySearchPlugin.hosts")) { |
| 32 | throw new IllegalArgumentException("Missing hosts config"); |
| 33 | } |
| 34 | if (tsdb.getConfig().getString("tsd.search.DummySearchPlugin.hosts") |
| 35 | .isEmpty()) { |
| 36 | throw new IllegalArgumentException("Empty Hosts config"); |
| 37 | } |
| 38 | // throw an NFE for fun |
| 39 | tsdb.getConfig().getInt("tsd.search.DummySearchPlugin.port"); |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public Deferred<Object> shutdown() { |
nothing calls this directly
no test coverage detected