/** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);

    topVer = in.readLong();
    implicitTx = in.readBoolean();
    implicitSingleTx = in.readBoolean();
    syncCommit = in.readBoolean();
    syncRollback = in.readBoolean();
    filterBytes = (byte[][]) in.readObject();

    dhtVers = U.readArray(in, CU.versionArrayFactory());

    miniId = U.readGridUuid(in);

    assert miniId != null;
  }
  /** {@inheritDoc} */
  @Override
  public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);

    out.writeLong(topVer);
    out.writeBoolean(implicitTx);
    out.writeBoolean(implicitSingleTx);
    out.writeBoolean(syncCommit);
    out.writeBoolean(syncRollback);
    out.writeObject(filterBytes);

    U.writeArray(out, dhtVers);

    assert miniId != null;

    U.writeGridUuid(out, miniId);
  }
  /** {@inheritDoc} */
  @Override
  public void p2pUnmarshal(GridCacheContext<K, V> ctx, ClassLoader ldr) throws GridException {
    super.p2pUnmarshal(ctx, ldr);

    if (filter == null) filter = unmarshalFilter(filterBytes, ctx, ldr);
  }
  /** {@inheritDoc} */
  @Override
  public void p2pMarshal(GridCacheContext<K, V> ctx) throws GridException {
    super.p2pMarshal(ctx);

    if (filterBytes == null) filterBytes = marshalFilter(filter, ctx);
  }