From: <tho...@us...> - 2014-06-16 16:25:26
|
Revision: 8487 http://sourceforge.net/p/bigdata/code/8487 Author: thompsonbry Date: 2014-06-16 16:25:19 +0000 (Mon, 16 Jun 2014) Log Message: ----------- Added support for IsolatedActionJournal.indexNameScan(). This is invoked by DROP ALL from the SPARQL layer if we are using group commit. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractTask.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractTask.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractTask.java 2014-06-16 16:23:25 UTC (rev 8486) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/journal/AbstractTask.java 2014-06-16 16:25:19 UTC (rev 8487) @@ -83,6 +83,9 @@ import com.bigdata.util.InnerCause; import com.bigdata.util.concurrent.TaskCounters; +import cutthecrap.utils.striterators.Resolver; +import cutthecrap.utils.striterators.Striterator; + /** * Abstract base class for tasks that may be submitted to the * {@link ConcurrencyManager}. Tasks may be isolated (by a transaction), @@ -292,7 +295,7 @@ * @param checkpointAddr * @param commitTime */ - Entry(String name, long checkpointAddr, long commitTime) { + Entry(final String name, final long checkpointAddr, final long commitTime) { super(name, checkpointAddr, commitTime); @@ -3007,9 +3010,26 @@ return delegate.getHttpdPort(); } + /** + * {@inheritDoc} + * <p> + * Overridden to visit the name of all indices that were isolated and to + * ignore the timestamp. + */ @Override - public Iterator<String> indexNameScan(String prefix, long timestamp) { - throw new UnsupportedOperationException(); + public Iterator<String> indexNameScan(final String prefix, + final long timestampIsIgnored) { + + return new Striterator(n2a.values().iterator()) + .addFilter(new Resolver() { + private static final long serialVersionUID = 1L; + + @Override + protected Object resolve(final Object obj) { + return ((Entry)obj).name; + } + }); + } @Override This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |