@Override public ListenableFuture<JsonNode> monitor(DatabaseSchema dbSchema, String monitorId) { String id = java.util.UUID.randomUUID().toString(); String monitorString = JsonRpcWriterUtil.monitorStr(id, monitorId, dbSchema); SettableFuture<JsonNode> sf = SettableFuture.create(); requestResult.put(id, sf); requestMethod.put(id, "monitor"); channel.writeAndFlush(monitorString); return sf; }
@Override public ListenableFuture<List<String>> listDbs() { String id = java.util.UUID.randomUUID().toString(); String listDbsString = JsonRpcWriterUtil.listDbsStr(id); SettableFuture<List<String>> sf = SettableFuture.create(); requestResult.put(id, sf); requestMethod.put(id, "listDbs"); channel.writeAndFlush(listDbsString); return sf; }
@Override public ListenableFuture<JsonNode> getSchema(List<String> dbnames) { String id = java.util.UUID.randomUUID().toString(); String getSchemaString = JsonRpcWriterUtil.getSchemaStr(id, dbnames); SettableFuture<JsonNode> sf = SettableFuture.create(); requestResult.put(id, sf); requestMethod.put(id, "getSchema"); channel.writeAndFlush(getSchemaString); return sf; }
@Override public ListenableFuture<List<JsonNode>> transact( DatabaseSchema dbSchema, List<Operation> operations) { String id = java.util.UUID.randomUUID().toString(); String transactString = JsonRpcWriterUtil.transactStr(id, dbSchema, operations); SettableFuture<List<JsonNode>> sf = SettableFuture.create(); requestResult.put(id, sf); requestMethod.put(id, "transact"); channel.writeAndFlush(transactString); return sf; }