/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { return GridGainEx.gridx(stash.get()).nodeLocalMap(); } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { return GridGainEx.gridx(stash.get()).context(); } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { GridBiTuple<String, String> t = stash.get(); return GridGainEx.gridx(t.get1()).cachex(t.get2()); } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { GridBiTuple<String, Object> t = stash.get(); String gridNameR = t.get1(); Object ctgrR = t.get2(); return GridGainEx.gridx(gridNameR).log().getLogger(ctgrR); } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { GridBiTuple<String, String> t = stash.get(); GridKernal grid = GridGainEx.gridx(t.get1()); GridCacheAdapter<K, V> cache = grid.internalCache(t.get2()); if (cache == null) throw new IllegalStateException("Failed to find cache for name: " + t.get2()); return cache.context(); } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { GridKernal g = GridGainEx.gridx(gridName); return ids != null ? new GridProjectionAdapter(g, g.context(), subjId, ids) : p != null ? new GridProjectionAdapter(g, g.context(), subjId, p) : g; } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } }