Generic interface to implement query functions. @param Query type. @param Response type.
| 15 | * @param <R> Response type. |
| 16 | */ |
| 17 | public interface IQueryFunction<Q, R> { |
| 18 | /** |
| 19 | * Runs query. |
| 20 | * |
| 21 | * @param query Query instance. |
| 22 | * @return Result. |
| 23 | */ |
| 24 | R runQuery(Q query); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Processes JSON Query and returns the answer fetched either through cache or by running query on remote KB server. |