/** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    GridBiTuple<GridCacheContext, String> t = stash.get();

    t.set1((GridCacheContext) in.readObject());
    t.set2(in.readUTF());
  }
  /**
   * Reconstructs object on demarshalling.
   *
   * @return Reconstructed object.
   * @throws ObjectStreamException Thrown in case of demarshalling error.
   */
  @SuppressWarnings("unchecked")
  private Object readResolve() throws ObjectStreamException {
    try {
      GridBiTuple<GridCacheContext, String> t = stash.get();

      return t.get1().dataStructures().atomicReference(t.get2(), null, false);
    } catch (GridException e) {
      throw U.withCause(new InvalidObjectException(e.getMessage()), e);
    } finally {
      stash.remove();
    }
  }