@Override public boolean apply(AtomicReference<Instance> input) { Instance response = resources.instance(input.get().selfLink()); if (response == null) { return false; } input.set(response); return true; }
@Override public void suspendNode(String selfLink) { waitOperationDone(resources.stopInstance(URI.create(checkNotNull(selfLink, "id")))); }
@Override public void destroyNode(String selfLink) { waitOperationDone(resources.delete(URI.create(checkNotNull(selfLink, "id")))); }
@Override public void rebootNode(String selfLink) { waitOperationDone(resources.resetInstance(URI.create(checkNotNull(selfLink, "id")))); }
@Override public Instance getNode(String selfLink) { return resources.instance(URI.create(checkNotNull(selfLink, "id"))); }