public interface DataCollectorService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERROR_QUEUE_LIMIT_REACHED |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Is needed for the proxy generation
|
void |
collect(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)
This method is doing the same as
collectAndReceive(String, JsonObject, Handler), but will not send back
the result. |
void |
collectAndReceive(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<CollectorJobResult>> resultHandler)
This method triggers a
CollectorJob and receives the CollectorJobResult in the passed result
handler. |
void |
getMetricsSnapshot(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> resultHandler)
Returns a JsonObject which contains a current snapshot of the metrics.
|
static final java.lang.String ERROR_QUEUE_LIMIT_REACHED
void collectAndReceive(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<CollectorJobResult>> resultHandler)
CollectorJob and receives the CollectorJobResult in the passed result
handler. If the queue of the DataCollectorServiceVerticle is already full, the response will be a failed
AsyncResult with the message which is specified in ERROR_QUEUE_LIMIT_REACHED.requestId - A request id to identify the collection request.feature - A JSON object to pass attributes and properties which are needed for the collection process.resultHandler - A handler to process the result.void collect(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)
collectAndReceive(String, JsonObject, Handler), but will not send back
the result. It will just send back the information if the job succeeded or failed.requestId - A request id to identify the collection request.feature - A JSON object to pass attributes and properties which are needed for the collection process.resultHandler - A handler to process the result.void getMetricsSnapshot(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> resultHandler)
{
total: {
jobs: {
count: 123,
failed: 12,
succeeded: 108,
exception: 3
},
quality: {
complete: 90,
partial: 20,
....
},
errors: {
blocked: 90,
timeout: 20,
....
}
},
queue: {
maxSize: 30,
free: 12,
occupied: 18
}
}
resultHandler - A handler to process the metrics result.void close()