You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/12/11 10:33:16 UTC
[4/5] jena git commit: Convert tabs to spaces.
Convert tabs to spaces.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/45ab88f9
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/45ab88f9
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/45ab88f9
Branch: refs/heads/master
Commit: 45ab88f9c1a3aec9f79c613a96a2a8bdc6078b13
Parents: bf4eead
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Dec 11 09:29:43 2015 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Dec 11 09:29:43 2015 +0000
----------------------------------------------------------------------
.../core/journaling/DatasetGraphWithRecord.java | 384 +++++++++----------
.../journaling/ListBackedOperationRecord.java | 66 ++--
.../jena/sparql/core/journaling/Operation.java | 55 ++-
.../sparql/core/journaling/QuadOperation.java | 196 +++++-----
.../journaling/ReversibleOperationRecord.java | 46 +--
.../sparql/core/journaling/package-info.java | 4 -
6 files changed, 373 insertions(+), 378 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/45ab88f9/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/DatasetGraphWithRecord.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/DatasetGraphWithRecord.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/DatasetGraphWithRecord.java
index a24daf0..8dc67a3 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/DatasetGraphWithRecord.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/DatasetGraphWithRecord.java
@@ -52,196 +52,196 @@ import org.apache.jena.sparql.core.journaling.QuadOperation.QuadDeletion;
*/
public class DatasetGraphWithRecord extends DatasetGraphWithLock {
- /**
- * A record of operations for use in rewinding transactions.
- */
- private ReversibleOperationRecord<QuadOperation<?, ?>> record = new ListBackedOperationRecord<>(new ArrayList<>());
-
- /**
- * Mutex permitting only one writer at a time to mutate the operation record.
- */
- private final Lock recordLock = new ReentrantLock(true);
-
- /**
- * Indicates whether we should be recording operations. True iff we are in a WRITE-transaction and not aborting.
- */
- private boolean recording = false;
-
- private boolean isRecording() {
- return recording;
- }
-
- private void startRecording() {
- // enforce the single-writer constraint
- recordLock.lock();
- recording = true;
- }
-
- private void stopRecording() {
- recording = false;
- }
-
- /**
- * @param dsg the DatasetGraph that will back this one
- */
- public DatasetGraphWithRecord(final DatasetGraph dsg) {
- super(dsg);
- }
-
- /**
- * @param dsg the DatasetGraph that will back this one
- * @param record the operation record to use with this DatasetGraph
- */
- public DatasetGraphWithRecord(final DatasetGraph dsg, final ReversibleOperationRecord<QuadOperation<?, ?>> record) {
- super(dsg);
- this.record = record;
- }
-
- /**
- * Guards a mutation to the state of this dataset.
- *
- * @param data the data with which to mutate this dataset
- * @param mutator the kind of change to make
- */
- private <T> void mutate(final T data, final Consumer<T> mutator) {
- if (allowedToWrite()) mutator.accept(data);
- else throw new JenaTransactionException("Tried to write in a non-WRITE transaction!");
- }
-
- @Override
- public void add(final Quad quad) {
- mutate(quad, _add);
- }
-
- @Override
- public void delete(final Quad quad) {
- mutate(quad, _delete);
- }
-
- @Override
- public void addGraph(final Node graphName, final Graph graph) {
- mutate(graph, _addGraph(graphName));
- }
-
- @Override
- public void removeGraph(final Node graphName) {
- mutate(graphName, _removeGraph);
- }
-
- /**
- * A mutator that adds a graph to this dataset.
- */
- private Consumer<Graph> _addGraph(final Node name) {
- return g -> {
- super.addGraph(name, createGraphMem());
- g.find(ANY, ANY, ANY).forEachRemaining(t -> add(new Quad(name, t)));
- };
- }
-
- /**
- * A mutator that removes a graph from this dataset.
- */
- private final Consumer<Node> _removeGraph = graphName -> {
- // delete all triples in this graph in the backing store
- deleteAny(graphName, ANY, ANY, ANY);
- // remove the graph itself
- super.removeGraph(graphName);
- };
-
- /**
- * A mutator that adds a quad to this dataset.
- */
- private final Consumer<Quad> _add = quad -> {
- if (!contains(quad)) {
- super.add(quad);
- if (isRecording()) record.accept(new QuadAddition(quad));
- }
- };
-
- /**
- * A mutator that deletes a quad from this dataset.
- */
- private final Consumer<Quad> _delete = quad -> {
- if (contains(quad)) {
- super.delete(quad);
- if (isRecording()) record.accept(new QuadDeletion(quad));
- }
- };
-
- /**
- * @return true iff we are outside a transaction or inside a WRITE transaction
- */
- private boolean allowedToWrite() {
- return !isInTransaction() || isInTransaction() && isTransactionType(WRITE);
- }
-
- @Override
- public void add(final Node g, final Node s, final Node p, final Node o) {
- add(new Quad(g, s, p, o));
- }
-
- @Override
- public void delete(final Node g, final Node s, final Node p, final Node o) {
- delete(new Quad(g, s, p, o));
- }
-
- @Override
- public void deleteAny(final Node g, final Node s, final Node p, final Node o) {
- newArrayList(find(g, s, p, o)).forEach(this::delete);
- }
-
- @Override
- public void clear() {
- deleteAny(ANY, ANY, ANY, ANY);
- super.clear();
- }
-
- @Override
- protected boolean abortImplemented() {
- return true;
- }
-
- @Override
- protected void _begin(final ReadWrite readWrite) {
- super._begin(readWrite);
- if (readWrite.equals(WRITE)) startRecording();
- }
-
- @Override
- protected void _commit() {
- stopRecording();
- record.clear();
- recordLock.unlock();
- super._commit();
- }
-
- @Override
- protected void _abort() {
- _end();
- }
-
- @Override
- protected void _end() {
- if (isRecording()) {
- try {
- // stop recording operations from this thread
- stopRecording();
- // and unwind the record
- record.reverse().consume(op -> op.inverse().actOn(this));
- } finally {
- recordLock.unlock();
- }
- }
- super._end();
- }
-
- @Override
- public void close() {
- if (isRecording()) {
- stopRecording();
- record.clear();
- recordLock.unlock();
- }
- super.close();
- }
+ /**
+ * A record of operations for use in rewinding transactions.
+ */
+ private ReversibleOperationRecord<QuadOperation<?, ?>> record = new ListBackedOperationRecord<>(new ArrayList<>());
+
+ /**
+ * Mutex permitting only one writer at a time to mutate the operation record.
+ */
+ private final Lock recordLock = new ReentrantLock(true);
+
+ /**
+ * Indicates whether we should be recording operations. True iff we are in a WRITE-transaction and not aborting.
+ */
+ private boolean recording = false;
+
+ private boolean isRecording() {
+ return recording;
+ }
+
+ private void startRecording() {
+ // enforce the single-writer constraint
+ recordLock.lock();
+ recording = true;
+ }
+
+ private void stopRecording() {
+ recording = false;
+ }
+
+ /**
+ * @param dsg the DatasetGraph that will back this one
+ */
+ public DatasetGraphWithRecord(final DatasetGraph dsg) {
+ super(dsg);
+ }
+
+ /**
+ * @param dsg the DatasetGraph that will back this one
+ * @param record the operation record to use with this DatasetGraph
+ */
+ public DatasetGraphWithRecord(final DatasetGraph dsg, final ReversibleOperationRecord<QuadOperation<?, ?>> record) {
+ super(dsg);
+ this.record = record;
+ }
+
+ /**
+ * Guards a mutation to the state of this dataset.
+ *
+ * @param data the data with which to mutate this dataset
+ * @param mutator the kind of change to make
+ */
+ private <T> void mutate(final T data, final Consumer<T> mutator) {
+ if (allowedToWrite()) mutator.accept(data);
+ else throw new JenaTransactionException("Tried to write in a non-WRITE transaction!");
+ }
+
+ @Override
+ public void add(final Quad quad) {
+ mutate(quad, _add);
+ }
+
+ @Override
+ public void delete(final Quad quad) {
+ mutate(quad, _delete);
+ }
+
+ @Override
+ public void addGraph(final Node graphName, final Graph graph) {
+ mutate(graph, _addGraph(graphName));
+ }
+
+ @Override
+ public void removeGraph(final Node graphName) {
+ mutate(graphName, _removeGraph);
+ }
+
+ /**
+ * A mutator that adds a graph to this dataset.
+ */
+ private Consumer<Graph> _addGraph(final Node name) {
+ return g -> {
+ super.addGraph(name, createGraphMem());
+ g.find(ANY, ANY, ANY).forEachRemaining(t -> add(new Quad(name, t)));
+ };
+ }
+
+ /**
+ * A mutator that removes a graph from this dataset.
+ */
+ private final Consumer<Node> _removeGraph = graphName -> {
+ // delete all triples in this graph in the backing store
+ deleteAny(graphName, ANY, ANY, ANY);
+ // remove the graph itself
+ super.removeGraph(graphName);
+ };
+
+ /**
+ * A mutator that adds a quad to this dataset.
+ */
+ private final Consumer<Quad> _add = quad -> {
+ if (!contains(quad)) {
+ super.add(quad);
+ if (isRecording()) record.accept(new QuadAddition(quad));
+ }
+ };
+
+ /**
+ * A mutator that deletes a quad from this dataset.
+ */
+ private final Consumer<Quad> _delete = quad -> {
+ if (contains(quad)) {
+ super.delete(quad);
+ if (isRecording()) record.accept(new QuadDeletion(quad));
+ }
+ };
+
+ /**
+ * @return true iff we are outside a transaction or inside a WRITE transaction
+ */
+ private boolean allowedToWrite() {
+ return !isInTransaction() || isInTransaction() && isTransactionType(WRITE);
+ }
+
+ @Override
+ public void add(final Node g, final Node s, final Node p, final Node o) {
+ add(new Quad(g, s, p, o));
+ }
+
+ @Override
+ public void delete(final Node g, final Node s, final Node p, final Node o) {
+ delete(new Quad(g, s, p, o));
+ }
+
+ @Override
+ public void deleteAny(final Node g, final Node s, final Node p, final Node o) {
+ newArrayList(find(g, s, p, o)).forEach(this::delete);
+ }
+
+ @Override
+ public void clear() {
+ deleteAny(ANY, ANY, ANY, ANY);
+ super.clear();
+ }
+
+ @Override
+ protected boolean abortImplemented() {
+ return true;
+ }
+
+ @Override
+ protected void _begin(final ReadWrite readWrite) {
+ super._begin(readWrite);
+ if (readWrite.equals(WRITE)) startRecording();
+ }
+
+ @Override
+ protected void _commit() {
+ stopRecording();
+ record.clear();
+ recordLock.unlock();
+ super._commit();
+ }
+
+ @Override
+ protected void _abort() {
+ _end();
+ }
+
+ @Override
+ protected void _end() {
+ if (isRecording()) {
+ try {
+ // stop recording operations from this thread
+ stopRecording();
+ // and unwind the record
+ record.reverse().consume(op -> op.inverse().actOn(this));
+ } finally {
+ recordLock.unlock();
+ }
+ }
+ super._end();
+ }
+
+ @Override
+ public void close() {
+ if (isRecording()) {
+ stopRecording();
+ record.clear();
+ recordLock.unlock();
+ }
+ super.close();
+ }
}
http://git-wip-us.apache.org/repos/asf/jena/blob/45ab88f9/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ListBackedOperationRecord.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ListBackedOperationRecord.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ListBackedOperationRecord.java
index d0b4d93..81ccdbd 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ListBackedOperationRecord.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ListBackedOperationRecord.java
@@ -31,43 +31,43 @@ import org.apache.jena.sparql.core.journaling.Operation.InvertibleOperation;
* @param <OpType> the type of {@link Operation} contained in this record
*/
public class ListBackedOperationRecord<OpType extends InvertibleOperation<?, ?, ?, ?>>
- implements ReversibleOperationRecord<OpType> {
+implements ReversibleOperationRecord<OpType> {
- /**
- * A {@link List} into which we will record operations. The iterator of this list _must_ implement {@link Iterator#remove()}
- * for {@link #consume(Consumer)} to operate correctly!
- */
- private final List<OpType> operations;
+ /**
+ * A {@link List} into which we will record operations. The iterator of this list _must_ implement {@link Iterator#remove()}
+ * for {@link #consume(Consumer)} to operate correctly!
+ */
+ private final List<OpType> operations;
- /**
- * @param ops a list into which we will record operations. The iterator of this list _must_ implement
- * {@link Iterator#remove()} for {@link #consume(Consumer)} to operate correctly!
- */
- public ListBackedOperationRecord(final List<OpType> ops) {
- operations = ops;
- }
+ /**
+ * @param ops a list into which we will record operations. The iterator of this list _must_ implement
+ * {@link Iterator#remove()} for {@link #consume(Consumer)} to operate correctly!
+ */
+ public ListBackedOperationRecord(final List<OpType> ops) {
+ operations = ops;
+ }
- @Override
- public void accept(final OpType op) {
- operations.add(op);
- }
+ @Override
+ public void accept(final OpType op) {
+ operations.add(op);
+ }
- @Override
- public ListBackedOperationRecord<OpType> reverse() {
- return new ListBackedOperationRecord<>(Lists.reverse(operations));
- }
+ @Override
+ public ListBackedOperationRecord<OpType> reverse() {
+ return new ListBackedOperationRecord<>(Lists.reverse(operations));
+ }
- @Override
- public void consume(final Consumer<OpType> consumer) {
- final Iterator<OpType> i = operations.iterator();
- while (i.hasNext()) {
- consumer.accept(i.next());
- i.remove();
- }
- }
+ @Override
+ public void consume(final Consumer<OpType> consumer) {
+ final Iterator<OpType> i = operations.iterator();
+ while (i.hasNext()) {
+ consumer.accept(i.next());
+ i.remove();
+ }
+ }
- @Override
- public void clear() {
- operations.clear();
- }
+ @Override
+ public void clear() {
+ operations.clear();
+ }
}
http://git-wip-us.apache.org/repos/asf/jena/blob/45ab88f9/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/Operation.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/Operation.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/Operation.java
index 5b3aaa0..5d232ab 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/Operation.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/Operation.java
@@ -27,34 +27,33 @@ package org.apache.jena.sparql.core.journaling;
*/
public interface Operation<DataType, ServiceType> {
- /**
- * @return the data encapsulated in this operation
- */
- DataType data();
+ /**
+ * @return the data encapsulated in this operation
+ */
+ DataType data();
- /**
- * Execute this operation against a given service
- *
- * @param service the service against which to execute
- */
- void actOn(ServiceType service);
+ /**
+ * Execute this operation against a given service
+ *
+ * @param service the service against which to execute
+ */
+ void actOn(ServiceType service);
- /**
- * An invertible {@link Operation}.
- *
- * @param <DataType> the type of data encapsulated
- * @param <ServiceType> the type of service upon which this operation acts
- * @param <SelfType> this type
- * @param <InverseType> the type of the inverse operation
- */
- public static interface InvertibleOperation<DataType, ServiceType, SelfType extends InvertibleOperation<DataType, ServiceType, SelfType, InverseType>, InverseType extends InvertibleOperation<DataType, ServiceType, InverseType, SelfType>>
- extends Operation<DataType, ServiceType> {
-
- /**
- * Creates an inverse operation for this data.
- *
- * @return the inverse of this operation on the same data and against the same type of service.
- */
- InverseType inverse();
- }
+ /**
+ * An invertible {@link Operation}.
+ *
+ * @param <DataType> the type of data encapsulated
+ * @param <ServiceType> the type of service upon which this operation acts
+ * @param <SelfType> this type
+ * @param <InverseType> the type of the inverse operation
+ */
+ public static interface InvertibleOperation<DataType, ServiceType, SelfType extends InvertibleOperation<DataType, ServiceType, SelfType, InverseType>, InverseType extends InvertibleOperation<DataType, ServiceType, InverseType, SelfType>>
+ extends Operation<DataType, ServiceType> {
+ /**
+ * Creates an inverse operation for this data.
+ *
+ * @return the inverse of this operation on the same data and against the same type of service.
+ */
+ InverseType inverse();
+ }
}
http://git-wip-us.apache.org/repos/asf/jena/blob/45ab88f9/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/QuadOperation.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/QuadOperation.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/QuadOperation.java
index deca7e4..29a5eaf 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/QuadOperation.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/QuadOperation.java
@@ -32,102 +32,102 @@ import org.apache.jena.sparql.core.journaling.Operation.InvertibleOperation;
*
*/
public abstract class QuadOperation<SelfType extends QuadOperation<SelfType, InverseType>, InverseType extends QuadOperation<InverseType, SelfType>>
- implements InvertibleOperation<Quad, DatasetGraph, SelfType, InverseType> {
-
- protected final Quad quad;
-
- /**
- * @param q the quad that is being operated with
- */
- public QuadOperation(final Quad q) {
- this.quad = q;
- }
-
- /**
- * The addition of a {@link Quad} to a {@link DatasetGraph}
- */
- public static class QuadAddition extends QuadOperation<QuadAddition, QuadDeletion> {
-
- /**
- * @param q the quad that is being operated with
- */
- public QuadAddition(final Quad q) {
- super(q);
- }
-
- @Override
- public Quad data() {
- return quad;
- }
-
- @Override
- public QuadDeletion inverse() {
- return new QuadDeletion(data());
- }
-
- @Override
- public void actOn(final DatasetGraph dsg) {
- dsg.add(data());
- }
-
- @Override
- public String toString() {
- return "ADD " + super.toString();
- }
-
- @Override
- public int hashCode() {
- return hash(data());
- }
-
- @Override
- public boolean equals(final Object other) {
- if (other instanceof QuadAddition) return data().equals(((QuadAddition) other).data());
- return false;
- }
- }
-
- /**
- * The deletion of a {@link Quad} from a {@link DatasetGraph}
- */
- public static class QuadDeletion extends QuadOperation<QuadDeletion, QuadAddition> {
-
- /**
- * @param q the quad that is being operated with
- */
- public QuadDeletion(final Quad q) {
- super(q);
- }
-
- @Override
- public Quad data() {
- return quad;
- }
-
- @Override
- public QuadAddition inverse() {
- return new QuadAddition(data());
- }
-
- @Override
- public void actOn(final DatasetGraph dsg) {
- dsg.delete(data());
- }
-
- @Override
- public String toString() {
- return "DELETE " + super.toString();
- }
-
- @Override
- public int hashCode() {
- return hash(data());
- }
-
- @Override
- public boolean equals(final Object other) {
- if (other instanceof QuadDeletion) return data().equals(((QuadDeletion) other).data());
- return false;
- }
- }
+implements InvertibleOperation<Quad, DatasetGraph, SelfType, InverseType> {
+
+ protected final Quad quad;
+
+ /**
+ * @param q the quad that is being operated with
+ */
+ public QuadOperation(final Quad q) {
+ this.quad = q;
+ }
+
+ /**
+ * The addition of a {@link Quad} to a {@link DatasetGraph}
+ */
+ public static class QuadAddition extends QuadOperation<QuadAddition, QuadDeletion> {
+
+ /**
+ * @param q the quad that is being operated with
+ */
+ public QuadAddition(final Quad q) {
+ super(q);
+ }
+
+ @Override
+ public Quad data() {
+ return quad;
+ }
+
+ @Override
+ public QuadDeletion inverse() {
+ return new QuadDeletion(data());
+ }
+
+ @Override
+ public void actOn(final DatasetGraph dsg) {
+ dsg.add(data());
+ }
+
+ @Override
+ public String toString() {
+ return "ADD " + super.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return hash(data());
+ }
+
+ @Override
+ public boolean equals(final Object other) {
+ if (other instanceof QuadAddition) return data().equals(((QuadAddition) other).data());
+ return false;
+ }
+ }
+
+ /**
+ * The deletion of a {@link Quad} from a {@link DatasetGraph}
+ */
+ public static class QuadDeletion extends QuadOperation<QuadDeletion, QuadAddition> {
+
+ /**
+ * @param q the quad that is being operated with
+ */
+ public QuadDeletion(final Quad q) {
+ super(q);
+ }
+
+ @Override
+ public Quad data() {
+ return quad;
+ }
+
+ @Override
+ public QuadAddition inverse() {
+ return new QuadAddition(data());
+ }
+
+ @Override
+ public void actOn(final DatasetGraph dsg) {
+ dsg.delete(data());
+ }
+
+ @Override
+ public String toString() {
+ return "DELETE " + super.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return hash(data());
+ }
+
+ @Override
+ public boolean equals(final Object other) {
+ if (other instanceof QuadDeletion) return data().equals(((QuadDeletion) other).data());
+ return false;
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/jena/blob/45ab88f9/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ReversibleOperationRecord.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ReversibleOperationRecord.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ReversibleOperationRecord.java
index 88ee7ac..3cbf37d 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ReversibleOperationRecord.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/ReversibleOperationRecord.java
@@ -27,29 +27,29 @@ import java.util.function.Consumer;
*/
public interface ReversibleOperationRecord<OpType extends Operation<?, ?>> extends Consumer<OpType> {
- /**
- * For each {@link Operation} in this record from the least-recently added to the most-recently added, use
- * <code>consumer::accept</code> on that operation and then discard that operation from the record.
- *
- * @param consumer the consumer to use in consuming this record
- */
- void consume(Consumer<OpType> consumer);
+ /**
+ * For each {@link Operation} in this record from the least-recently added to the most-recently added, use
+ * <code>consumer::accept</code> on that operation and then discard that operation from the record.
+ *
+ * @param consumer the consumer to use in consuming this record
+ */
+ void consume(Consumer<OpType> consumer);
- /**
- * Clear this record.
- */
- default void clear() {
- consume(op -> {}); // /dev/null
- }
+ /**
+ * Clear this record.
+ */
+ default void clear() {
+ consume(op -> {}); // /dev/null
+ }
- /**
- * Produces a time-reversed version of this record. If a record is compact (i.e. every operation in it caused a
- * definite change in the state of the service against which it was run) and this record is run against a service,
- * and then its reverse is run against a service with each operation inverted, no change should result in the state
- * of that service. This method may not produce an independent object: in other words, it may not be possible to use
- * {@link #reverse()} on the result of this method to recover the original.
- *
- * @return the reverse of this record
- */
- ReversibleOperationRecord<OpType> reverse();
+ /**
+ * Produces a time-reversed version of this record. If a record is compact (i.e. every operation in it caused a
+ * definite change in the state of the service against which it was run) and this record is run against a service,
+ * and then its reverse is run against a service with each operation inverted, no change should result in the state
+ * of that service. This method may not produce an independent object: in other words, it may not be possible to use
+ * {@link #reverse()} on the result of this method to recover the original.
+ *
+ * @return the reverse of this record
+ */
+ ReversibleOperationRecord<OpType> reverse();
}
http://git-wip-us.apache.org/repos/asf/jena/blob/45ab88f9/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/package-info.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/package-info.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/package-info.java
index 97a5dca..2f66381 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/package-info.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/journaling/package-info.java
@@ -16,8 +16,4 @@
* limitations under the License.
*/
-/**
- * Types for journaling {@link org.apache.jena.query.Dataset} operation.
- *
- */
package org.apache.jena.sparql.core.journaling;
\ No newline at end of file