use of com.peterphi.std.threading.ThreadRenameCallableWrap in project stdlib by petergeneric.
the class AzureVMControlImpl method stopAsync.
@Override
public Future<Void> stopAsync(final String id) {
final VirtualMachine vm = getById(id);
final String threadName = "Azure Async Call - " + vm.resourceGroupName() + " - " + vm.name();
ThreadRenameCallableWrap<Void> call = new ThreadRenameCallableWrap<Void>(threadName, new Callable<Void>() {
@Override
public Void call() throws Exception {
stop(vm, Timeout.THIRTY_MINUTES);
return null;
}
});
return asynchronous.submit(call);
}
use of com.peterphi.std.threading.ThreadRenameCallableWrap in project stdlib by petergeneric.
the class AzureVMControlImpl method restartAsync.
@Override
public Future<Void> restartAsync(final String id) {
final VirtualMachine vm = getById(id);
final String threadName = "Azure Async Call - " + vm.resourceGroupName() + " - " + vm.name();
ThreadRenameCallableWrap<Void> call = new ThreadRenameCallableWrap<Void>(threadName, new Callable<Void>() {
@Override
public Void call() throws Exception {
restart(vm, Timeout.THIRTY_MINUTES);
return null;
}
});
return asynchronous.submit(call);
}
use of com.peterphi.std.threading.ThreadRenameCallableWrap in project stdlib by petergeneric.
the class AzureVMControlImpl method startAsync.
@Override
public Future<Void> startAsync(final String id) {
final VirtualMachine vm = getById(id);
final String threadName = "Azure Async Call" + vm.resourceGroupName() + " - " + vm.name();
ThreadRenameCallableWrap<Void> call = new ThreadRenameCallableWrap<Void>(threadName, new Callable<Void>() {
@Override
public Void call() throws Exception {
start(vm, Timeout.THIRTY_MINUTES);
return null;
}
});
return asynchronous.submit(call);
}
Aggregations