/** * {@inheritDoc} */ @Override public T get() throws UnresolvableInstanceException, InstanceUnavailableException { throw new InstanceUnavailableException(this); }
/** * {@inheritDoc} */ @Override public String toString() { return String.format("InstanceUnavailableException: %s\n%s", getMessage(), super.toString()); } }
@Override public Boolean get() throws UnresolvableInstanceException, InstanceUnavailableException { if (!server.getRemoteExecutors().iterator().hasNext()) { throw new InstanceUnavailableException(this); } else { return true; } }
throw new InstanceUnavailableException(this, exception); throw new InstanceUnavailableException(this); throw new InstanceUnavailableException(this);
/** * {@inheritDoc} */ @Override public T get() throws UnresolvableInstanceException, InstanceUnavailableException { synchronized (this) { if (hasResult) { if (exception == null) { return result; } else { throw new UnresolvableInstanceException(this, exception); } } else { throw new InstanceUnavailableException(this); } } }
/** * {@inheritDoc} */ @Override public JMXConnector get() throws UnresolvableInstanceException, InstanceUnavailableException { String username = ""; String password = ""; Map<String, Object> env = new HashMap<String, Object>(); String[] credentials = new String[] {username, password}; env.put(JMXConnector.CREDENTIALS, credentials); try { JMXConnector connector; connector = m_jmxConnectorBuilder.realize(new JMXServiceURL(m_jmxConnectionURL), env); connector.connect(); return connector; } catch (IOException e) { throw new InstanceUnavailableException(this, e); } catch (Exception e) { // we assume any exception means we should retry throw new InstanceUnavailableException(this, e); } }
throw new InstanceUnavailableException(this); throw new InstanceUnavailableException(this, e); throw new InstanceUnavailableException(this, e); throw new InstanceUnavailableException(this, e);
throw new InstanceUnavailableException(this, e);
throw new InstanceUnavailableException(this); throw new InstanceUnavailableException(this, e); throw new InstanceUnavailableException(this, e); throw new InstanceUnavailableException(this, e); throw new InstanceUnavailableException(this, e);
throw new InstanceUnavailableException(this); throw new InstanceUnavailableException(this, e); throw new InstanceUnavailableException(this, e);
throw new InstanceUnavailableException(this, e);
@Override public Boolean get() throws UnresolvableInstanceException, InstanceUnavailableException { try { lastMatchedValue = deferred.get(); if (predicate.evaluate(lastMatchedValue)) { return true; } else { throw new InstanceUnavailableException(this); } } catch (InstanceUnavailableException e) { throw e; } catch (UnresolvableInstanceException e) { throw e; } catch (Exception e) { throw new UnresolvableInstanceException(this, e); } }