From: <tho...@us...> - 2014-02-20 12:13:09
|
Revision: 7857 http://sourceforge.net/p/bigdata/code/7857 Author: thompsonbry Date: 2014-02-20 12:13:07 +0000 (Thu, 20 Feb 2014) Log Message: ----------- Removed the use of some jetty classes. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeBindingsCollector.java branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeCacheUpdater.java branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTEvalHelper.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeBindingsCollector.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeBindingsCollector.java 2014-02-20 12:02:54 UTC (rev 7856) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeBindingsCollector.java 2014-02-20 12:13:07 UTC (rev 7857) @@ -31,7 +31,6 @@ import java.util.Set; import org.apache.log4j.Logger; -import org.eclipse.jetty.util.ConcurrentHashSet; import org.openrdf.query.Binding; import org.openrdf.query.BindingSet; import org.openrdf.query.QueryEvaluationException; @@ -51,7 +50,7 @@ .getLogger(DescribeBindingsCollector.class); private final IVariable<?>[] originalVars; - private final ConcurrentHashSet<BigdataValue> describedResources; + private final Set<BigdataValue> describedResources; private final CloseableIteration<BindingSet, QueryEvaluationException> src; private boolean open = true; @@ -61,12 +60,13 @@ * The set of variables whose distinct bound values will be * reported. * @param describedResources - * The set of distinct bound values for those variables. + * The set of distinct bound values for those variables (a high + * concurrency, thread-safe set). * @param src * The source iterator. */ public DescribeBindingsCollector(final Set<IVariable<?>> originalVars, - final ConcurrentHashSet<BigdataValue> describedResources, + final Set<BigdataValue> describedResources, final CloseableIteration<BindingSet, QueryEvaluationException> src) { if (originalVars == null) Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeCacheUpdater.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeCacheUpdater.java 2014-02-20 12:02:54 UTC (rev 7856) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/cache/DescribeCacheUpdater.java 2014-02-20 12:13:07 UTC (rev 7857) @@ -4,9 +4,9 @@ import java.util.HashMap; import java.util.Map; +import java.util.Set; import org.apache.log4j.Logger; -import org.eclipse.jetty.util.ConcurrentHashSet; import org.openrdf.model.Graph; import org.openrdf.model.Resource; import org.openrdf.model.Value; @@ -45,12 +45,12 @@ * original DESCRIBE query. We will collect all statements having a * described resource as either a subject or an object. * <p> - * Note: This set is populated as the solutions are observed before they - * are fed into the {@link ASTConstructIterator}. It is a - * {@link ConcurrentHashSet} in order to ensure the visibility of the - * updates to this class. + * Note: This set is populated as the solutions are observed before they are + * fed into the {@link ASTConstructIterator}. It MUST be a thread-safe + * {@link Set} in order to ensure the visibility of the updates to this + * class. It should also support high concurrency. */ - private final ConcurrentHashSet<BigdataValue> describedResources; + private final Set<BigdataValue> describedResources; /** * The source iterator visiting the statements that are the description @@ -78,10 +78,11 @@ * @param cache * The cache to be updated. * @param describedResources - * The {@link BigdataValue}s that become bound for the - * projection of the original DESCRIBE query. We will collect - * all statements having a described resource as either a - * subject or an object. + * The {@link BigdataValue}s that become bound for the projection + * of the original DESCRIBE query. We will collect all statements + * having a described resource as either a subject or an object. + * This MUST be a thread-safe (and concurrency favorable) set in + * order to ensure the visibility of the updates. * @param src * The source iterator, visiting the statements that are the * description of the resource(s) identified in the @@ -89,7 +90,7 @@ */ public DescribeCacheUpdater( final IDescribeCache cache, - final ConcurrentHashSet<BigdataValue> describedResources, + final Set<BigdataValue> describedResources, final CloseableIteration<BigdataStatement, QueryEvaluationException> src) { if (cache == null) Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTEvalHelper.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTEvalHelper.java 2014-02-20 12:02:54 UTC (rev 7856) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTEvalHelper.java 2014-02-20 12:13:07 UTC (rev 7857) @@ -36,10 +36,10 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentSkipListSet; import org.apache.log4j.Logger; import org.apache.log4j.MDC; -import org.eclipse.jetty.util.ConcurrentHashSet; import org.openrdf.model.Value; import org.openrdf.query.Binding; import org.openrdf.query.BindingSet; @@ -513,7 +513,7 @@ try { final CloseableIteration<BindingSet, QueryEvaluationException> solutions2; - final ConcurrentHashSet<BigdataValue> describedResources; + final Set<BigdataValue> describedResources; if (describeCache != null) { /** @@ -540,7 +540,7 @@ */ // Concurrency safe set. - describedResources = new ConcurrentHashSet<BigdataValue>(); + describedResources = new ConcurrentSkipListSet<BigdataValue>(); // Collect the bindings on those variables. solutions2 = new DescribeBindingsCollector(// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |