Ejemplo n.º 1
0
  /**
   * Delayed post processing of optimized wrappers.
   *
   * @throws IOException If failed.
   * @throws ClassNotFoundException If failed.
   */
  void delayedRead() throws IOException, ClassNotFoundException {
    if (wrappers != null)
      for (GridOptimizedWrapper w = wrappers.poll(); w != null; w = wrappers.poll())
        w.delayedReadExternal(this);

    wrappers = null; // GC.
  }
  /**
   * Dequeues all previously enqueued wrappers and writes them to the stream.
   *
   * @throws IOException If failed.
   */
  void delayedWrite() throws IOException {
    if (wrappers != null)
      for (GridOptimizedWrapper w = wrappers.poll(); w != null; w = wrappers.poll())
        w.delayedWriteExternal(this);

    wrappers = null; // GC.
  }
Ejemplo n.º 3
0
  /** {@inheritDoc} */
  @Override
  protected Object resolveObject(Object obj) throws IOException {
    if (obj instanceof GridOptimizedWrapper) {
      GridOptimizedWrapper wrapper = (GridOptimizedWrapper) obj;

      return wrapper.wrapped();
    } else return obj;
  }