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 2011/05/31 18:15:43 UTC
svn commit: r1129773 - in /incubator/jena/Experimental/TxTDB/trunk:
src-dev/tx/ src-dev/tx/transaction/
src/main/java/com/hp/hpl/jena/tdb/base/file/
src/main/java/com/hp/hpl/jena/tdb/base/objectfile/
src/main/java/com/hp/hpl/jena/tdb/transaction/ src/t...
Author: andy
Date: Tue May 31 16:15:42 2011
New Revision: 1129773
URL: http://svn.apache.org/viewvc?rev=1129773&view=rev
Log: (empty)
Added:
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ByteBufferTest.java (with props)
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager_X.java (contents, props changed)
- copied, changed from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager.java
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileTrans.java (contents, props changed)
- copied, changed from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ObjectFileTrans.java
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TDBTransactionException.java (with props)
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java (with props)
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionAbort.java (with props)
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java (with props)
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transactional.java (contents, props changed)
- copied, changed from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/Transactional.java
incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/AbstractTestObjectFileTrans.java (contents, props changed)
- copied, changed from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/AbstractTestObjectFileTrans.java
incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransMem.java (contents, props changed)
- copied, changed from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransMem.java
incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransStorage.java (contents, props changed)
- copied, changed from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransStorage.java
incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/
incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TS_Transaction.java (with props)
Removed:
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/AbstractTestObjectFileTrans.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ObjectFileTrans.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransMem.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransStorage.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/Transactional.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionAbort.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionException.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager.java
Modified:
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/BlockMgrJournal.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/DevTx.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TxMain.java
incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/Transaction.java
incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/file/BufferChannel.java
incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/TC_TDB.java
incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TS_ObjectFile.java
Modified: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/BlockMgrJournal.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/BlockMgrJournal.java?rev=1129773&r1=1129772&r2=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/BlockMgrJournal.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/BlockMgrJournal.java Tue May 31 16:15:42 2011
@@ -21,10 +21,10 @@ import tx.transaction.Transaction ;
import com.hp.hpl.jena.tdb.base.block.Block ;
import com.hp.hpl.jena.tdb.base.block.BlockMgr ;
+import com.hp.hpl.jena.tdb.transaction.Transactional ;
-public class BlockMgrJournal implements BlockMgr
+public class BlockMgrJournal implements BlockMgr, Transactional
{
-
private BlockMgr blockMgr ; // read-only except during journal checkpoint.
private Journal journal ;
private Transaction transaction ;
@@ -41,13 +41,27 @@ public class BlockMgrJournal implements
reset(txn, fileRef, underlyingBlockMgr, journal) ;
}
- public Iterator<Block> updatedBlocks() { return writeBlocks.values().iterator() ; }
- public Iterator<Block> freedBlocks() { return freedBlocks.values().iterator() ; }
+ @Override
+ public void begin(Transaction txn)
+ {
+ reset(txn, fileRef, blockMgr, journal) ;
+ }
+
+ @Override
+ public void commit(Transaction txn)
+ {}
+
+ @Override
+ public void abort(Transaction txn)
+ {}
+
+// public Iterator<Block> updatedBlocks() { return writeBlocks.values().iterator() ; }
+// public Iterator<Block> freedBlocks() { return freedBlocks.values().iterator() ; }
/** Set, or reset, this BlockMgr.
* Enables it to be reused when already part of a datastructure.
*/
- public void reset(Transaction txn, FileRef fileRef, BlockMgr underlyingBlockMgr, Journal journal)
+ private void reset(Transaction txn, FileRef fileRef, BlockMgr underlyingBlockMgr, Journal journal)
{
this.transaction = txn ;
this.fileRef = fileRef ;
Added: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ByteBufferTest.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ByteBufferTest.java?rev=1129773&view=auto
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ByteBufferTest.java (added)
+++ incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ByteBufferTest.java Tue May 31 16:15:42 2011
@@ -0,0 +1,60 @@
+package tx ;
+import java.nio.ByteBuffer;
+
+import org.junit.Test;
+
+
+public class ByteBufferTest {
+ //@Test
+ public void direct0() {
+ testDirect("direct0");
+ }
+ @Test
+ public void heap1() {
+ testHeap("heap1");
+ }
+
+ @Test
+ public void direct1() {
+ testDirect("direct1");
+ }
+
+ @Test
+ public void heap2() {
+ testHeap("heap2");
+ }
+
+ @Test
+ public void direct2() {
+ testDirect("direct2");
+ }
+
+ private void testHeap(String name) {
+ ByteBuffer buf = ByteBuffer.allocate(2048);
+ long startTime = System.currentTimeMillis();
+ for (int i = 1048576; i > 0; i --) {
+ buf.clear();
+ while (buf.hasRemaining()) {
+ buf.getInt(buf.position());
+ buf.putInt((byte) 0);
+ }
+ }
+ long endTime = System.currentTimeMillis();
+ System.out.println(name + ": " + (endTime - startTime));
+ }
+
+ private void testDirect(String name) {
+ ByteBuffer buf = ByteBuffer.allocateDirect(2048);
+ long startTime = System.currentTimeMillis();
+ for (int i = 1048576; i > 0; i --) {
+ buf.clear();
+ while (buf.hasRemaining()) {
+ buf.getInt(buf.position());
+ buf.putInt((byte) 0);
+ }
+ }
+ long endTime = System.currentTimeMillis();
+ System.out.println(name + ": " + (endTime - startTime));
+ }
+
+}
\ No newline at end of file
Propchange: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ByteBufferTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/DevTx.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/DevTx.java?rev=1129773&r1=1129772&r2=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/DevTx.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/DevTx.java Tue May 31 16:15:42 2011
@@ -1,10 +1,12 @@
package tx;
-
public class DevTx
{
// TestObjectFileTrans -- more tests.
// TestObjectFileBuffering --> make abstract, it stress tests the BufferChannel.
+ // ByteBuffer.allocateDirect + pooling
+ // http://mail-archives.apache.org/mod_mbox/mina-dev/200804.mbox/%3C47F90DF0.6050101@gmail.com%3E
+ // http://mail-archives.apache.org/mod_mbox/mina-dev/200804.mbox/%3Cloom.20080407T064019-708@post.gmane.org%3E
// One transaction dataset - reuse. Pool?
// Create the one transaction dadaset when the datasetgraph itself is created
Modified: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TxMain.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TxMain.java?rev=1129773&r1=1129772&r2=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TxMain.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TxMain.java Tue May 31 16:15:42 2011
@@ -25,7 +25,8 @@ import org.slf4j.LoggerFactory ;
import tx.journal.Journal ;
import tx.journal.JournalEntry ;
import tx.journal.JournalEntryType ;
-import tx.transaction.TransactionManager ;
+import tx.transaction.Transaction ;
+import tx.transaction.TransactionManager_X ;
import com.hp.hpl.jena.query.DatasetFactory ;
import com.hp.hpl.jena.query.Query ;
@@ -43,6 +44,7 @@ import com.hp.hpl.jena.tdb.base.block.Bl
import com.hp.hpl.jena.tdb.base.file.Location ;
import com.hp.hpl.jena.tdb.base.objectfile.ObjectFile ;
import com.hp.hpl.jena.tdb.base.objectfile.ObjectFileMem ;
+import com.hp.hpl.jena.tdb.base.objectfile.ObjectFileTrans ;
import com.hp.hpl.jena.tdb.base.record.Record ;
import com.hp.hpl.jena.tdb.base.record.RecordFactory ;
import com.hp.hpl.jena.tdb.base.record.RecordLib ;
@@ -81,8 +83,11 @@ public class TxMain
long x1 = file1.write(stringToBuffer("ABCDEF")) ;
long x2 = file1.write(stringToBuffer("AABBCC")) ;
+ Transaction txn = new Transaction(57, null) ;
+
ObjectFile file2 = new ObjectFileMem() ;
ObjectFileTrans file = new ObjectFileTrans(null, file1, file2) ;
+ file.begin(txn) ;
ByteBuffer bb = stringToBuffer("XYZ") ;
file.write(bb) ;
@@ -93,7 +98,7 @@ public class TxMain
dump(file2) ;
System.out.println("commit") ;
- file.commit() ;
+ file.commit(txn) ;
System.out.println("file1:") ;
dump(file1) ;
System.out.println("file2:") ;
@@ -116,7 +121,7 @@ public class TxMain
//
//
System.out.println("begin") ;
- file.begin() ;
+ file.begin(txn) ;
System.out.println("file1:") ;
dump(file1) ;
file.write(stringToBuffer("12")) ;
@@ -132,7 +137,7 @@ public class TxMain
dump(file1) ;
System.out.println("commit") ;
- file.commit();
+ file.commit(txn);
System.out.println("file1:") ;
dump(file1) ;
System.out.println("file2:") ;
@@ -417,7 +422,7 @@ public class TxMain
} else
location = Location.mem() ;
- TransactionManager txnMgr = new TransactionManager() ;
+ TransactionManager_X txnMgr = new TransactionManager_X() ;
DatasetGraphTDB dsg = txnMgr.build(location) ;
//dsg.add(SSE.parseQuad("(_ <s> <p> 'o')")) ;
Modified: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/Transaction.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/Transaction.java?rev=1129773&r1=1129772&r2=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/Transaction.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/Transaction.java Tue May 31 16:15:42 2011
@@ -15,10 +15,10 @@ import java.util.List ;
public class Transaction
{
private final long id ;
- private final TransactionManager txnMgr ;
+ private final TransactionManager_X txnMgr ;
private final List<Iterator<?>> iterators ;
- public Transaction(long id, TransactionManager txnMgr)
+ public Transaction(long id, TransactionManager_X txnMgr)
{
this.id = id ;
this.txnMgr = txnMgr ;
@@ -28,7 +28,7 @@ public class Transaction
public void commit() { txnMgr.commit(this) ; }
public void abort() { txnMgr.abort(this) ; }
public long getTxnId() { return id ; }
- public TransactionManager getTxnMgr() { return txnMgr ; }
+ public TransactionManager_X getTxnMgr() { return txnMgr ; }
public void addIterator(Iterator<?> iter) { iterators.add(iter) ; }
public void removeIterator(Iterator<?> iter) { iterators.remove(iter) ; }
Copied: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager_X.java (from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager_X.java?p2=incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager_X.java&p1=incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager.java&r1=1129527&r2=1129773&rev=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager_X.java Tue May 31 16:15:42 2011
@@ -44,7 +44,7 @@ import com.hp.hpl.jena.tdb.store.QuadTab
import com.hp.hpl.jena.tdb.store.TripleTable ;
import com.hp.hpl.jena.tdb.sys.ConcurrencyPolicy ;
-public class TransactionManager
+public class TransactionManager_X
{
// Setup.
// Fragile.
@@ -53,7 +53,7 @@ public class TransactionManager
NodeTable nodeTable ;
static long transactionId = 10 ;
- public TransactionManager()
+ public TransactionManager_X()
{
baseDatasetBuilder = new DatasetBuilderTxnBase() ;
baseDatasetBuilder.setStd() ;
@@ -81,10 +81,16 @@ public class TransactionManager
DatasetBuilder x = new DatasetBuilderTxn(baseBlockMgrBuilder, nodeTable) ;
DatasetGraph dsg2 = x.build(Location.mem(), null) ;
- Transaction txn = new Transaction(transactionId++, this) ;
+ Transaction txn = createTransaction() ;
return new DatasetGraphTxView(txn, dsg2) ;
}
+ public Transaction createTransaction()
+ {
+ Transaction txn = new Transaction(transactionId++, this) ;
+ return txn ;
+ }
+
public void commit(Transaction transaction)
{
System.err.println("Commit") ;
Propchange: incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/transaction/TransactionManager_X.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/file/BufferChannel.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/file/BufferChannel.java?rev=1129773&r1=1129772&r2=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/file/BufferChannel.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/file/BufferChannel.java Tue May 31 16:15:42 2011
@@ -32,6 +32,7 @@ public interface BufferChannel extends S
{
// This is a simple, low level "file = array of bytes" interface"
// This interface does not support slicing - so it's not suitable for memory mapped I/O
+ // TODO Consider use of allocateDirect
/** return the position */
public long position() ;
Copied: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileTrans.java (from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ObjectFileTrans.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileTrans.java?p2=incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileTrans.java&p1=incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ObjectFileTrans.java&r1=1129527&r2=1129773&rev=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/ObjectFileTrans.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileTrans.java Tue May 31 16:15:42 2011
@@ -4,7 +4,7 @@
* [See end of file]
*/
-package tx;
+package com.hp.hpl.jena.tdb.base.objectfile;
import java.nio.ByteBuffer ;
import java.util.Iterator ;
@@ -12,48 +12,49 @@ import java.util.Iterator ;
import org.openjena.atlas.iterator.Iter ;
import org.openjena.atlas.lib.Pair ;
import org.openjena.atlas.lib.StrUtils ;
-import tx.journal.Journal ;
+import tx.transaction.Transaction ;
import com.hp.hpl.jena.tdb.base.block.Block ;
import com.hp.hpl.jena.tdb.base.file.FileException ;
-import com.hp.hpl.jena.tdb.base.objectfile.ObjectFile ;
+import com.hp.hpl.jena.tdb.transaction.TDBTransactionException ;
+import com.hp.hpl.jena.tdb.transaction.Transactional ;
public class ObjectFileTrans implements ObjectFile, Transactional
{
- private final Journal journal ;
private final ObjectFile other ;
private long startAlloc ;
private long alloc ;
private boolean passthrough = false ;
+ private boolean inTransaction = false ;
private final ObjectFile base ;
// For recovery replay, we need to truncate "base" first.
- public ObjectFileTrans(Journal journal, ObjectFile base, ObjectFile other)
+ public ObjectFileTrans(Transaction txn, ObjectFile base, ObjectFile other)
{
// The other object file must use the same allocation policy.
- this.journal = journal ;
this.base = base ;
this.other = other ;
- this.alloc = base.length() ;
- this.startAlloc = base.length() ;
- begin() ;
+ inTransaction = false ;
}
// Begin read ==> passthrough.
@Override
- public void begin()
+ public void begin(Transaction txn)
{
passthrough = false ;
+ inTransaction = true ;
other.reposition(0) ;
this.alloc = base.length() ;
this.startAlloc = base.length() ;
}
@Override
- public void commit()
+ public void commit(Transaction txn)
{
+ if ( ! inTransaction )
+ throw new TDBTransactionException("Not in a transaction for a commit to happen") ;
append() ;
base.sync() ;
other.reposition(0) ;
@@ -61,7 +62,7 @@ public class ObjectFileTrans implements
}
@Override
- public void abort()
+ public void abort(Transaction txn)
{
other.reposition(0) ;
}
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/base/objectfile/ObjectFileTrans.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TDBTransactionException.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TDBTransactionException.java?rev=1129773&view=auto
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TDBTransactionException.java (added)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TDBTransactionException.java Tue May 31 16:15:42 2011
@@ -0,0 +1,44 @@
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ * [See end of file]
+ */
+
+package com.hp.hpl.jena.tdb.transaction;
+
+import com.hp.hpl.jena.tdb.TDBException ;
+
+public class TDBTransactionException extends TDBException
+{
+ public TDBTransactionException() { super() ; }
+ public TDBTransactionException(String msg) { super(msg) ; }
+ public TDBTransactionException(Throwable th) { super(th) ; }
+ public TDBTransactionException(String msg, Throwable th) { super(msg, th) ; }
+}
+
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TDBTransactionException.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java?rev=1129773&view=auto
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java (added)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java Tue May 31 16:15:42 2011
@@ -0,0 +1,63 @@
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ * [See end of file]
+ */
+
+package com.hp.hpl.jena.tdb.transaction;
+
+import java.util.ArrayList ;
+import java.util.Collections ;
+import java.util.Iterator ;
+import java.util.List ;
+
+/** A transaction handle */
+public class Transaction
+{
+ private final long id ;
+ private final TransactionManager txnMgr ;
+ private final List<Iterator<?>> iterators ;
+
+ public Transaction(long id, TransactionManager txnMgr)
+ {
+ this.id = id ;
+ this.txnMgr = txnMgr ;
+ this.iterators = new ArrayList<Iterator<?>>() ;
+ }
+
+ public void commit() { txnMgr.commit(this) ; }
+ public void abort() { txnMgr.abort(this) ; }
+ public long getTxnId() { return id ; }
+ public TransactionManager getTxnMgr() { return txnMgr ; }
+
+ public void addIterator(Iterator<?> iter) { iterators.add(iter) ; }
+ public void removeIterator(Iterator<?> iter) { iterators.remove(iter) ; }
+ public List<Iterator<?>> iterators() { return Collections.unmodifiableList(iterators) ; }
+}
+
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionAbort.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionAbort.java?rev=1129773&view=auto
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionAbort.java (added)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionAbort.java Tue May 31 16:15:42 2011
@@ -0,0 +1,42 @@
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ * [See end of file]
+ */
+
+package com.hp.hpl.jena.tdb.transaction ;
+
+public class TransactionAbort extends TDBTransactionException
+{
+ public TransactionAbort() { super() ; }
+ public TransactionAbort(String msg) { super(msg) ; }
+ public TransactionAbort(Throwable th) { super(th) ; }
+ public TransactionAbort(String msg, Throwable th) { super(msg, th) ; }
+}
+
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionAbort.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java?rev=1129773&view=auto
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java (added)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java Tue May 31 16:15:42 2011
@@ -0,0 +1,65 @@
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ * [See end of file]
+ */
+
+package com.hp.hpl.jena.tdb.transaction;
+
+
+public class TransactionManager
+{
+ static long transactionId = 10 ;
+
+ public TransactionManager()
+ {
+ }
+
+ public Transaction createTransaction()
+ {
+ Transaction txn = new Transaction(transactionId++, this) ;
+ return txn ;
+ }
+
+ public Transaction begin() { return createTransaction() ; }
+
+ public void commit(Transaction transaction)
+ {
+ System.err.println("Commit") ;
+ }
+
+ public void abort(Transaction transaction)
+ {
+ System.err.println("Abort") ;
+ // Release allocated blocks back to the
+ // Reset allocation id.
+ // Forget any free blocks as being free.
+ }
+}
+
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transactional.java (from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/Transactional.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transactional.java?p2=incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transactional.java&p1=incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/Transactional.java&r1=1129527&r2=1129773&rev=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/Transactional.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transactional.java Tue May 31 16:15:42 2011
@@ -4,14 +4,19 @@
* [See end of file]
*/
-package tx;
+package com.hp.hpl.jena.tdb.transaction;
+import tx.transaction.Transaction ;
+
+/** Interface that components of the transaction system implmement.
+ * This is not the public/application interface to transactions.
+ */
public interface Transactional
{
// version 1
- public void begin() ;
- public void commit() ;
- public void abort() ;
+ public void begin(Transaction txn) ;
+ public void commit(Transaction txn) ;
+ public void abort(Transaction txn) ;
/*
// version 2
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transactional.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/TC_TDB.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/TC_TDB.java?rev=1129773&r1=1129772&r2=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/TC_TDB.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/TC_TDB.java Tue May 31 16:15:42 2011
@@ -26,6 +26,7 @@ import com.hp.hpl.jena.tdb.solver.TS_Sol
import com.hp.hpl.jena.tdb.store.TS_Store ;
import com.hp.hpl.jena.tdb.sys.SystemTDB ;
import com.hp.hpl.jena.tdb.sys.TS_Sys ;
+import com.hp.hpl.jena.tdb.transaction.TS_Transaction ;
// Naming conventions.
// TS_* - Test sets: collections of testing files (Often Test*)
@@ -46,6 +47,7 @@ import com.hp.hpl.jena.tdb.sys.TS_Sys ;
, TS_TDBAssembler.class
, TS_Jena.class
, TS_Migrate.class
+ , TS_Transaction.class
} )
public class TC_TDB
Copied: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/AbstractTestObjectFileTrans.java (from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/AbstractTestObjectFileTrans.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/AbstractTestObjectFileTrans.java?p2=incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/AbstractTestObjectFileTrans.java&p1=incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/AbstractTestObjectFileTrans.java&r1=1129527&r2=1129773&rev=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/AbstractTestObjectFileTrans.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/AbstractTestObjectFileTrans.java Tue May 31 16:15:42 2011
@@ -4,7 +4,7 @@
* [See end of file]
*/
-package tx;
+package com.hp.hpl.jena.tdb.base.objectfile;
import java.nio.ByteBuffer ;
import java.util.Iterator ;
@@ -15,17 +15,23 @@ import org.junit.Test ;
import org.openjena.atlas.junit.BaseTest ;
import org.openjena.atlas.lib.Pair ;
import org.openjena.atlas.lib.StrUtils ;
-
-import com.hp.hpl.jena.tdb.base.objectfile.ObjectFile ;
+import tx.transaction.Transaction ;
public abstract class AbstractTestObjectFileTrans extends BaseTest
{
+ static long count = 0 ;
+ ObjectFile file1 ;
+ ObjectFile file2 ;
+ ObjectFileTrans file ;
+ Transaction txn ;
+
abstract ObjectFile createFile(String basename) ;
abstract void deleteFile(String basename) ;
@Before
public void setup()
{
+ txn = new Transaction(++count, null) ;
file1 = createFile("base") ;
file2 = createFile("log") ;
}
@@ -58,10 +64,7 @@ public abstract class AbstractTestObject
assertFalse(iter.hasNext()) ;
}
- ObjectFile file1 ;
- ObjectFile file2 ;
- ObjectFileTrans file ;
-
+
private void init() { file = new ObjectFileTrans(null, file1, file2) ; }
static void fill(ObjectFile file, String... contents)
@@ -81,9 +84,9 @@ public abstract class AbstractTestObject
fill(file1, "ABC") ;
init() ;
- contains(file1, "ABC") ;
+ file.begin(txn) ;
contains(file2) ;
- file.commit() ;
+ file.commit(txn) ;
contains(file1, "ABC") ;
}
@@ -91,11 +94,41 @@ public abstract class AbstractTestObject
{
fill(file1, "ABC") ;
init() ;
- write(file2, "X") ;
- file.commit() ;
+ file.begin(txn) ;
+ write(file, "X") ;
+ file.commit(txn) ;
contains(file1, "ABC", "X") ;
- }
+ }
+ @Test public void objFileTrans_04()
+ {
+ fill(file1, "ABC", "ABC") ;
+ init() ;
+ file.begin(txn) ;
+ write(file, "ABCDEFGHIJKLMNOPQRSTUVWXYZ") ;
+ file.commit(txn) ;
+ contains(file1, "ABC", "ABC", "ABCDEFGHIJKLMNOPQRSTUVWXYZ") ;
+ }
+
+ @Test public void objFileTrans_05()
+ {
+ fill(file1, "ABC") ;
+ init() ;
+ file.begin(txn) ;
+ write(file, "ABCDEF") ;
+ file.abort(txn) ;
+ contains(file1, "ABC") ;
+ }
+
+ @Test public void objFileTrans_06()
+ {
+ fill(file1, "ABC", "123") ;
+ init() ;
+ file.begin(txn) ;
+ write(file, "ABCDEFGHIJKLMNOPQRSTUVWXYZ") ;
+ file.abort(txn) ;
+ contains(file1, "ABC", "123") ;
+ }
}
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/AbstractTestObjectFileTrans.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TS_ObjectFile.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TS_ObjectFile.java?rev=1129773&r1=1129772&r2=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TS_ObjectFile.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TS_ObjectFile.java Tue May 31 16:15:42 2011
@@ -15,7 +15,9 @@ import org.junit.runners.Suite ;
, TestObjectFileDisk.class
, TestObjectFileBuffering.class
, TestStringFileMem.class
- , TestStringFileDisk.class
+ , TestStringFileDisk.class
+ , TestObjectFileTransMem.class
+ , TestObjectFileTransStorage.class
})
public class TS_ObjectFile
Copied: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransMem.java (from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransMem.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransMem.java?p2=incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransMem.java&p1=incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransMem.java&r1=1129527&r2=1129773&rev=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransMem.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransMem.java Tue May 31 16:15:42 2011
@@ -4,7 +4,7 @@
* [See end of file]
*/
-package tx;
+package com.hp.hpl.jena.tdb.base.objectfile;
import com.hp.hpl.jena.tdb.base.objectfile.ObjectFile ;
import com.hp.hpl.jena.tdb.base.objectfile.ObjectFileMem ;
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransMem.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransStorage.java (from r1129527, incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransStorage.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransStorage.java?p2=incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransStorage.java&p1=incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransStorage.java&r1=1129527&r2=1129773&rev=1129773&view=diff
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src-dev/tx/TestObjectFileTransStorage.java (original)
+++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransStorage.java Tue May 31 16:15:42 2011
@@ -4,7 +4,7 @@
* [See end of file]
*/
-package tx;
+package com.hp.hpl.jena.tdb.base.objectfile;
import com.hp.hpl.jena.tdb.base.file.BufferChannel ;
import com.hp.hpl.jena.tdb.base.file.BufferChannelMem ;
@@ -24,7 +24,8 @@ public class TestObjectFileTransStorage
// return new ObjectFileStorage(chan) ;
BufferChannel chan = new BufferChannelMem() ;
- return new ObjectFileStorage(chan) ;
+ // Small buffer
+ return new ObjectFileStorage(chan,10) ;
}
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/base/objectfile/TestObjectFileTransStorage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TS_Transaction.java
URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TS_Transaction.java?rev=1129773&view=auto
==============================================================================
--- incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TS_Transaction.java (added)
+++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TS_Transaction.java Tue May 31 16:15:42 2011
@@ -0,0 +1,46 @@
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ * [See end of file]
+ */
+
+package com.hp.hpl.jena.tdb.transaction;
+
+import org.junit.runner.RunWith ;
+import org.junit.runners.Suite ;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses( {
+
+})
+public class TS_Transaction
+{
+
+}
+
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file
Propchange: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/TS_Transaction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain