예제 #1
0
  //    @SuppressWarnings("unchecked")
  @Override
  public void remove() {

    if (lastVisited == -1) throw new IllegalStateException();

    //        /*
    //         * Use the last tuple actually visited for the source cursor that
    //         * materialized the tuple to be removed.
    //         */
    //        final ITuple tuple = ((ITupleCursor2)sourceIterator[lastVisited]).tuple();
    //
    //        assert tuple != null;
    //
    //        if(!tuple.getKeysRequested()) {
    //
    //            throw new UnsupportedOperationException("KEYS not specified");
    //
    //        }
    //
    //        final byte[] key = tuple.getKey();

    // the last key visited by the fused iterator.
    final byte[] key = lastKeyBuffer.getKey();

    /*
     * Assuming that the ctor was given the FusedView, this will cause a
     * deleted marker to be written on the first index in the fused view for
     * this key. This is the correct semantics for deleting a tuple from a
     * fused view.
     */

    ndx.remove(key);
  }