@Override public void delete(String apiKey, String table, String blobId) { checkNotNull(table, "table"); checkNotNull(blobId, "blobId"); try { _client.resource(toUri(table, blobId)) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }
@Override public void delete(String apiKey, String table, String blobId) { checkNotNull(table, "table"); checkNotNull(blobId, "blobId"); try { _client.resource(toUri(table, blobId)) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }
protected void doPurge(String apiKey, String queue) { checkNotNull(queue, "queue"); try { URI uri = _queueService.clone() .segment(queue) .queryParam("partitioned", _partitionSafe) .build(); _client.resource(uri) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }
@Override public void dropTable(String apiKey, String table, Audit audit) throws UnknownTableException { checkNotNull(table, "table"); checkNotNull(audit, "audit"); URI uri = _blobStore.clone() .segment("_table", table) .queryParam("audit", RisonHelper.asORison(audit)) .build(); try { _client.resource(uri) .type(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }
@Override public void deleteStashTime(String id, String dataCenter) { checkNotNull(id, "id"); checkNotNull(dataCenter, "dataCenter"); try { URI uri = _compactionControlSource.clone() .segment("_compcontrol", "stash-time", id) .queryParam("dataCenter", dataCenter) .build(); _client.resource(uri) .type(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, _apiKey) .delete(); } catch (UniformInterfaceException e) { throw convertException(e); } }
@Override public void unsubscribe(String apiKey, @PartitionKey String subscription) { checkNotNull(subscription, "subscription"); try { URI uri = _databus.clone() .segment(subscription) .queryParam("partitioned", _partitionSafe) .build(); _client.resource(uri) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }
@Override public void deleteStashTime(String id, String dataCenter) { checkNotNull(id, "id"); checkNotNull(dataCenter, "dataCenter"); try { URI uri = _compactionControlSource.clone() .segment("_compcontrol", "stash-time", id) .queryParam("dataCenter", dataCenter) .build(); _client.resource(uri) .type(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, _apiKey) .delete(); } catch (UniformInterfaceException e) { throw convertException(e); } }
@Override public void dropTable(String apiKey, String table, Audit audit) throws UnknownTableException { checkNotNull(table, "table"); checkNotNull(audit, "audit"); URI uri = _blobStore.clone() .segment("_table", table) .queryParam("audit", RisonHelper.asORison(audit)) .build(); try { _client.resource(uri) .type(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }
@Override public void dropTable(String apiKey, String table, Audit audit) throws UnknownTableException { checkNotNull(table, "table"); checkNotNull(audit, "audit"); URI uri = _dataStore.clone() .segment("_table", table) .build(); EmoResponse response = _client.resource(uri) .queryParam("audit", RisonHelper.asORison(audit)) .accept(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(EmoResponse.class); if (response.getStatus() != Response.Status.OK.getStatusCode()) { throw convertException(new EmoClientException(response)); } }
@Override public void deleteApiKey(String apiKey, String id) throws EmoApiKeyNotFoundException { checkNotNull(id, "id"); try { URI uri = _uac.clone() .segment("api-key") .segment(id) .build(); _client.resource(uri) .accept(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }
@Override public void dropTable(String apiKey, String table, Audit audit) throws UnknownTableException { checkNotNull(table, "table"); checkNotNull(audit, "audit"); URI uri = _dataStore.clone() .segment("_table", table) .build(); EmoResponse response = _client.resource(uri) .queryParam("audit", RisonHelper.asORison(audit)) .accept(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(EmoResponse.class); if (response.getStatus() != Response.Status.OK.getStatusCode()) { throw convertException(new EmoClientException(response)); } }
@Override public void deleteRole(String apiKey, EmoRoleKey roleKey) throws EmoRoleNotFoundException { checkNotNull(roleKey, "roleKey"); try { URI uri = _uac.clone() .segment("role") .segment(roleKey.getGroup()) .segment(roleKey.getId()) .build(); _client.resource(uri) .accept(MediaType.APPLICATION_JSON_TYPE) .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey) .delete(); } catch (EmoClientException e) { throw convertException(e); } }