use of org.apache.pulsar.client.admin.OffloadProcessStatus in project pulsar by apache.
the class TopicsImpl method offloadStatusAsync.
@Override
public CompletableFuture<OffloadProcessStatus> offloadStatusAsync(String topic) {
TopicName tn = validateTopic(topic);
WebTarget path = topicPath(tn, "offload");
final CompletableFuture<OffloadProcessStatus> future = new CompletableFuture<>();
asyncGetRequest(path, new InvocationCallback<OffloadProcessStatus>() {
@Override
public void completed(OffloadProcessStatus offloadProcessStatus) {
future.complete(offloadProcessStatus);
}
@Override
public void failed(Throwable throwable) {
future.completeExceptionally(getApiException(throwable.getCause()));
}
});
return future;
}
use of org.apache.pulsar.client.admin.OffloadProcessStatus in project incubator-pulsar by apache.
the class TopicsImpl method offloadStatusAsync.
@Override
public CompletableFuture<OffloadProcessStatus> offloadStatusAsync(String topic) {
TopicName tn = validateTopic(topic);
WebTarget path = topicPath(tn, "offload");
final CompletableFuture<OffloadProcessStatus> future = new CompletableFuture<>();
asyncGetRequest(path, new InvocationCallback<OffloadProcessStatus>() {
@Override
public void completed(OffloadProcessStatus offloadProcessStatus) {
future.complete(offloadProcessStatus);
}
@Override
public void failed(Throwable throwable) {
future.completeExceptionally(getApiException(throwable.getCause()));
}
});
return future;
}
use of org.apache.pulsar.client.admin.OffloadProcessStatus in project pulsar by yahoo.
the class TopicsImpl method offloadStatusAsync.
@Override
public CompletableFuture<OffloadProcessStatus> offloadStatusAsync(String topic) {
TopicName tn = validateTopic(topic);
WebTarget path = topicPath(tn, "offload");
final CompletableFuture<OffloadProcessStatus> future = new CompletableFuture<>();
asyncGetRequest(path, new InvocationCallback<OffloadProcessStatus>() {
@Override
public void completed(OffloadProcessStatus offloadProcessStatus) {
future.complete(offloadProcessStatus);
}
@Override
public void failed(Throwable throwable) {
future.completeExceptionally(getApiException(throwable.getCause()));
}
});
return future;
}
Aggregations