From: <tho...@us...> - 2011-01-04 00:24:38
|
Revision: 4050 http://bigdata.svn.sourceforge.net/bigdata/?rev=4050&view=rev Author: thompsonbry Date: 2011-01-04 00:24:31 +0000 (Tue, 04 Jan 2011) Log Message: ----------- Deleted two support classes associated with the push()/pop() ibinding set api. Removed Paths: ------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionBuffer.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionMetadata.java Deleted: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionBuffer.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionBuffer.java 2011-01-04 00:23:40 UTC (rev 4049) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionBuffer.java 2011-01-04 00:24:31 UTC (rev 4050) @@ -1,106 +0,0 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* - * Created on Jan 1st, 2011 - */ -package com.bigdata.bop.engine; - -import java.util.concurrent.Future; - -import com.bigdata.bop.IBindingSet; -import com.bigdata.relation.accesspath.IAsynchronousIterator; -import com.bigdata.relation.accesspath.IBlockingBuffer; - -/** - * Delegation pattern handles the {@link SinkTransitionMetadata}. - * - * @deprecated along with {@link SinkTransitionMetadata} - */ -class SinkTransitionBuffer implements - IBlockingBuffer<IBindingSet[]> { - - private final IBlockingBuffer<IBindingSet[]> b; - - private final SinkTransitionMetadata stm; - - /** - * - */ - public SinkTransitionBuffer(final IBlockingBuffer<IBindingSet[]> b, - final SinkTransitionMetadata stm) { - - this.b = b; - - this.stm = stm; - - } - - public IAsynchronousIterator<IBindingSet[]> iterator() { - return b.iterator(); - } - - public void setFuture(final Future future) { - b.setFuture(future); - } - - public void abort(final Throwable cause) { - b.abort(cause); - } - - public void close() { - b.close(); - } - - public Future getFuture() { - return b.getFuture(); - } - - public boolean isOpen() { - return b.isOpen(); - } - - public long flush() { - return b.flush(); - } - - public void add(final IBindingSet[] e) { - for (IBindingSet bset : e) { - stm.handleBindingSet(bset); - } - b.add(e); - } - - public boolean isEmpty() { - return b.isEmpty(); - } - - public void reset() { - b.reset(); - } - - public int size() { - return b.size(); - } - -} \ No newline at end of file Deleted: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionMetadata.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionMetadata.java 2011-01-04 00:23:40 UTC (rev 4049) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/engine/SinkTransitionMetadata.java 2011-01-04 00:24:31 UTC (rev 4050) @@ -1,115 +0,0 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* - * Created on Dec 31, 2010 - */ -package com.bigdata.bop.engine; - -import com.bigdata.bop.IBindingSet; -import com.bigdata.bop.PipelineOp; - -/** - * In order to setup the push/pop of the sink and altSink we need to specify - * certain metadata about the source groupId, the target groupId, and whether - * the transition is via the sink or the altSink. The groupId for the source and - * target operators MAY be null, in which case the operator is understood to be - * outside of any conditional binding group. - * <p> - * The action to be taken when the binding set is written to the sink or the - * altSink is determined by a simple decision matrix. - * - * <pre> - * | toGroup - * fromGroup + null + newGroup + sameGroup - * null | NOP | Push | n/a - * group | Pop | Pop+Push | NOP - * </pre> - * - * The value of the [boolean:save] flag for pop is decided based on whether the - * transition is via the default sink (save:=true) or the altSink (save:=false). - * - * @see PipelineOp.Annotations#CONDITIONAL_GROUP - * - * @todo Unit tests of this class in isolation. - * - * @deprecated It appears that this design can not be made to satisfy SPARQL - * optional group semantics. Therefore, we may be able to drop this - * class, support for it in the {@link ChunkedRunningQuery} and - * support for the symbol table stack in {@link IBindingSet}. - */ -class SinkTransitionMetadata { - - private final Integer fromGroupId; - - private final Integer toGroupId; - - private final boolean isSink; - - public String toString() { - - return getClass().getSimpleName() + "{from=" + fromGroupId + ",to=" - + toGroupId + ",isSink=" + isSink + "}"; - - } - - public SinkTransitionMetadata(final Integer fromGroupId, - final Integer toGroupId, final boolean isSink) { - - this.fromGroupId = fromGroupId; - - this.toGroupId = toGroupId; - - this.isSink = isSink; - - } - - /** - * Apply the appropriate action(s) to the binding set. - * - * @param bset - * The binding set. - */ - public void handleBindingSet(final IBindingSet bset) { -// if (fromGroupId == null) { -// if (toGroupId == null) -// return; -// // Transition from no group to some group. -// bset.push(); -// return; -// } else { -// if (toGroupId == null) -// // Transition from a group to no group. -// bset.pop(isSink/* save */); -// else if (toGroupId.equals(fromGroupId)) { -// // NOP (transition to the same group) -// } else { -// // Transition to a different group. -// bset.pop(isSink/* save */); -// bset.push(); -// } -// } - throw new UnsupportedOperationException(); - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |