[
https://issues.apache.org/jira/browse/JENA-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307538#comment-16307538
]
ASF GitHub Bot commented on JENA-1458:
--------------------------------------
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/336#discussion_r159162566
--- Diff: jena-arq/src/main/java/org/apache/jena/query/TxnType.java ---
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.query;
+
+import java.util.Objects;
+
+import org.apache.jena.sparql.JenaTransactionException;
+
+public enum TxnType {
+ /** Transaction mode:
+ * <ul>
+ * <li>{@code WRITE}: this gaurantees a WRITE will complete if {@code
commit()} is
+ * called. The same as {@code begin(ReadWrite.WRITE)}.
+ *
+ * <li>{@code READ}: the transaction can not promote to WRITE,ensuring
read-only
+ * access to the data. The same as {@code begin(ReadWrite.READ)}.
+ *
+ * <li>{@code READ_PROMOTE}: the transaction will go from "read" to
"write" if the
+ * dataset has not been modified but if it has, the promotion fails
with
+ * exception.
+ *
+ * <li>{@code READ_COMMITTED_PROMOTE}: Use this with care. The
promotion will succeed but
+ * changes from oher transactions become visible.
+ * </ul>
+ *
+ * Read committed: at the point transaction attempts promotion from
"read" to
+ * "write", the sytem checks if the datset has chnage since the
trsnaction started
+ * (called {@code begin}). If {@code READ_PROMOTE}, the dataset must
not have
+ * changed; if {@code READ_COMMITTED_PROMOTE} anyh intermediate
changes are
--- End diff --
typo : `anyh` -> `any`
> Transaction promotion
> ---------------------
>
> Key: JENA-1458
> URL: https://issues.apache.org/jira/browse/JENA-1458
> Project: Apache Jena
> Issue Type: Improvement
> Affects Versions: Jena 3.6.0
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
>
> Expose the transaction promotion capabilities of TIM, TDB, and TDB2.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)