Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / store / raw / xact / TransactionId.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/store/raw/xact/TransactionId.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/store/raw/xact/TransactionId.java
new file mode 100644 (file)
index 0000000..93e08a4
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.store.raw.xact.TransactionId\r
+\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to you under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.store.raw.xact;\r
+\r
+import org.apache.derby.iapi.services.io.Formatable;\r
+\r
+/**\r
+       A transaction identifier that is only unique within a raw store, do not\r
+       ever pass this out of raw store.  During reboot, all transaction Ids that\r
+       have ever generated a log record will not be reused.  \r
+\r
+       However, if you put away the transaction Id of a read only transaction,\r
+       then the is no guarentee that the transactionId won't be reused when the\r
+       system reboots.  It is much safer to store away the ExternalTrasanctionId\r
+       rather than the transactionId.\r
+\r
+       The equals() method for TransactionId implements by value equality.\r
+\r
+       MT - immutable\r
+\r
+*/\r
+public interface TransactionId extends Formatable {\r
+\r
+       /** \r
+               Return the maximum number of bytes the transactionId will take\r
+               to store using writeExternal.\r
+       */\r
+       int getMaxStoredSize();\r
+\r
+       /* need to write a value based HashCode() method. */\r
+}\r