/** * @return No-op processor usage exception; */ private GridRuntimeException processorException() { return new GridRuntimeException("Current GridGain configuration does not support schedule functionality " + "(consider adding gridgain-schedule module to classpath)."); } }
/** {@inheritDoc} */ @Override public String toString() { return getClass() + ": " + getMessage(); } }
/** * @param cond Condition. * @param desc Description. * @param v Value. */ private void ensure(boolean cond, String desc, @Nullable Object v) { if (!cond) if (v != null) throw new GridRuntimeException("Service configuration check failed (" + desc + "): " + v); else throw new GridRuntimeException("Service configuration check failed (" + desc + ")"); }
@Override public Object execute() { try { return c.call(); } catch (Exception e) { throw new GridRuntimeException(e); } } };
@Override public Object execute() { try { return c.call(); } catch (Exception e) { throw new GridRuntimeException(e); } }
@Override protected MessageDigest initialValue() { try { return MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { assert false : "Should have failed in constructor"; throw new GridRuntimeException("Failed to obtain message digest (digest was available in constructor)", e); } } };
@Override public Object execute() { try { return c.call(); } catch (Exception e) { throw new GridRuntimeException(e); } }
@Override public Object execute() { try { return c.call(); } catch (Exception e) { throw new GridRuntimeException(e); } } };
/** * @return {@code true} If next row was fetched successfully. */ private boolean fetchNext() { if (data == null) return false; try { if (!data.next()) return false; for (int c = 0; c < row.length; c++) row[c] = data.getObject(c + 1); return true; } catch (SQLException e) { throw new GridRuntimeException(e); } }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Nullable @Override public V get(Object key) { try { return prj.get((K)key); } catch (GridException e) { throw new GridRuntimeException(e); } }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Nullable @Override public V remove(Object key) { try { return prj.remove((K)key); } catch (GridException e) { throw new GridRuntimeException(e); } }
/** {@inheritDoc} */ @Override public final boolean hasNext() { try { return hasNextX(); } catch (GridException e) { throw new GridRuntimeException(e); } }
/** {@inheritDoc} */ @Override public final void remove() { try { removeX(); } catch (GridException e) { throw new GridRuntimeException(e); } }
/** {@inheritDoc} */ @Override public long expirationTime() { try { return impl.expireTime(); } catch (GridCacheEntryRemovedException e) { assert false : "Entry should not become obsolete while holding lock"; throw new GridRuntimeException(e); } }
/** @return Event that represents a local node joined to topology. */ public GridDiscoveryEvent localJoinEvent() { try { return locJoinEvt.get(); } catch (GridException e) { throw new GridRuntimeException(e); } }
/** {@inheritDoc} */ @Override public V peek() { try { return peek(MODES_SMART); } catch (GridException e) { // Should never happen. throw new GridRuntimeException("Unable to perform entry peek() operation.", e); } }
/** {@inheritDoc} */ @Nullable @Override public V putIfAbsent(K key, V val) { try { return prj.putIfAbsent(key, val); } catch (GridException e) { throw new GridRuntimeException(e); } }
/** {@inheritDoc} */ @Nullable @Override public V replace(K key, V val) { try { return prj.replace(key, val); } catch (GridException e) { throw new GridRuntimeException(e); } }
/** * Initializes marshaller not to enforce {@link Serializable} interface. * * @throws GridRuntimeException If this marshaller is not supported on the current JVM. */ public GridOptimizedMarshaller() { if (!available()) throw new GridRuntimeException("Using GridOptimizedMarshaller on unsupported JVM version (some of " + "JVM-private APIs required for the marshaller to work are missing)."); }
/** {@inheritDoc} */ @Override public long timeToLive() { try { return impl.ttl(); } catch (GridCacheEntryRemovedException e) { assert false : "Entry should not become obsolete while holding lock"; throw new GridRuntimeException(e); } }