@Override
public View getView(final String designDocumentName, final String viewName) {
try {
View view = asyncGetView(designDocumentName, viewName).get();
if(view == null) {
throw new InvalidViewException("Could not load view \""
+ viewName + "\" for design doc \"" + designDocumentName + "\"");
}
return view;
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted getting views", e);