com.bigdata.relation.accesspath
Class AbstractElementBuffer.DeleteBuffer<R>

java.lang.Object
  extended by com.bigdata.relation.accesspath.AbstractArrayBuffer<R>
      extended by com.bigdata.relation.accesspath.AbstractElementBuffer<R>
          extended by com.bigdata.relation.accesspath.AbstractElementBuffer.DeleteBuffer<R>
Type Parameters:
R -
All Implemented Interfaces:
IBuffer<R>
Enclosing class:
AbstractElementBuffer<R>

public static class AbstractElementBuffer.DeleteBuffer<R>
extends AbstractElementBuffer<R>

Buffer writes on IMutableRelation.delete(IChunkedOrderedIterator) when it is flushed.

Version:
$Id: AbstractElementBuffer.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bigdata.relation.accesspath.AbstractElementBuffer
AbstractElementBuffer.DeleteBuffer<R>, AbstractElementBuffer.InsertBuffer<R>
 
Field Summary
 
Fields inherited from class com.bigdata.relation.accesspath.AbstractArrayBuffer
buffer, capacity, cls, filter, size
 
Constructor Summary
protected AbstractElementBuffer.DeleteBuffer(int capacity, IMutableRelation<R> relation, IKeyOrder<R> keyOrder, IElementFilter<R> filter)
          Ctor variant used when you have a strong guarantee of the order in which the elements will be written into the buffer.
 
Method Summary
protected  long flush(IChunkedOrderedIterator<R> itr)
          Concrete implementations must process the elements, causing the appropriate mutation on the target IRelation.
 
Methods inherited from class com.bigdata.relation.accesspath.AbstractElementBuffer
flush, getKeyOrder, getRelation
 
Methods inherited from class com.bigdata.relation.accesspath.AbstractArrayBuffer
accept, add, flush, isEmpty, reset, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractElementBuffer.DeleteBuffer

protected AbstractElementBuffer.DeleteBuffer(int capacity,
                                             IMutableRelation<R> relation,
                                             IKeyOrder<R> keyOrder,
                                             IElementFilter<R> filter)
Ctor variant used when you have a strong guarantee of the order in which the elements will be written into the buffer.

Parameters:
capacity -
relation -
keyOrder -
Method Detail

flush

protected long flush(IChunkedOrderedIterator<R> itr)
Description copied from class: AbstractElementBuffer
Concrete implementations must process the elements, causing the appropriate mutation on the target IRelation.

Note: The elements generally appear in an arbitrary order and need to be sorted into ordered chunks using IKeyOrder.getComparator() for the desired natural order(s).

Specified by:
flush in class AbstractElementBuffer<R>
Returns:
The #of elements that were modified in the backing relation when the buffer was flushed


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.