Class DeleteCommand.TupleRemover

  • All Implemented Interfaces:
    TupleProcessor
    Enclosing class:
    DeleteCommand

    private static class DeleteCommand.TupleRemover
    extends java.lang.Object
    implements TupleProcessor
    An implementation of the tuple processor interface used by the DeleteCommand to delete each tuple.
    • Constructor Summary

      Constructors 
      Constructor Description
      TupleRemover​(EventDispatcher eventDispatcher, TableInfo tableInfo)
      Initialize the tuple-remover object with the details it needs to delete tuples from the specified table.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void finish()
      This function is called when all tuples have been produced and passed to the tuple processor.
      void process​(Tuple tuple)
      This implementation simply deletes each tuple it is handed.
      void setSchema​(Schema schema)
      This tuple-processor implementation doesn't care about the schema.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tableInfo

        private TableInfo tableInfo
        The table whose tuples will be deleted.
      • eventDispatcher

        private EventDispatcher eventDispatcher
        The event dispatcher for firing row-delete events.
    • Constructor Detail

      • TupleRemover

        TupleRemover​(EventDispatcher eventDispatcher,
                     TableInfo tableInfo)
        Initialize the tuple-remover object with the details it needs to delete tuples from the specified table.
        Parameters:
        tableInfo - details of the table that will be modified
    • Method Detail

      • setSchema

        public void setSchema​(Schema schema)
        This tuple-processor implementation doesn't care about the schema.
        Specified by:
        setSchema in interface TupleProcessor
      • process

        public void process​(Tuple tuple)
        This implementation simply deletes each tuple it is handed.
        Specified by:
        process in interface TupleProcessor
        Parameters:
        tuple - The tuple to process.
      • finish

        public void finish()
        Description copied from interface: TupleProcessor
        This function is called when all tuples have been produced and passed to the tuple processor.
        Specified by:
        finish in interface TupleProcessor