MCPcopy
hub / github.com/OpenTSDB/opentsdb / executeBulk

Method executeBulk

src/tsd/AnnotationRpc.java:143–153  ·  view source on GitHub ↗

Performs CRUD methods on a list of annotation objects to reduce calls to the API. @param tsdb The TSD to which we belong @param method The request method @param query The query to parse and respond to

(final TSDB tsdb, final HttpMethod method, HttpQuery query)

Source from the content-addressed store, hash-verified

141 * @param query The query to parse and respond to
142 */
143 void executeBulk(final TSDB tsdb, final HttpMethod method, HttpQuery query) {
144 if (method == HttpMethod.POST || method == HttpMethod.PUT) {
145 executeBulkUpdate(tsdb, method, query);
146 } else if (method == HttpMethod.DELETE) {
147 executeBulkDelete(tsdb, query);
148 } else {
149 throw new BadRequestException(HttpResponseStatus.METHOD_NOT_ALLOWED,
150 "Method not allowed", "The HTTP method [" + query.method().getName() +
151 "] is not permitted for this endpoint");
152 }
153 }
154
155 /**
156 * Performs CRU methods on a list of annotation objects to reduce calls to

Callers 1

executeMethod · 0.95

Calls 4

executeBulkUpdateMethod · 0.95
executeBulkDeleteMethod · 0.95
methodMethod · 0.80
getNameMethod · 0.65

Tested by

no test coverage detected