[prev in list] [next in list] [prev in thread] [next in thread]
List: slide-dev
Subject: cvs commit: jakarta-slide/src/share/org/apache/slide/common SlideToken.java
From: remm () apache ! org
Date: 2001-08-30 14:43:49
[Download RAW message or body]
remm 01/08/30 07:43:49
Modified: src/share/org/apache/slide/common SlideToken.java
Log:
- Add a new flag in the SlideToken, called 'ForceStoreEnlistment', which can
be used to tell Slide to always enlist the store on every operation (incl reads).
Of course, that will have a huge impact on performance, so it is only to be
used in some critical code sections (where it is very important to avoid
dirty reads).
Revision Changes Path
1.5 +38 -3 \
jakarta-slide/src/share/org/apache/slide/common/SlideToken.java
Index: SlideToken.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/SlideToken.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SlideToken.java 2001/05/14 06:42:49 1.4
+++ SlideToken.java 2001/08/30 14:43:49 1.5
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/SlideToken.java,v \
1.4 2001/05/14 06:42:49 remm Exp $
- * $Revision: 1.4 $
- * $Date: 2001/05/14 06:42:49 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/SlideToken.java,v \
1.5 2001/08/30 14:43:49 remm Exp $ + * $Revision: 1.5 $
+ * $Date: 2001/08/30 14:43:49 $
*
* ====================================================================
*
@@ -133,6 +133,14 @@
/**
+ * Always use a transaction for all operations. That will cause Slide to
+ * enlist the store in the current transaction for all operations,
+ * to be able to prevent dirty reads when doing complex updates.
+ */
+ private boolean forceStoreEnlistment = false;
+
+
+ /**
* Lock tokens.
*/
private Hashtable lockTokens = new Hashtable();
@@ -200,6 +208,33 @@
*/
public void setEnforceLockTokens(boolean enforceLockTokens) {
this.enforceLockTokens = enforceLockTokens;
+ }
+
+
+ /**
+ * Force store enlistment flag accessor. If true, that will cause Slide to
+ * enlist the store in the current transaction for all operations,
+ * to be able to prevent dirty reads when doing complex updates.
+ *
+ * @return boolean
+ */
+ public boolean isForceStoreEnlistment() {
+ return forceStoreEnlistment;
+ }
+
+
+ /**
+ * Force store enlistment flag mutator. If set to true, that will cause
+ * Slide to enlist the store in the current transaction for all
+ * operations, to be able to prevent dirty reads when doing complex
+ * updates. That value should be set to true only in some very specific
+ * critical sections of the code, as this would greatly decrease the
+ * ability of Slide to handle multiple concurrent requests.
+ *
+ * @param forceStoreEnlistment New flag value
+ */
+ public void setForceStoreEnlistment(boolean forceStoreEnlistment) {
+ this.forceStoreEnlistment = forceStoreEnlistment;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic