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 2017/10/03 19:34:34 UTC

[48/65] [abbrv] jena git commit: JENA-1397: Rename java packages

JENA-1397: Rename java packages


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3d456654
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3d456654
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3d456654

Branch: refs/heads/master
Commit: 3d456654feb2cf7617a85a5245c80b827900076f
Parents: 1dabea3
Author: Andy Seaborne <an...@apache.org>
Authored: Thu Sep 28 16:45:21 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Thu Sep 28 16:45:21 2017 +0100

----------------------------------------------------------------------
 jena-db/jena-dboe-base/pom.xml                  |    2 +
 .../org/apache/jena/dboe/DBOpEnvException.java  |   29 +
 .../apache/jena/dboe/base/StorageException.java |   27 +
 .../org/apache/jena/dboe/base/block/Block.java  |  166 ++
 .../jena/dboe/base/block/BlockException.java    |   29 +
 .../apache/jena/dboe/base/block/BlockMgr.java   |  100 ++
 .../jena/dboe/base/block/BlockMgrBase.java      |   52 +
 .../jena/dboe/base/block/BlockMgrBuilder.java   |   25 +
 .../dboe/base/block/BlockMgrBuilderStd.java     |   29 +
 .../jena/dboe/base/block/BlockMgrCache.java     |  326 ++++
 .../jena/dboe/base/block/BlockMgrFactory.java   |  151 ++
 .../dboe/base/block/BlockMgrFileAccess.java     |  169 ++
 .../jena/dboe/base/block/BlockMgrFreeChain.java |   84 +
 .../jena/dboe/base/block/BlockMgrLogger.java    |  181 +++
 .../jena/dboe/base/block/BlockMgrReadonly.java  |   45 +
 .../jena/dboe/base/block/BlockMgrSwitcher.java  |   40 +
 .../jena/dboe/base/block/BlockMgrSync.java      |  149 ++
 .../jena/dboe/base/block/BlockMgrTracker.java   |  414 +++++
 .../jena/dboe/base/block/BlockMgrWrapper.java   |  149 ++
 .../jena/dboe/base/block/BlockParams.java       |   27 +
 .../apache/jena/dboe/base/block/BlockType.java  |   68 +
 .../apache/jena/dboe/base/block/FileMode.java   |   27 +
 .../jena/dboe/base/buffer/BufferBase.java       |  263 +++
 .../jena/dboe/base/buffer/BufferException.java  |   27 +
 .../apache/jena/dboe/base/buffer/PtrBuffer.java |  125 ++
 .../jena/dboe/base/buffer/RecordBuffer.java     |  236 +++
 .../dboe/base/buffer/RecordBufferIterator.java  |   98 ++
 .../jena/dboe/base/file/AlreadyLocked.java      |   29 +
 .../jena/dboe/base/file/BinaryDataFile.java     |  100 ++
 .../jena/dboe/base/file/BinaryDataFileMem.java  |  115 ++
 .../base/file/BinaryDataFileRandomAccess.java   |  149 ++
 .../jena/dboe/base/file/BinaryDataFileSync.java |   83 +
 .../dboe/base/file/BinaryDataFileWrapper.java   |   68 +
 .../base/file/BinaryDataFileWriteBuffered.java  |  163 ++
 .../apache/jena/dboe/base/file/BlockAccess.java |   65 +
 .../jena/dboe/base/file/BlockAccessBase.java    |  176 ++
 .../dboe/base/file/BlockAccessByteArray.java    |  131 ++
 .../jena/dboe/base/file/BlockAccessDirect.java  |  131 ++
 .../jena/dboe/base/file/BlockAccessMapped.java  |  268 ++++
 .../jena/dboe/base/file/BlockAccessMem.java     |  189 +++
 .../jena/dboe/base/file/BufferChannel.java      |   96 ++
 .../jena/dboe/base/file/BufferChannelFile.java  |  172 ++
 .../jena/dboe/base/file/BufferChannelMem.java   |  241 +++
 .../jena/dboe/base/file/ChannelManager.java     |  115 ++
 .../jena/dboe/base/file/FileException.java      |   29 +
 .../apache/jena/dboe/base/file/FileFactory.java |   49 +
 .../org/apache/jena/dboe/base/file/FileSet.java |  116 ++
 .../apache/jena/dboe/base/file/Location.java    |  265 +++
 .../apache/jena/dboe/base/file/MetaFile.java    |  365 +++++
 .../jena/dboe/base/file/ProcessFileLock.java    |  215 +++
 .../jena/dboe/base/file/SegmentedMemBuffer.java |  280 ++++
 .../jena/dboe/base/page/BlockConverter.java     |   35 +
 .../org/apache/jena/dboe/base/page/Page.java    |   45 +
 .../apache/jena/dboe/base/page/PageBase.java    |   58 +
 .../jena/dboe/base/page/PageBlockMgr.java       |  213 +++
 .../apache/jena/dboe/base/record/Record.java    |  189 +++
 .../jena/dboe/base/record/RecordException.java  |   27 +
 .../jena/dboe/base/record/RecordFactory.java    |  184 +++
 .../jena/dboe/base/record/RecordMapper.java     |   31 +
 .../base/recordbuffer/RecordBufferPage.java     |  101 ++
 .../base/recordbuffer/RecordBufferPageBase.java |  106 ++
 .../base/recordbuffer/RecordBufferPageMgr.java  |   91 ++
 .../base/recordbuffer/RecordRangeIterator.java  |  162 ++
 .../java/org/apache/jena/dboe/jenax/Txn.java    |   42 +
 .../java/org/apache/jena/dboe/migrate/L.java    |  207 +++
 .../java/org/apache/jena/dboe/sys/FileLib.java  |   86 +
 .../java/org/apache/jena/dboe/sys/Names.java    |  151 ++
 .../org/apache/jena/dboe/sys/ProcessUtils.java  |  157 ++
 .../main/java/org/apache/jena/dboe/sys/Sys.java |   97 ++
 .../org/apache/jena/dboe/sys/SystemFile.java    |   24 +
 .../org/apache/jena/dboe/sys/SystemIndex.java   |  150 ++
 .../apache/jena/dboe/test/BufferTestLib.java    |   63 +
 .../org/apache/jena/dboe/test/RecordLib.java    |  110 ++
 .../org/seaborne/dboe/DBOpEnvException.java     |   29 -
 .../seaborne/dboe/base/StorageException.java    |   27 -
 .../org/seaborne/dboe/base/block/Block.java     |  166 --
 .../dboe/base/block/BlockException.java         |   29 -
 .../org/seaborne/dboe/base/block/BlockMgr.java  |  100 --
 .../seaborne/dboe/base/block/BlockMgrBase.java  |   52 -
 .../dboe/base/block/BlockMgrBuilder.java        |   25 -
 .../dboe/base/block/BlockMgrBuilderStd.java     |   29 -
 .../seaborne/dboe/base/block/BlockMgrCache.java |  326 ----
 .../dboe/base/block/BlockMgrFactory.java        |  151 --
 .../dboe/base/block/BlockMgrFileAccess.java     |  169 --
 .../dboe/base/block/BlockMgrFreeChain.java      |   84 -
 .../dboe/base/block/BlockMgrLogger.java         |  181 ---
 .../dboe/base/block/BlockMgrReadonly.java       |   45 -
 .../dboe/base/block/BlockMgrSwitcher.java       |   40 -
 .../seaborne/dboe/base/block/BlockMgrSync.java  |  149 --
 .../dboe/base/block/BlockMgrTracker.java        |  414 -----
 .../dboe/base/block/BlockMgrWrapper.java        |  149 --
 .../seaborne/dboe/base/block/BlockParams.java   |   27 -
 .../org/seaborne/dboe/base/block/BlockType.java |   69 -
 .../org/seaborne/dboe/base/block/FileMode.java  |   27 -
 .../seaborne/dboe/base/buffer/BufferBase.java   |  263 ---
 .../dboe/base/buffer/BufferException.java       |   27 -
 .../seaborne/dboe/base/buffer/PtrBuffer.java    |  125 --
 .../seaborne/dboe/base/buffer/RecordBuffer.java |  236 ---
 .../dboe/base/buffer/RecordBufferIterator.java  |   98 --
 .../seaborne/dboe/base/file/AlreadyLocked.java  |   29 -
 .../seaborne/dboe/base/file/BinaryDataFile.java |  100 --
 .../dboe/base/file/BinaryDataFileMem.java       |  115 --
 .../base/file/BinaryDataFileRandomAccess.java   |  149 --
 .../dboe/base/file/BinaryDataFileSync.java      |   83 -
 .../dboe/base/file/BinaryDataFileWrapper.java   |   68 -
 .../base/file/BinaryDataFileWriteBuffered.java  |  163 --
 .../seaborne/dboe/base/file/BlockAccess.java    |   65 -
 .../dboe/base/file/BlockAccessBase.java         |  176 --
 .../dboe/base/file/BlockAccessByteArray.java    |  130 --
 .../dboe/base/file/BlockAccessDirect.java       |  131 --
 .../dboe/base/file/BlockAccessMapped.java       |  268 ----
 .../seaborne/dboe/base/file/BlockAccessMem.java |  189 ---
 .../seaborne/dboe/base/file/BufferChannel.java  |   96 --
 .../dboe/base/file/BufferChannelFile.java       |  172 --
 .../dboe/base/file/BufferChannelMem.java        |  241 ---
 .../seaborne/dboe/base/file/ChannelManager.java |  115 --
 .../seaborne/dboe/base/file/FileException.java  |   29 -
 .../seaborne/dboe/base/file/FileFactory.java    |   49 -
 .../org/seaborne/dboe/base/file/FileSet.java    |  116 --
 .../org/seaborne/dboe/base/file/Location.java   |  265 ---
 .../org/seaborne/dboe/base/file/MetaFile.java   |  365 -----
 .../dboe/base/file/ProcessFileLock.java         |  215 ---
 .../dboe/base/file/SegmentedMemBuffer.java      |  280 ----
 .../seaborne/dboe/base/page/BlockConverter.java |   35 -
 .../java/org/seaborne/dboe/base/page/Page.java  |   45 -
 .../org/seaborne/dboe/base/page/PageBase.java   |   58 -
 .../seaborne/dboe/base/page/PageBlockMgr.java   |  213 ---
 .../org/seaborne/dboe/base/record/Record.java   |  189 ---
 .../dboe/base/record/RecordException.java       |   27 -
 .../dboe/base/record/RecordFactory.java         |  184 ---
 .../seaborne/dboe/base/record/RecordMapper.java |   31 -
 .../base/recordbuffer/RecordBufferPage.java     |  101 --
 .../base/recordbuffer/RecordBufferPageBase.java |  106 --
 .../base/recordbuffer/RecordBufferPageMgr.java  |   91 --
 .../base/recordbuffer/RecordRangeIterator.java  |  162 --
 .../main/java/org/seaborne/dboe/jenax/Txn.java  |   42 -
 .../main/java/org/seaborne/dboe/migrate/L.java  |  207 ---
 .../java/org/seaborne/dboe/sys/FileLib.java     |   86 -
 .../main/java/org/seaborne/dboe/sys/Names.java  |  151 --
 .../org/seaborne/dboe/sys/ProcessUtils.java     |  157 --
 .../main/java/org/seaborne/dboe/sys/Sys.java    |   97 --
 .../java/org/seaborne/dboe/sys/SystemFile.java  |   24 -
 .../java/org/seaborne/dboe/sys/SystemIndex.java |  150 --
 .../org/seaborne/dboe/test/BufferTestLib.java   |   63 -
 .../java/org/seaborne/dboe/test/RecordLib.java  |  110 --
 .../org/apache/jena/dboe/ConfigTestDBOE.java    |   77 +
 .../java/org/apache/jena/dboe/TC_DBOE_IO.java   |   61 +
 .../dboe/base/block/AbstractTestBlockMgr.java   |  134 ++
 .../apache/jena/dboe/base/block/TS_Block.java   |   34 +
 .../dboe/base/block/TestBlockMgrDirect.java     |   49 +
 .../dboe/base/block/TestBlockMgrMapped.java     |   64 +
 .../jena/dboe/base/block/TestBlockMgrMem.java   |   31 +
 .../dboe/base/block/TestBlockMgrTracked.java    |  142 ++
 .../apache/jena/dboe/base/buffer/TS_Buffer.java |   32 +
 .../jena/dboe/base/buffer/TestPtrBuffer.java    |  318 ++++
 .../jena/dboe/base/buffer/TestRecordBuffer.java |  346 ++++
 .../base/file/AbstractTestBinaryDataFile.java   |   85 +
 .../file/AbstractTestBlockAccessFixedSize.java  |  104 ++
 .../file/AbstractTestBlockAccessVarSize.java    |   51 +
 .../dboe/base/file/AbstractTestChannel.java     |  145 ++
 .../org/apache/jena/dboe/base/file/TS_File.java |   49 +
 .../TestBinaryDataFileWriteBufferedFile.java    |   36 +
 .../TestBinaryDataFileWriteBufferedMem.java     |   32 +
 .../jena/dboe/base/file/TestBinaryDataMem.java  |   32 +
 .../jena/dboe/base/file/TestBinaryDataRAF.java  |   34 +
 .../base/file/TestBinaryDataRAFInitial.java     |   59 +
 .../base/file/TestBlockAccessByteArray.java     |   33 +
 .../dboe/base/file/TestBlockAccessDirect.java   |   45 +
 .../dboe/base/file/TestBlockAccessMapped.java   |   49 +
 .../jena/dboe/base/file/TestBlockAccessMem.java |   38 +
 .../jena/dboe/base/file/TestChannelFile.java    |   39 +
 .../jena/dboe/base/file/TestChannelMem.java     |   35 +
 .../jena/dboe/base/file/TestMetaFile.java       |   75 +
 .../dboe/base/file/TestProcessFileLock.java     |  108 ++
 .../dboe/base/file/TestSegmentedMemBuffer.java  |  160 ++
 .../apache/jena/dboe/base/record/TS_Record.java |   35 +
 .../jena/dboe/base/record/TestRecord.java       |   79 +
 .../dboe/base/recordfile/TS_RecordFile.java     |   32 +
 .../base/recordfile/TestRecordBufferPage.java   |  125 ++
 .../java/org/seaborne/dboe/ConfigTestDBOE.java  |   77 -
 .../test/java/org/seaborne/dboe/TC_DBOE_IO.java |   61 -
 .../dboe/base/block/AbstractTestBlockMgr.java   |  134 --
 .../org/seaborne/dboe/base/block/TS_Block.java  |   34 -
 .../dboe/base/block/TestBlockMgrDirect.java     |   49 -
 .../dboe/base/block/TestBlockMgrMapped.java     |   64 -
 .../dboe/base/block/TestBlockMgrMem.java        |   31 -
 .../dboe/base/block/TestBlockMgrTracked.java    |  142 --
 .../seaborne/dboe/base/buffer/TS_Buffer.java    |   32 -
 .../dboe/base/buffer/TestPtrBuffer.java         |  316 ----
 .../dboe/base/buffer/TestRecordBuffer.java      |  346 ----
 .../base/file/AbstractTestBinaryDataFile.java   |   84 -
 .../file/AbstractTestBlockAccessFixedSize.java  |  102 --
 .../file/AbstractTestBlockAccessVarSize.java    |   50 -
 .../dboe/base/file/AbstractTestChannel.java     |  145 --
 .../org/seaborne/dboe/base/file/TS_File.java    |   49 -
 .../TestBinaryDataFileWriteBufferedFile.java    |   36 -
 .../TestBinaryDataFileWriteBufferedMem.java     |   32 -
 .../dboe/base/file/TestBinaryDataMem.java       |   32 -
 .../dboe/base/file/TestBinaryDataRAF.java       |   34 -
 .../base/file/TestBinaryDataRAFInitial.java     |   58 -
 .../base/file/TestBlockAccessByteArray.java     |   33 -
 .../dboe/base/file/TestBlockAccessDirect.java   |   45 -
 .../dboe/base/file/TestBlockAccessMapped.java   |   49 -
 .../dboe/base/file/TestBlockAccessMem.java      |   38 -
 .../dboe/base/file/TestChannelFile.java         |   39 -
 .../seaborne/dboe/base/file/TestChannelMem.java |   35 -
 .../seaborne/dboe/base/file/TestMetaFile.java   |   75 -
 .../dboe/base/file/TestProcessFileLock.java     |  107 --
 .../dboe/base/file/TestSegmentedMemBuffer.java  |  159 --
 .../seaborne/dboe/base/record/TS_Record.java    |   35 -
 .../seaborne/dboe/base/record/TestRecord.java   |   78 -
 .../dboe/base/recordfile/TS_RecordFile.java     |   32 -
 .../base/recordfile/TestRecordBufferPage.java   |  125 --
 jena-db/jena-dboe-index-test/pom.xml            |    1 +
 .../org/apache/jena/dboe/index/TS_Index.java    |   30 +
 .../apache/jena/dboe/index/TestIndexMem.java    |   35 +
 .../jena/dboe/index/test/AbstractTestIndex.java |  161 ++
 .../dboe/index/test/AbstractTestRangeIndex.java |  435 +++++
 .../jena/dboe/index/test/BaseSoakTest.java      |  141 ++
 .../apache/jena/dboe/index/test/IndexMaker.java |   27 +
 .../dboe/index/test/IndexTestGenerator.java     |   45 +
 .../jena/dboe/index/test/IndexTestLib.java      |  219 +++
 .../jena/dboe/index/test/RangeIndexMaker.java   |   28 +
 .../java/org/seaborne/dboe/index/TS_Index.java  |   30 -
 .../org/seaborne/dboe/index/TestIndexMem.java   |   35 -
 .../dboe/index/test/AbstractTestIndex.java      |  160 --
 .../dboe/index/test/AbstractTestRangeIndex.java |  435 -----
 .../seaborne/dboe/index/test/BaseSoakTest.java  |  141 --
 .../seaborne/dboe/index/test/IndexMaker.java    |   27 -
 .../dboe/index/test/IndexTestGenerator.java     |   45 -
 .../seaborne/dboe/index/test/IndexTestLib.java  |  219 ---
 .../dboe/index/test/RangeIndexMaker.java        |   28 -
 .../java/org/apache/jena/dboe/index/Index.java  |   92 ++
 .../org/apache/jena/dboe/index/IndexChange.java |   40 +
 .../org/apache/jena/dboe/index/IndexConst.java  |   53 +
 .../org/apache/jena/dboe/index/IndexLogger.java |   65 +
 .../org/apache/jena/dboe/index/IndexMap.java    |  172 ++
 .../org/apache/jena/dboe/index/IndexParams.java |   38 +
 .../apache/jena/dboe/index/IndexWrapper.java    |   92 ++
 .../org/apache/jena/dboe/index/RangeIndex.java  |   39 +
 .../jena/dboe/index/RangeIndexLogger.java       |   72 +
 .../jena/dboe/index/RangeIndexWrapper.java      |  106 ++
 .../java/org/seaborne/dboe/index/Index.java     |   92 --
 .../org/seaborne/dboe/index/IndexChange.java    |   41 -
 .../org/seaborne/dboe/index/IndexConst.java     |   53 -
 .../org/seaborne/dboe/index/IndexLogger.java    |   65 -
 .../java/org/seaborne/dboe/index/IndexMap.java  |  172 --
 .../org/seaborne/dboe/index/IndexParams.java    |   38 -
 .../org/seaborne/dboe/index/IndexWrapper.java   |   92 --
 .../org/seaborne/dboe/index/RangeIndex.java     |   39 -
 .../seaborne/dboe/index/RangeIndexLogger.java   |   72 -
 .../seaborne/dboe/index/RangeIndexWrapper.java  |  106 --
 .../jena/dboe/trans/bplustree/AccessPath.java   |   70 +
 .../apache/jena/dboe/trans/bplustree/BPT.java   |  249 +++
 .../jena/dboe/trans/bplustree/BPTStateMgr.java  |   90 ++
 .../dboe/trans/bplustree/BPTreeException.java   |   27 +
 .../jena/dboe/trans/bplustree/BPTreeNode.java   | 1508 ++++++++++++++++++
 .../dboe/trans/bplustree/BPTreeNodeMgr.java     |  229 +++
 .../jena/dboe/trans/bplustree/BPTreePage.java   |  136 ++
 .../trans/bplustree/BPTreeRangeIterator.java    |  153 ++
 .../dboe/trans/bplustree/BPTreeRecords.java     |  389 +++++
 .../dboe/trans/bplustree/BPTreeRecordsMgr.java  |  116 ++
 .../jena/dboe/trans/bplustree/BPlusTree.java    |  545 +++++++
 .../dboe/trans/bplustree/BPlusTreeFactory.java  |  333 ++++
 .../dboe/trans/bplustree/BPlusTreeParams.java   |  237 +++
 .../dboe/trans/bplustree/BPlusTreeTools.java    |  149 ++
 .../jena/dboe/trans/bplustree/BlockTracker.java |  427 +++++
 .../jena/dboe/trans/bplustree/BptTxnState.java  |   64 +
 .../apache/jena/dboe/trans/bplustree/Mode.java  |   54 +
 .../bplustree/rewriter/BPTreeNodeBuilder.java   |  181 +++
 .../bplustree/rewriter/BPlusTreeRewriter.java   |  362 +++++
 .../rewriter/BPlusTreeRewriterUtils.java        |  105 ++
 .../rewriter/RecordBufferPageLinker.java        |   82 +
 .../rewriter/RecordBufferPagePacker.java        |   91 ++
 .../dboe/trans/data/TransBinaryDataFile.java    |  238 +++
 .../apache/jena/dboe/trans/data/TransBlob.java  |  210 +++
 .../dboe/trans/bplustree/AccessPath.java        |   70 -
 .../org/seaborne/dboe/trans/bplustree/BPT.java  |  249 ---
 .../dboe/trans/bplustree/BPTStateMgr.java       |   90 --
 .../dboe/trans/bplustree/BPTreeException.java   |   27 -
 .../dboe/trans/bplustree/BPTreeNode.java        | 1508 ------------------
 .../dboe/trans/bplustree/BPTreeNodeMgr.java     |  229 ---
 .../dboe/trans/bplustree/BPTreePage.java        |  136 --
 .../trans/bplustree/BPTreeRangeIterator.java    |  153 --
 .../dboe/trans/bplustree/BPTreeRecords.java     |  389 -----
 .../dboe/trans/bplustree/BPTreeRecordsMgr.java  |  116 --
 .../dboe/trans/bplustree/BPlusTree.java         |  545 -------
 .../dboe/trans/bplustree/BPlusTreeFactory.java  |  333 ----
 .../dboe/trans/bplustree/BPlusTreeParams.java   |  236 ---
 .../dboe/trans/bplustree/BPlusTreeTools.java    |  149 --
 .../dboe/trans/bplustree/BlockTracker.java      |  427 -----
 .../dboe/trans/bplustree/BptTxnState.java       |   64 -
 .../org/seaborne/dboe/trans/bplustree/Mode.java |   54 -
 .../bplustree/rewriter/BPTreeNodeBuilder.java   |  181 ---
 .../bplustree/rewriter/BPlusTreeRewriter.java   |  362 -----
 .../rewriter/BPlusTreeRewriterUtils.java        |  105 --
 .../rewriter/RecordBufferPageLinker.java        |   82 -
 .../rewriter/RecordBufferPagePacker.java        |   91 --
 .../dboe/trans/data/TransBinaryDataFile.java    |  238 ---
 .../org/seaborne/dboe/trans/data/TransBlob.java |  210 ---
 .../apache/jena/dboe/trans/TC_TransData.java    |   34 +
 .../dboe/trans/bplustree/BPlusTreeMaker.java    |   57 +
 .../jena/dboe/trans/bplustree/TS_TxnBPTree.java |   42 +
 .../dboe/trans/bplustree/TestBPTreeModes.java   |   79 +
 .../bplustree/TestBPTreeRecordsNonTxn.java      |  331 ++++
 .../bplustree/TestBPlusTreeIndexNonTxn.java     |   64 +
 .../trans/bplustree/TestBPlusTreeNonTxn.java    |   94 ++
 .../dboe/trans/bplustree/TestBPlusTreeTxn.java  |  208 +++
 .../rewriter/TestBPlusTreeRewriterNonTxn.java   |  181 +++
 .../trans/bplustree/soak/CmdTestBPlusTree.java  |  105 ++
 .../soak/CmdTestBPlusTreeRewriter.java          |   68 +
 .../jena/dboe/trans/data/TS_TransData.java      |   35 +
 .../trans/data/TestTransBinaryDataFile.java     |  221 +++
 .../data/TestTransBinaryDataFileGeneral.java    |   60 +
 .../jena/dboe/trans/data/TestTransBlob.java     |  131 ++
 .../trans/data/TestTransBlobPersistent.java     |  118 ++
 .../jena/dboe/trans/data/TestTransIndexMem.java |   35 +
 .../jena/dboe/trans/recovery/TestRecovery.java  |  127 ++
 .../org/seaborne/dboe/trans/TC_TransData.java   |   34 -
 .../dboe/trans/bplustree/BPlusTreeMaker.java    |   56 -
 .../dboe/trans/bplustree/TS_TxnBPTree.java      |   42 -
 .../dboe/trans/bplustree/TestBPTreeModes.java   |   78 -
 .../bplustree/TestBPTreeRecordsNonTxn.java      |  327 ----
 .../bplustree/TestBPlusTreeIndexNonTxn.java     |   61 -
 .../trans/bplustree/TestBPlusTreeNonTxn.java    |   91 --
 .../dboe/trans/bplustree/TestBPlusTreeTxn.java  |  206 ---
 .../rewriter/TestBPlusTreeRewriterNonTxn.java   |  180 ---
 .../trans/bplustree/soak/CmdTestBPlusTree.java  |  105 --
 .../soak/CmdTestBPlusTreeRewriter.java          |   68 -
 .../seaborne/dboe/trans/data/TS_TransData.java  |   35 -
 .../trans/data/TestTransBinaryDataFile.java     |  220 ---
 .../data/TestTransBinaryDataFileGeneral.java    |   59 -
 .../seaborne/dboe/trans/data/TestTransBlob.java |  130 --
 .../trans/data/TestTransBlobPersistent.java     |  117 --
 .../dboe/trans/data/TestTransIndexMem.java      |   35 -
 .../dboe/trans/recovery/TestRecovery.java       |  127 --
 .../dboe/transaction/ComponentIdRegistry.java   |   93 ++
 .../apache/jena/dboe/transaction/ThreadTxn.java |  144 ++
 .../jena/dboe/transaction/TransInteger.java     |  243 +++
 .../jena/dboe/transaction/TransLogger.java      |  152 ++
 .../jena/dboe/transaction/TransMonitor.java     |  192 +++
 .../jena/dboe/transaction/Transactional.java    |   99 ++
 .../dboe/transaction/TransactionalFactory.java  |   60 +
 .../dboe/transaction/TransactionalMonitor.java  |   39 +
 .../dboe/transaction/txn/ComponentGroup.java    |   78 +
 .../jena/dboe/transaction/txn/ComponentId.java  |  124 ++
 .../jena/dboe/transaction/txn/ComponentIds.java |   62 +
 .../jena/dboe/transaction/txn/PrepareState.java |   41 +
 .../dboe/transaction/txn/QuorumGenerator.java   |   28 +
 .../jena/dboe/transaction/txn/StateMgrBase.java |  176 ++
 .../jena/dboe/transaction/txn/StateMgrData.java |   88 +
 .../dboe/transaction/txn/StateMgrDataIdx.java   |   45 +
 .../jena/dboe/transaction/txn/SysTrans.java     |   53 +
 .../dboe/transaction/txn/SysTransState.java     |   36 +
 .../jena/dboe/transaction/txn/Transaction.java  |  295 ++++
 .../transaction/txn/TransactionCoordinator.java |  805 ++++++++++
 .../txn/TransactionCoordinatorState.java        |   34 +
 .../transaction/txn/TransactionException.java   |   30 +
 .../dboe/transaction/txn/TransactionInfo.java   |   77 +
 .../dboe/transaction/txn/TransactionalBase.java |  250 +++
 .../transaction/txn/TransactionalComponent.java |  176 ++
 .../txn/TransactionalComponentBase.java         |   77 +
 .../txn/TransactionalComponentLifecycle.java    |  481 ++++++
 .../txn/TransactionalComponentWrapper.java      |  108 ++
 .../dboe/transaction/txn/TransactionalMRSW.java |  137 ++
 .../transaction/txn/TransactionalSystem.java    |   83 +
 .../apache/jena/dboe/transaction/txn/TxnId.java |   64 +
 .../jena/dboe/transaction/txn/TxnIdFactory.java |   61 +
 .../dboe/transaction/txn/TxnIdGenerator.java    |   39 +
 .../jena/dboe/transaction/txn/TxnIdSimple.java  |   84 +
 .../jena/dboe/transaction/txn/TxnIdUuid.java    |  108 ++
 .../jena/dboe/transaction/txn/TxnState.java     |   22 +
 .../dboe/transaction/txn/journal/Journal.java   |  334 ++++
 .../transaction/txn/journal/JournalControl.java |  297 ++++
 .../transaction/txn/journal/JournalEntry.java   |   90 ++
 .../txn/journal/JournalEntryType.java           |   58 +
 .../jena/dboe/transaction/txn/package-info.java |   20 +
 .../dboe/transaction/ComponentIdRegistry.java   |   93 --
 .../seaborne/dboe/transaction/ThreadTxn.java    |  145 --
 .../seaborne/dboe/transaction/TransInteger.java |  243 ---
 .../seaborne/dboe/transaction/TransLogger.java  |  152 --
 .../seaborne/dboe/transaction/TransMonitor.java |  192 ---
 .../dboe/transaction/Transactional.java         |   99 --
 .../dboe/transaction/TransactionalFactory.java  |   60 -
 .../dboe/transaction/TransactionalMonitor.java  |   39 -
 .../dboe/transaction/txn/ComponentGroup.java    |   78 -
 .../dboe/transaction/txn/ComponentId.java       |  124 --
 .../dboe/transaction/txn/ComponentIds.java      |   62 -
 .../dboe/transaction/txn/PrepareState.java      |   41 -
 .../dboe/transaction/txn/QuorumGenerator.java   |   28 -
 .../dboe/transaction/txn/StateMgrBase.java      |  176 --
 .../dboe/transaction/txn/StateMgrData.java      |   88 -
 .../dboe/transaction/txn/StateMgrDataIdx.java   |   45 -
 .../seaborne/dboe/transaction/txn/SysTrans.java |   53 -
 .../dboe/transaction/txn/SysTransState.java     |   36 -
 .../dboe/transaction/txn/Transaction.java       |  295 ----
 .../transaction/txn/TransactionCoordinator.java |  805 ----------
 .../txn/TransactionCoordinatorState.java        |   34 -
 .../transaction/txn/TransactionException.java   |   30 -
 .../dboe/transaction/txn/TransactionInfo.java   |   76 -
 .../dboe/transaction/txn/TransactionalBase.java |  250 ---
 .../transaction/txn/TransactionalComponent.java |  176 --
 .../txn/TransactionalComponentBase.java         |   77 -
 .../txn/TransactionalComponentLifecycle.java    |  481 ------
 .../txn/TransactionalComponentWrapper.java      |  108 --
 .../dboe/transaction/txn/TransactionalMRSW.java |  137 --
 .../transaction/txn/TransactionalSystem.java    |   83 -
 .../seaborne/dboe/transaction/txn/TxnId.java    |   64 -
 .../dboe/transaction/txn/TxnIdFactory.java      |   61 -
 .../dboe/transaction/txn/TxnIdGenerator.java    |   39 -
 .../dboe/transaction/txn/TxnIdSimple.java       |   84 -
 .../dboe/transaction/txn/TxnIdUuid.java         |  109 --
 .../seaborne/dboe/transaction/txn/TxnState.java |   22 -
 .../dboe/transaction/txn/journal/Journal.java   |  334 ----
 .../transaction/txn/journal/JournalControl.java |  297 ----
 .../transaction/txn/journal/JournalEntry.java   |   90 --
 .../txn/journal/JournalEntryType.java           |   58 -
 .../dboe/transaction/txn/package-info.java      |   20 -
 .../jena/dboe/transaction/AbstractTestTxn.java  |   64 +
 .../jena/dboe/transaction/TS_Transactions.java  |   44 +
 .../jena/dboe/transaction/TestJournal.java      |  150 ++
 .../jena/dboe/transaction/TestStateMgrData.java |   76 +
 .../transaction/TestThreadingTransactions.java  |  122 ++
 .../transaction/TestTransactionCoordinator.java |  178 +++
 .../TestTransactionCoordinatorControl.java      |  144 ++
 .../transaction/TestTransactionLifecycle.java   |  261 +++
 .../transaction/TestTransactionLifecycle2.java  |  299 ++++
 .../apache/jena/dboe/transaction/TestTxnId.java |   53 +
 .../jena/dboe/transaction/TestTxnLib.java       |  199 +++
 .../jena/dboe/transaction/TestTxnLib2.java      |   66 +
 .../jena/dboe/transaction/TestTxnSwitching.java |  195 +++
 .../dboe/transaction/TransactionalInteger.java  |   61 +
 .../dboe/transaction/AbstractTestTxn.java       |   64 -
 .../dboe/transaction/TS_Transactions.java       |   44 -
 .../seaborne/dboe/transaction/TestJournal.java  |  150 --
 .../dboe/transaction/TestStateMgrData.java      |   76 -
 .../transaction/TestThreadingTransactions.java  |  121 --
 .../transaction/TestTransactionCoordinator.java |  178 ---
 .../TestTransactionCoordinatorControl.java      |  142 --
 .../transaction/TestTransactionLifecycle.java   |  262 ---
 .../transaction/TestTransactionLifecycle2.java  |  299 ----
 .../seaborne/dboe/transaction/TestTxnId.java    |   53 -
 .../seaborne/dboe/transaction/TestTxnLib.java   |  198 ---
 .../seaborne/dboe/transaction/TestTxnLib2.java  |   66 -
 .../dboe/transaction/TestTxnSwitching.java      |  193 ---
 .../dboe/transaction/TransactionalInteger.java  |   60 -
 jena-db/jena-fuseki-tdb2/pom.xml                |    6 +-
 .../org/apache/jena/cmd_x/FusekiTDB2Cmd.java    |   33 +
 .../org/seaborne/fuseki/cmd/FusekiTDB2Cmd.java  |   33 -
 jena-db/jena-tdb2-cmds/pom.xml                  |    2 +-
 .../src/main/java/tdb2/cmdline/CmdTDB.java      |    8 +-
 .../src/main/java/tdb2/cmdline/CmdTDBGraph.java |    2 +-
 .../src/main/java/tdb2/cmdline/ModLocation.java |    2 +-
 .../main/java/tdb2/cmdline/ModTDBAssembler.java |    2 +-
 .../main/java/tdb2/cmdline/ModTDBDataset.java   |    8 +-
 .../src/main/java/tdb2/tdbbackup.java           |    4 +-
 .../src/main/java/tdb2/tdbcompact.java          |    4 +-
 .../src/main/java/tdb2/tdbdump.java             |    2 +-
 .../src/main/java/tdb2/tdbstats.java            |   20 +-
 .../src/main/java/tdb2/tdbupdate.java           |    2 +-
 ...rg.apache.jena.system.JenaSubsystemLifecycle |    2 +-
 jena-db/jena-tdb2/pom.xml                       |   39 +-
 .../java/org/apache/jena/tdb2/DatabaseMgr.java  |  114 ++
 .../main/java/org/apache/jena/tdb2/TDB2.java    |  269 ++++
 .../java/org/apache/jena/tdb2/TDB2Factory.java  |  125 ++
 .../java/org/apache/jena/tdb2/TDBException.java |   29 +
 .../tdb2/assembler/DatasetAssemblerTDB.java     |   80 +
 .../jena/tdb2/assembler/TDBGraphAssembler.java  |  125 ++
 .../org/apache/jena/tdb2/assembler/Vocab.java   |   37 +
 .../apache/jena/tdb2/assembler/VocabTDB2.java   |   91 ++
 .../jena/tdb2/graph/TransactionHandlerTDB.java  |   61 +
 .../java/org/apache/jena/tdb2/lib/Async.java    |   85 +
 .../java/org/apache/jena/tdb2/lib/NodeLib.java  |  142 ++
 .../java/org/apache/jena/tdb2/lib/TupleLib.java |  155 ++
 .../org/apache/jena/tdb2/loader/Loader.java     |   79 +
 .../jena/tdb2/loader/StreamRDFBatchSplit.java   |  225 +++
 .../java/org/apache/jena/tdb2/migrate/A2.java   |   38 +
 .../jena/tdb2/migrate/TransformGraphRename.java |   54 +
 .../jena/tdb2/modify/UpdateEngineTDB.java       |   53 +
 .../apache/jena/tdb2/setup/ComponentIdMgr.java  |  102 ++
 .../org/apache/jena/tdb2/setup/StoreParams.java |  442 +++++
 .../jena/tdb2/setup/StoreParamsBuilder.java     |  309 ++++
 .../jena/tdb2/setup/StoreParamsCodec.java       |  190 +++
 .../jena/tdb2/setup/StoreParamsConst.java       |  105 ++
 .../jena/tdb2/setup/StoreParamsDynamic.java     |   54 +
 .../jena/tdb2/setup/StoreParamsFactory.java     |   94 ++
 .../org/apache/jena/tdb2/setup/TDBBuilder.java  |  291 ++++
 .../jena/tdb2/setup/TDBDatasetDetails.java      |   76 +
 .../org/apache/jena/tdb2/solver/Abortable.java  |   21 +
 .../apache/jena/tdb2/solver/BindingNodeId.java  |  113 ++
 .../org/apache/jena/tdb2/solver/BindingTDB.java |  155 ++
 .../apache/jena/tdb2/solver/OpExecutorTDB1.java |  428 +++++
 .../java/org/apache/jena/tdb2/solver/QC2.java   |   49 +
 .../apache/jena/tdb2/solver/QueryEngineTDB.java |  207 +++
 .../apache/jena/tdb2/solver/QueryIterTDB.java   |   59 +
 .../org/apache/jena/tdb2/solver/SolverLib.java  |  341 ++++
 .../tdb2/solver/StageGeneratorDirectTDB.java    |   58 +
 .../jena/tdb2/solver/StageMatchTuple.java       |  196 +++
 .../apache/jena/tdb2/solver/stats/Stats.java    |  138 ++
 .../jena/tdb2/solver/stats/StatsCollector.java  |   36 +
 .../tdb2/solver/stats/StatsCollectorBase.java   |   54 +
 .../tdb2/solver/stats/StatsCollectorNodeId.java |   56 +
 .../jena/tdb2/solver/stats/StatsResults.java    |   53 +
 .../jena/tdb2/store/DatasetGraphSwitchable.java |  204 +++
 .../apache/jena/tdb2/store/DatasetGraphTDB.java |  481 ++++++
 .../apache/jena/tdb2/store/DatasetGraphTxn.java |   35 +
 .../jena/tdb2/store/DatasetGraphWrapperTxn.java |   34 +
 .../jena/tdb2/store/DatasetPrefixesTDB.java     |  174 ++
 .../tdb2/store/GraphPrefixesProjectionTDB.java  |  164 ++
 .../org/apache/jena/tdb2/store/GraphTDB.java    |  181 +++
 .../jena/tdb2/store/GraphViewSwitchable.java    |  139 ++
 .../java/org/apache/jena/tdb2/store/Hash.java   |   57 +
 .../tdb2/store/IteratorCheckNotConcurrent.java  |   93 ++
 .../jena/tdb2/store/IteratorTxnTracker.java     |   55 +
 .../java/org/apache/jena/tdb2/store/NodeId.java |  219 +++
 .../apache/jena/tdb2/store/NodeIdFactory.java   |  261 +++
 .../apache/jena/tdb2/store/NodeIdInline.java    |  324 ++++
 .../org/apache/jena/tdb2/store/NodeIdType.java  |  260 +++
 .../jena/tdb2/store/PrefixMappingCache.java     |  203 +++
 .../org/apache/jena/tdb2/store/QuadTable.java   |   91 ++
 .../org/apache/jena/tdb2/store/StorageTDB.java  |   41 +
 .../org/apache/jena/tdb2/store/TableBase.java   |   49 +
 .../org/apache/jena/tdb2/store/TripleTable.java |   75 +
 .../jena/tdb2/store/nodetable/NodeTable.java    |   82 +
 .../tdb2/store/nodetable/NodeTableCache.java    |  353 ++++
 .../tdb2/store/nodetable/NodeTableInline.java   |   71 +
 .../tdb2/store/nodetable/NodeTableNative.java   |  215 +++
 .../jena/tdb2/store/nodetable/NodeTableOps.java |   51 +
 .../tdb2/store/nodetable/NodeTableTRDF.java     |  109 ++
 .../tdb2/store/nodetable/NodeTableWrapper.java  |   94 ++
 .../nodetable/TReadAppendFileTransport.java     |   86 +
 .../store/nodetupletable/NodeTupleTable.java    |   72 +
 .../nodetupletable/NodeTupleTableConcrete.java  |  241 +++
 .../nodetupletable/NodeTupleTableView.java      |  113 ++
 .../nodetupletable/NodeTupleTableWrapper.java   |   98 ++
 .../jena/tdb2/store/tupletable/TupleIndex.java  |   88 +
 .../tdb2/store/tupletable/TupleIndexBase.java   |  124 ++
 .../tdb2/store/tupletable/TupleIndexRecord.java |  238 +++
 .../TupleIndexRecordAsyncBulkAdd.java           |  263 +++
 .../store/tupletable/TupleIndexWrapper.java     |  118 ++
 .../jena/tdb2/store/tupletable/TupleTable.java  |  219 +++
 .../jena/tdb2/store/value/DateTimeNode.java     |  254 +++
 .../jena/tdb2/store/value/DecimalNode.java      |   23 +
 .../jena/tdb2/store/value/DecimalNode56.java    |  141 ++
 .../jena/tdb2/store/value/DoubleNode62.java     |  241 +++
 .../apache/jena/tdb2/store/value/FloatNode.java |   32 +
 .../jena/tdb2/store/value/IntegerNode.java      |   64 +
 .../apache/jena/tdb2/sys/ConnectionTracker.java |   23 +
 .../java/org/apache/jena/tdb2/sys/CopyDSG.java  |   53 +
 .../jena/tdb2/sys/DatabaseConnection.java       |  180 +++
 .../org/apache/jena/tdb2/sys/DatabaseOps.java   |  264 +++
 .../java/org/apache/jena/tdb2/sys/EnvTDB.java   |   62 +
 .../org/apache/jena/tdb2/sys/FilenameUtils.java |  102 ++
 .../main/java/org/apache/jena/tdb2/sys/IOX.java |  292 ++++
 .../java/org/apache/jena/tdb2/sys/InitTDB2.java |   41 +
 .../org/apache/jena/tdb2/sys/LockMRSWLite.java  |   70 +
 .../apache/jena/tdb2/sys/StoreConnection.java   |  195 +++
 .../org/apache/jena/tdb2/sys/SystemTDB.java     |  417 +++++
 .../org/apache/jena/tdb2/sys/TDBInternal.java   |  175 ++
 .../java/org/apache/jena/tdb2/sys/Util.java     |   49 +
 .../java/org/seaborne/tdb2/DatabaseMgr.java     |  114 --
 .../src/main/java/org/seaborne/tdb2/TDB2.java   |  269 ----
 .../java/org/seaborne/tdb2/TDB2Factory.java     |  125 --
 .../java/org/seaborne/tdb2/TDBException.java    |   29 -
 .../tdb2/assembler/DatasetAssemblerTDB.java     |   80 -
 .../tdb2/assembler/TDBGraphAssembler.java       |  125 --
 .../java/org/seaborne/tdb2/assembler/Vocab.java |   37 -
 .../org/seaborne/tdb2/assembler/VocabTDB2.java  |   91 --
 .../tdb2/graph/TransactionHandlerTDB.java       |   61 -
 .../main/java/org/seaborne/tdb2/lib/Async.java  |   85 -
 .../java/org/seaborne/tdb2/lib/NodeLib.java     |  142 --
 .../java/org/seaborne/tdb2/lib/TupleLib.java    |  155 --
 .../java/org/seaborne/tdb2/loader/Loader.java   |   79 -
 .../tdb2/loader/StreamRDFBatchSplit.java        |  225 ---
 .../main/java/org/seaborne/tdb2/migrate/A2.java |   38 -
 .../tdb2/migrate/TransformGraphRename.java      |   54 -
 .../seaborne/tdb2/modify/UpdateEngineTDB.java   |   53 -
 .../org/seaborne/tdb2/setup/ComponentIdMgr.java |  102 --
 .../org/seaborne/tdb2/setup/StoreParams.java    |  442 -----
 .../seaborne/tdb2/setup/StoreParamsBuilder.java |  309 ----
 .../seaborne/tdb2/setup/StoreParamsCodec.java   |  190 ---
 .../seaborne/tdb2/setup/StoreParamsConst.java   |  105 --
 .../seaborne/tdb2/setup/StoreParamsDynamic.java |   54 -
 .../seaborne/tdb2/setup/StoreParamsFactory.java |   94 --
 .../org/seaborne/tdb2/setup/TDBBuilder.java     |  291 ----
 .../seaborne/tdb2/setup/TDBDatasetDetails.java  |   76 -
 .../org/seaborne/tdb2/solver/Abortable.java     |   21 -
 .../org/seaborne/tdb2/solver/BindingNodeId.java |  113 --
 .../org/seaborne/tdb2/solver/BindingTDB.java    |  155 --
 .../seaborne/tdb2/solver/OpExecutorTDB1.java    |  428 -----
 .../main/java/org/seaborne/tdb2/solver/QC2.java |   49 -
 .../seaborne/tdb2/solver/QueryEngineTDB.java    |  207 ---
 .../org/seaborne/tdb2/solver/QueryIterTDB.java  |   59 -
 .../org/seaborne/tdb2/solver/SolverLib.java     |  341 ----
 .../tdb2/solver/StageGeneratorDirectTDB.java    |   58 -
 .../seaborne/tdb2/solver/StageMatchTuple.java   |  196 ---
 .../org/seaborne/tdb2/solver/stats/Stats.java   |  138 --
 .../tdb2/solver/stats/StatsCollector.java       |   36 -
 .../tdb2/solver/stats/StatsCollectorBase.java   |   54 -
 .../tdb2/solver/stats/StatsCollectorNodeId.java |   56 -
 .../tdb2/solver/stats/StatsResults.java         |   53 -
 .../tdb2/store/DatasetGraphSwitchable.java      |  204 ---
 .../seaborne/tdb2/store/DatasetGraphTDB.java    |  481 ------
 .../seaborne/tdb2/store/DatasetGraphTxn.java    |   35 -
 .../tdb2/store/DatasetGraphWrapperTxn.java      |   34 -
 .../seaborne/tdb2/store/DatasetPrefixesTDB.java |  174 --
 .../tdb2/store/GraphPrefixesProjectionTDB.java  |  164 --
 .../java/org/seaborne/tdb2/store/GraphTDB.java  |  181 ---
 .../tdb2/store/GraphViewSwitchable.java         |  139 --
 .../main/java/org/seaborne/tdb2/store/Hash.java |   57 -
 .../tdb2/store/IteratorCheckNotConcurrent.java  |   93 --
 .../seaborne/tdb2/store/IteratorTxnTracker.java |   55 -
 .../java/org/seaborne/tdb2/store/NodeId.java    |  220 ---
 .../org/seaborne/tdb2/store/NodeIdFactory.java  |  261 ---
 .../org/seaborne/tdb2/store/NodeIdInline.java   |  329 ----
 .../org/seaborne/tdb2/store/NodeIdType.java     |  260 ---
 .../seaborne/tdb2/store/PrefixMappingCache.java |  203 ---
 .../java/org/seaborne/tdb2/store/QuadTable.java |   91 --
 .../org/seaborne/tdb2/store/StorageTDB.java     |   41 -
 .../java/org/seaborne/tdb2/store/TableBase.java |   49 -
 .../org/seaborne/tdb2/store/TripleTable.java    |   75 -
 .../tdb2/store/nodetable/NodeTable.java         |   82 -
 .../tdb2/store/nodetable/NodeTableCache.java    |  353 ----
 .../tdb2/store/nodetable/NodeTableInline.java   |   71 -
 .../tdb2/store/nodetable/NodeTableNative.java   |  215 ---
 .../tdb2/store/nodetable/NodeTableOps.java      |   51 -
 .../tdb2/store/nodetable/NodeTableTRDF.java     |  109 --
 .../tdb2/store/nodetable/NodeTableWrapper.java  |   94 --
 .../nodetable/TReadAppendFileTransport.java     |   86 -
 .../store/nodetupletable/NodeTupleTable.java    |   72 -
 .../nodetupletable/NodeTupleTableConcrete.java  |  241 ---
 .../nodetupletable/NodeTupleTableView.java      |  113 --
 .../nodetupletable/NodeTupleTableWrapper.java   |   98 --
 .../tdb2/store/tupletable/TupleIndex.java       |   88 -
 .../tdb2/store/tupletable/TupleIndexBase.java   |  124 --
 .../tdb2/store/tupletable/TupleIndexRecord.java |  238 ---
 .../TupleIndexRecordAsyncBulkAdd.java           |  263 ---
 .../store/tupletable/TupleIndexWrapper.java     |  118 --
 .../tdb2/store/tupletable/TupleTable.java       |  219 ---
 .../seaborne/tdb2/store/value/DateTimeNode.java |  254 ---
 .../seaborne/tdb2/store/value/DecimalNode.java  |   23 -
 .../tdb2/store/value/DecimalNode56.java         |  141 --
 .../seaborne/tdb2/store/value/DoubleNode62.java |  241 ---
 .../seaborne/tdb2/store/value/FloatNode.java    |   32 -
 .../seaborne/tdb2/store/value/IntegerNode.java  |   64 -
 .../seaborne/tdb2/sys/ConnectionTracker.java    |   23 -
 .../java/org/seaborne/tdb2/sys/CopyDSG.java     |   53 -
 .../seaborne/tdb2/sys/DatabaseConnection.java   |  180 ---
 .../java/org/seaborne/tdb2/sys/DatabaseOps.java |  264 ---
 .../main/java/org/seaborne/tdb2/sys/EnvTDB.java |   62 -
 .../org/seaborne/tdb2/sys/FilenameUtils.java    |  102 --
 .../main/java/org/seaborne/tdb2/sys/IOX.java    |  292 ----
 .../java/org/seaborne/tdb2/sys/InitTDB2.java    |   41 -
 .../org/seaborne/tdb2/sys/LockMRSWLite.java     |   70 -
 .../org/seaborne/tdb2/sys/StoreConnection.java  |  195 ---
 .../java/org/seaborne/tdb2/sys/SystemTDB.java   |  417 -----
 .../java/org/seaborne/tdb2/sys/TDBInternal.java |  175 --
 .../main/java/org/seaborne/tdb2/sys/Util.java   |   49 -
 ...rg.apache.jena.system.JenaSubsystemLifecycle |    2 +-
 .../java/org/apache/jena/tdb2/ConfigTest.java   |   96 ++
 .../test/java/org/apache/jena/tdb2/TC_TDB.java  |   81 +
 .../java/org/apache/jena/tdb2/TS_Factory.java   |   33 +
 .../org/apache/jena/tdb2/TestDatabaseMgr.java   |   91 ++
 .../org/apache/jena/tdb2/TestTDBFactory.java    |  132 ++
 .../jena/tdb2/assembler/TS_TDBAssembler.java    |   33 +
 .../jena/tdb2/assembler/TestTDBAssembler.java   |  144 ++
 .../jena/tdb2/graph/AbstractTestGraphsTDB.java  |   51 +
 .../org/apache/jena/tdb2/graph/TS_Graph.java    |   36 +
 .../tdb2/graph/TestDatasetGraphAccessorTDB.java |   48 +
 .../jena/tdb2/graph/TestDatasetGraphTDB.java    |   53 +
 .../tdb2/graph/TestGraphOverDatasetTDB.java     |   64 +
 .../apache/jena/tdb2/graph/TestGraphsTDB1.java  |   43 +
 .../apache/jena/tdb2/graph/TestGraphsTDB2.java  |   52 +
 .../jena/tdb2/graph/TestPrefixMappingTDB.java   |  107 ++
 .../jena/tdb2/junit/AbstractTestGraphTDB.java   |   34 +
 .../org/apache/jena/tdb2/junit/Base_TS.java     |   52 +
 .../apache/jena/tdb2/junit/BuildTestLib.java    |   82 +
 .../apache/jena/tdb2/junit/QueryTestTDB.java    |  193 +++
 .../jena/tdb2/junit/TDBTestException.java       |   29 +
 .../java/org/apache/jena/tdb2/junit/TL.java     |   90 ++
 .../apache/jena/tdb2/junit/TestFactoryTDB.java  |   88 +
 .../org/apache/jena/tdb2/lib/TS_LibTDB.java     |   34 +
 .../org/apache/jena/tdb2/lib/TestNodeLib.java   |   70 +
 .../org/apache/jena/tdb2/setup/TS_TDBSetup.java |   33 +
 .../apache/jena/tdb2/setup/TestStoreParams.java |  146 ++
 .../jena/tdb2/setup/TestStoreParamsChoose.java  |  161 ++
 .../jena/tdb2/setup/TestStoreParamsCreate.java  |  183 +++
 .../apache/jena/tdb2/solver/TS_SolverTDB.java   |   31 +
 .../apache/jena/tdb2/solver/TestSolverTDB.java  |  172 ++
 .../org/apache/jena/tdb2/solver/TestStats.java  |  118 ++
 .../AbstractTestStoreConnectionBasics.java      |  188 +++
 .../store/AbstractTestTransPromoteTDB2.java     |   67 +
 .../org/apache/jena/tdb2/store/TS_Store.java    |   72 +
 .../apache/jena/tdb2/store/TestDatasetTDB.java  |  324 ++++
 .../jena/tdb2/store/TestDatasetTDBPersist.java  |  113 ++
 .../jena/tdb2/store/TestDynamicDatasetTDB.java  |   45 +
 .../jena/tdb2/store/TestGraphNamedTDB.java      |   61 +
 .../apache/jena/tdb2/store/TestGraphTDB.java    |   58 +
 .../org/apache/jena/tdb2/store/TestNodeId.java  |  132 ++
 .../apache/jena/tdb2/store/TestQuadFilter.java  |  113 ++
 .../tdb2/store/TestStoreConnectionDirect.java   |   48 +
 .../tdb2/store/TestStoreConnectionLock.java     |   72 +
 .../tdb2/store/TestStoreConnectionMapped.java   |   51 +
 .../jena/tdb2/store/TestStoreConnectionMem.java |   29 +
 .../jena/tdb2/store/TestSuiteGraphTDB.java      |   40 +
 .../jena/tdb2/store/TestTransPromoteTDB.java    |   72 +
 .../tdb2/store/TestTransactionLifecycleTDB.java |   34 +
 .../jena/tdb2/store/TestTransactions.java       |  205 +++
 .../apache/jena/tdb2/store/TestTripleTable.java |  137 ++
 .../apache/jena/tdb2/store/Test_SPARQL_TDB.java |  222 +++
 .../store/nodetable/AbstractTestNodeTable.java  |   68 +
 .../jena/tdb2/store/nodetable/TS_NodeTable.java |   34 +
 .../tdb2/store/nodetable/TestNodeTable.java     |   39 +
 .../tdb2/store/nodetable/TestNodeTableBase.java |   41 +
 .../store/nodetable/TestNodeTableStored.java    |   47 +
 .../nodetable/TestNodeTableStoredBase.java      |   48 +
 .../tupletable/AbstractTestTupleIndex.java      |  265 +++
 .../jena/tdb2/store/tupletable/NData.java       |   38 +
 .../tdb2/store/tupletable/TS_TupleTable.java    |   32 +
 .../store/tupletable/TestTupleIndexRecord.java  |   44 +
 .../tupletable/TestTupleIndexRecordDirect.java  |  316 ++++
 .../tdb2/store/tupletable/TestTupleTable.java   |  154 ++
 .../jena/tdb2/store/value/TestDoubleNode62.java |  123 ++
 .../jena/tdb2/store/value/TestNodeIdInline.java |  286 ++++
 .../java/org/apache/jena/tdb2/sys/TS_Sys.java   |   34 +
 .../jena/tdb2/sys/TestDatabaseConnection.java   |   70 +
 .../apache/jena/tdb2/sys/TestDatabaseOps.java   |  176 ++
 .../java/org/apache/jena/tdb2/sys/TestOps.java  |   32 +
 .../java/org/apache/jena/tdb2/sys/TestSys.java  |   34 +
 .../test/java/org/seaborne/tdb2/ConfigTest.java |   96 --
 .../src/test/java/org/seaborne/tdb2/TC_TDB.java |   81 -
 .../test/java/org/seaborne/tdb2/TS_Factory.java |   33 -
 .../java/org/seaborne/tdb2/TestDatabaseMgr.java |   90 --
 .../java/org/seaborne/tdb2/TestTDBFactory.java  |  131 --
 .../tdb2/assembler/TS_TDBAssembler.java         |   33 -
 .../tdb2/assembler/TestTDBAssembler.java        |  143 --
 .../tdb2/graph/AbstractTestGraphsTDB.java       |   51 -
 .../java/org/seaborne/tdb2/graph/TS_Graph.java  |   36 -
 .../tdb2/graph/TestDatasetGraphAccessorTDB.java |   48 -
 .../tdb2/graph/TestDatasetGraphTDB.java         |   53 -
 .../tdb2/graph/TestGraphOverDatasetTDB.java     |   64 -
 .../org/seaborne/tdb2/graph/TestGraphsTDB1.java |   43 -
 .../org/seaborne/tdb2/graph/TestGraphsTDB2.java |   52 -
 .../tdb2/graph/TestPrefixMappingTDB.java        |  107 --
 .../tdb2/junit/AbstractTestGraphTDB.java        |   34 -
 .../java/org/seaborne/tdb2/junit/Base_TS.java   |   52 -
 .../org/seaborne/tdb2/junit/BuildTestLib.java   |   82 -
 .../org/seaborne/tdb2/junit/QueryTestTDB.java   |  193 ---
 .../seaborne/tdb2/junit/TDBTestException.java   |   29 -
 .../test/java/org/seaborne/tdb2/junit/TL.java   |   90 --
 .../org/seaborne/tdb2/junit/TestFactoryTDB.java |   88 -
 .../java/org/seaborne/tdb2/lib/TS_LibTDB.java   |   34 -
 .../java/org/seaborne/tdb2/lib/TestNodeLib.java |   70 -
 .../org/seaborne/tdb2/setup/TS_TDBSetup.java    |   33 -
 .../seaborne/tdb2/setup/TestStoreParams.java    |  145 --
 .../tdb2/setup/TestStoreParamsChoose.java       |  158 --
 .../tdb2/setup/TestStoreParamsCreate.java       |  181 ---
 .../org/seaborne/tdb2/solver/TS_SolverTDB.java  |   31 -
 .../org/seaborne/tdb2/solver/TestSolverTDB.java |  172 --
 .../org/seaborne/tdb2/solver/TestStats.java     |  118 --
 .../AbstractTestStoreConnectionBasics.java      |  186 ---
 .../store/AbstractTestTransPromoteTDB2.java     |   67 -
 .../java/org/seaborne/tdb2/store/TS_Store.java  |   72 -
 .../org/seaborne/tdb2/store/TestDatasetTDB.java |  324 ----
 .../tdb2/store/TestDatasetTDBPersist.java       |  112 --
 .../tdb2/store/TestDynamicDatasetTDB.java       |   45 -
 .../seaborne/tdb2/store/TestGraphNamedTDB.java  |   61 -
 .../org/seaborne/tdb2/store/TestGraphTDB.java   |   58 -
 .../org/seaborne/tdb2/store/TestNodeId.java     |  128 --
 .../org/seaborne/tdb2/store/TestQuadFilter.java |  111 --
 .../tdb2/store/TestStoreConnectionDirect.java   |   48 -
 .../tdb2/store/TestStoreConnectionLock.java     |   71 -
 .../tdb2/store/TestStoreConnectionMapped.java   |   51 -
 .../tdb2/store/TestStoreConnectionMem.java      |   29 -
 .../seaborne/tdb2/store/TestSuiteGraphTDB.java  |   41 -
 .../tdb2/store/TestTransPromoteTDB.java         |   72 -
 .../tdb2/store/TestTransactionLifecycleTDB.java |   34 -
 .../seaborne/tdb2/store/TestTransactions.java   |  205 ---
 .../seaborne/tdb2/store/TestTripleTable.java    |  133 --
 .../seaborne/tdb2/store/Test_SPARQL_TDB.java    |  222 ---
 .../store/nodetable/AbstractTestNodeTable.java  |   67 -
 .../tdb2/store/nodetable/TS_NodeTable.java      |   34 -
 .../tdb2/store/nodetable/TestNodeTable.java     |   38 -
 .../tdb2/store/nodetable/TestNodeTableBase.java |   40 -
 .../store/nodetable/TestNodeTableStored.java    |   46 -
 .../nodetable/TestNodeTableStoredBase.java      |   47 -
 .../tupletable/AbstractTestTupleIndex.java      |  265 ---
 .../seaborne/tdb2/store/tupletable/NData.java   |   38 -
 .../tdb2/store/tupletable/TS_TupleTable.java    |   32 -
 .../store/tupletable/TestTupleIndexRecord.java  |   43 -
 .../tupletable/TestTupleIndexRecordDirect.java  |  315 ----
 .../tdb2/store/tupletable/TestTupleTable.java   |  152 --
 .../tdb2/store/value/TestDoubleNode62.java      |  123 --
 .../tdb2/store/value/TestNodeIdInline.java      |  286 ----
 .../test/java/org/seaborne/tdb2/sys/TS_Sys.java |   34 -
 .../tdb2/sys/TestDatabaseConnection.java        |   69 -
 .../org/seaborne/tdb2/sys/TestDatabaseOps.java  |  173 --
 .../java/org/seaborne/tdb2/sys/TestOps.java     |   32 -
 .../java/org/seaborne/tdb2/sys/TestSys.java     |   33 -
 jena-db/pom.xml                                 |  364 +----
 800 files changed, 49532 insertions(+), 49839 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/pom.xml
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/pom.xml b/jena-db/jena-dboe-base/pom.xml
index 07d6ba1..7657165 100644
--- a/jena-db/jena-dboe-base/pom.xml
+++ b/jena-db/jena-dboe-base/pom.xml
@@ -35,11 +35,13 @@
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
+      <version>3.5.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.jena</groupId>
       <artifactId>jena-arq</artifactId>
+      <version>3.5.0-SNAPSHOT</version>
       <classifier>tests</classifier>
       <scope>test</scope>
     </dependency>

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/DBOpEnvException.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/DBOpEnvException.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/DBOpEnvException.java
new file mode 100644
index 0000000..653bd6a
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/DBOpEnvException.java
@@ -0,0 +1,29 @@
+/*
+ * 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.dboe;
+
+import org.apache.jena.shared.JenaException;
+
+public class DBOpEnvException extends JenaException
+{
+    public DBOpEnvException()                          { super() ; }
+    public DBOpEnvException(String msg)                { super(msg) ; }
+    public DBOpEnvException(Throwable th)              { super(th) ; }
+    public DBOpEnvException(String msg, Throwable th)  { super(msg, th) ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/StorageException.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/StorageException.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/StorageException.java
new file mode 100644
index 0000000..c45be4c
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/StorageException.java
@@ -0,0 +1,27 @@
+/*
+ * 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.dboe.base;
+
+public class StorageException extends RuntimeException
+{
+    public StorageException()                          { super() ; }
+    public StorageException(String msg)                { super(msg) ; }
+    public StorageException(Throwable th)              { super(th) ; }
+    public StorageException(String msg, Throwable th)  { super(msg, th) ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/Block.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/Block.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/Block.java
new file mode 100644
index 0000000..20a3218
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/Block.java
@@ -0,0 +1,166 @@
+/*
+ * 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.dboe.base.block;
+
+import java.io.ByteArrayOutputStream ;
+import java.io.PrintStream ;
+import java.nio.ByteBuffer ;
+import org.apache.jena.atlas.lib.ByteBufferLib ;
+
+public final class Block
+{
+    // XXX Note development code added to enforce read-only use. Marked [RO]
+    
+    // While the general mechanisms support long block id,
+    // some uses make restrictions.
+    // BlockMgrs:
+    //   Blocks for indexes (B+Trees) are addressed by int - one int is 2G of 8K units = 16T
+    // Blocks for objects are addressed by long - this is file offset so 2G is not enough. 
+    
+    private final Long id ;          // Keep as object.  It's the cache key.
+    //private BlockRef blockRef ;
+    
+
+    // These are information carrying flags -- not enforced
+    // although .write checks the readOnly flags.
+    private boolean readOnly = false ;
+    private boolean modified = false ;
+    
+    private /*[[Dev-RO]] final*/ ByteBuffer byteBuffer ;
+    // If the byteBuffer is, say, a slice of another one,
+    // this can be used to carry a ref to the real ByteBuffer.  
+    private ByteBuffer underlyingByteBuffer ;
+
+    public Block(long id, ByteBuffer byteBuffer) {
+        this(Long.valueOf(id), byteBuffer) ;
+    }
+
+    public Block(Long id, ByteBuffer byteBuffer) {
+        // ByteBuffer is whole disk space from byte 0 for this disk unit.
+        this.id = id ;
+        this.byteBuffer = byteBuffer ;
+        // this.blockRef = null ;
+        // Default - writeable, unmodified block.
+        this.readOnly = false ;
+        this.modified = false ;
+        this.underlyingByteBuffer = null ;
+    }
+
+    public final Long getId() {
+        return id ;
+    }
+
+    public final ByteBuffer getByteBuffer() {
+        return byteBuffer ;
+    }
+
+    public boolean isReadOnly() {
+        return readOnly ;
+    }
+
+    public void setReadOnly(boolean readonly) {
+        if ( readonly && modified )
+            throw new BlockException("Attempt to mark a modified block as read-only") ;
+        // Hard to force a read-only byte buffer because higher levels
+        // may slice this and have their own byte buffers or even 
+        // intBuffers etc.
+        this.readOnly = readonly ;
+    }
+
+    public boolean isModified() {
+        return modified ;
+    }
+
+    public void setModified(boolean modified) {
+        if ( readOnly && modified )
+            throw new BlockException("Attempt to mark a readonly block as modified") ;
+        this.modified = modified ;
+    }
+
+    public ByteBuffer getUnderlyingByteBuffer()
+    { return underlyingByteBuffer ; }
+
+    public void setUnderlyingByteBuffer(ByteBuffer underlyingByteBuffer)
+    { this.underlyingByteBuffer = underlyingByteBuffer ; }
+    
+    @Override
+    public String toString() {
+        ByteBuffer bb = getByteBuffer() ;
+        if ( true )
+            // Short form.
+            return String.format("Block: %d (posn=%d, limit=%d, cap=%d)", id, bb.position(), bb.limit(), bb.capacity()) ;
+        // Long form - with some bytes from the ByteBuffer.
+        ByteArrayOutputStream out = new ByteArrayOutputStream() ;
+        PrintStream x = new PrintStream(out) ;
+        ByteBufferLib.print(x, bb) ;
+        x.flush() ;
+        String str = out.toString() ;
+        return String.format("Block: %d %s", id, str) ;
+    }
+
+    /** Deep copy, including ByteBuffer contents into a HeapByteBuffer. */
+    public Block replicate() {
+        ByteBuffer dstBuffer = ByteBuffer.allocate(getByteBuffer().capacity()) ;
+        return replicate(dstBuffer) ;
+    }
+    
+    /**
+     * Deep copy, including ByteBuffer contents, using the supplied ByteBuffer
+     * to hold the contents and to be used when constructing the new Block. The
+     * capacity of the supplied ByteBuffer must be equal to or greater than this
+     * block's capacity.
+     */
+    private Block replicate(ByteBuffer dstBuffer) {
+        replicateByteBuffer(getByteBuffer(), dstBuffer) ;
+        Block b = new Block(getId(), dstBuffer) ;
+        b.setModified(modified) ;
+        b.setReadOnly(readOnly) ;
+        // b.blockRef = null ;
+        return b ;
+    }
+
+    public static void replicate(Block srcBlock, Block dstBlock) {
+        if ( !srcBlock.getId().equals(dstBlock.getId()) )
+            throw new BlockException("FileAccessMem: Attempt to copy across blocks: " + srcBlock.getId() + " => " + dstBlock.getId()) ;
+        replicate(srcBlock.getByteBuffer(), dstBlock.getByteBuffer()) ;
+    }
+
+    private static ByteBuffer replicateByteBuffer(ByteBuffer srcBlk, ByteBuffer dstBlk) {
+        int x = srcBlk.position() ;
+        int y = srcBlk.limit() ;
+        srcBlk.clear() ;
+
+        if ( srcBlk.hasArray() && dstBlk.hasArray() )
+            System.arraycopy(srcBlk.array(), 0, dstBlk.array(), 0, srcBlk.capacity()) ;
+        else
+            dstBlk.put(srcBlk) ;
+
+        srcBlk.position(x) ;
+        dstBlk.position(x) ;
+        srcBlk.limit(y) ;
+        dstBlk.limit(y) ;
+        return dstBlk ;
+    }
+
+    private static void replicate(ByteBuffer srcBlk, ByteBuffer dstBlk) {
+        srcBlk.position(0) ;
+        dstBlk.position(0) ;
+        dstBlk.put(srcBlk) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockException.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockException.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockException.java
new file mode 100644
index 0000000..102fe3c
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockException.java
@@ -0,0 +1,29 @@
+/*
+ * 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.dboe.base.block;
+
+import org.apache.jena.dboe.base.file.FileException;
+
+public class BlockException extends FileException
+{
+    public BlockException()                          { super() ; }
+    public BlockException(String msg)                { super(msg) ; }
+    public BlockException(Throwable th)              { super(th) ; }
+    public BlockException(String msg, Throwable th)  { super(msg, th) ; }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgr.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgr.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgr.java
new file mode 100644
index 0000000..f32731c
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgr.java
@@ -0,0 +1,100 @@
+/*
+ * 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.dboe.base.block;
+
+import org.apache.jena.atlas.lib.Closeable ;
+import org.apache.jena.atlas.lib.Sync ;
+
+
+public interface BlockMgr extends Sync, Closeable /*UnitMgr<Block>*/
+{
+    /** Allocate an uninitialized block - writable - call only inside a update sequence. 
+     *  If blockSize is -1, means "default/fixed size" for this BlockMgr
+     */
+    public Block allocate(int blockSize) ;
+    
+    /** Answer whether there are any blocks in the collection being managed */
+    public boolean isEmpty() ; 
+    
+    /** The fixed allocated blocks are in the range [0,allocLimit).
+     * Allocation units need not be +1 increments */ 
+    public long allocLimit() ; 
+
+    /** Reset the allocation limit, should be a number previously obtained from allocLimit */
+    public void resetAlloc(long boundary) ;
+
+    /** Fetch a block, use for read only */
+    public Block getRead(long id);
+    
+    /** Fetch a block, use for write and read - only inside "update" */
+    public Block getWrite(long id);
+
+    /** Release a block, unmodified or already written. */
+    public void release(Block block) ;
+
+    /** Promote to writeable : it's OK to promote an already writeable block */ 
+    public Block promote(Block block);
+
+    // Bad name?  "endWrite", "put" -- for a mapped block, the changes are made directly, not on the write() */   
+    /** Write a block back - it still needs releasing. */ 
+    public void write(Block block) ;
+    
+    /** Replace the contents of a block slot with new contents. Block does not need releasing.
+     * The write() operation may not do real work if the block is mapped - this operation
+     * really does replace the contents with the new contents.  
+     */ 
+    public void overwrite(Block blk) ;
+    
+   /** Announce a block is no longer in use (i.e it's now freed) */ 
+    public void free(Block block);
+  
+    /** Is this a valid block id? (may be a free block)*/
+    public boolean valid(int id) ;
+    
+    /** Close the block manager */
+    @Override
+    public void close() ;
+    
+    /** Is this block manager still usable?  Closed block managers can not perform any operations except this one. */  
+    public boolean isClosed() ; 
+    
+    /** Sync the block manager */
+    @Override
+    public void sync() ;
+    
+    /** Sync the block manager : system operation to ensure sync() is passed down */
+    public void syncForce() ;
+
+    // begin/end markers.
+
+    /** Start of update */
+    public void beginUpdate() ;
+    
+    /** Completion of update */
+    public void endUpdate() ;
+
+    /** Start of read */
+    public void beginRead() ;
+
+    /** Completion of read */
+    public void endRead() ;
+
+    /* Label for helping trace which BlockMgr is which */
+    public String getLabel() ;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBase.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBase.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBase.java
new file mode 100644
index 0000000..e8d9171
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBase.java
@@ -0,0 +1,52 @@
+/*
+ * 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.dboe.base.block;
+
+import org.slf4j.Logger ;
+
+public abstract class BlockMgrBase implements BlockMgr
+{
+    protected final int blockSize ;
+    private String label ;
+    protected abstract Logger log() ;
+
+    // Fixed size, fixed block type.
+    protected BlockMgrBase(String label, int blockSize)
+    {
+        this.label = label ;
+        this.blockSize = blockSize ;
+    }
+
+    @Override
+    public final Block allocate(int blkSize)
+    {
+        if ( blkSize > 0 && blkSize != this.blockSize )
+            throw new BlockException("Fixed blocksize BlockMgr: request= "+blkSize+"  fixed size="+this.blockSize) ;
+        return allocate() ;
+    }
+    
+    protected abstract Block allocate() ;
+    
+    @Override final public String getLabel() { return label ; } 
+
+    @Override public void endUpdate()       {}
+    @Override public void beginUpdate()     {}
+    @Override public void beginRead()       {}
+    @Override public void endRead()         {}
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilder.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilder.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilder.java
new file mode 100644
index 0000000..1c81738
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilder.java
@@ -0,0 +1,25 @@
+/*
+ * 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.dboe.base.block;
+
+import org.apache.jena.dboe.base.file.FileSet;
+
+public interface BlockMgrBuilder {
+    BlockMgr buildBlockMgr(FileSet fileSet, String ext, BlockParams indexParams) ;
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilderStd.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilderStd.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilderStd.java
new file mode 100644
index 0000000..d11d72d
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrBuilderStd.java
@@ -0,0 +1,29 @@
+/*
+ * 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.dboe.base.block;
+
+import org.apache.jena.dboe.base.file.FileSet;
+
+public class BlockMgrBuilderStd implements BlockMgrBuilder {
+    @Override
+    public BlockMgr buildBlockMgr(FileSet fileSet, String ext, BlockParams indexParams) {
+        return BlockMgrFactory.create(fileSet, ext, indexParams) ;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrCache.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrCache.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrCache.java
new file mode 100644
index 0000000..bdb4809
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrCache.java
@@ -0,0 +1,326 @@
+/*
+ * 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.dboe.base.block ;
+
+import java.util.ArrayList ;
+import java.util.Iterator ;
+import java.util.List ;
+
+import org.apache.jena.atlas.lib.Cache ;
+import org.apache.jena.atlas.lib.CacheFactory ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
+
+/** Caching block manager - this is an LRU cache */
+public class BlockMgrCache extends BlockMgrSync {
+    // Actually, this is two cache one on the read blocks and one on the write
+    // blocks.
+    // The overridden public operations are sync'ed.
+    // As sync is on "this", it also covers all the other operations via
+    // BlockMgrSync
+
+    private static Logger            log            = LoggerFactory.getLogger(BlockMgrCache.class) ;
+    // Read cache : always present.
+    private final Cache<Long, Block> readCache ;
+
+    // Delayed dirty writes. May be present, may not.
+    private final Cache<Long, Block> writeCache ;
+
+    // Also enable the logging level.
+    public static boolean            globalLogging  = false ;    
+    private boolean                  logging        = false ;
+    // ---- stats
+    long                             cacheReadHits  = 0 ;
+    long                             cacheMisses    = 0 ;
+    long                             cacheWriteHits = 0 ;
+
+    static BlockMgr create(int readSlots, int writeSlots, final BlockMgr blockMgr) {
+        if ( readSlots < 0 && writeSlots < 0 )
+            return blockMgr ;
+        return new BlockMgrCache(readSlots, writeSlots, blockMgr) ;
+    }
+
+    private BlockMgrCache(int readSlots, int writeSlots, final BlockMgr blockMgr) {
+        super(blockMgr) ;
+        // Caches are related so we can't use a Getter for cache management.
+        if ( readSlots < -1 )
+            readCache = CacheFactory.createNullCache() ;
+        else
+            readCache = CacheFactory.createCache(readSlots) ;
+        if ( writeSlots <= 0 )
+            writeCache = null ;
+        else {
+            writeCache = CacheFactory.createCache(writeSlots) ;
+            writeCache.setDropHandler((id, block) -> { 
+                // We're inside a synchronized operation at this point.
+                log("Cache spill: write block: %d", id) ;
+                if ( block == null ) {
+                    log.warn("Write cache: " + id + " dropping an entry that isn't there") ;
+                    return ;
+                }
+                // Force the block to be writtern
+                // by sending it to the wrapped BlockMgr
+                BlockMgrCache.super.write(block) ;
+            }) ;
+        }
+    }
+
+    @Override
+    synchronized public void resetAlloc(long boundary) {
+        // On abort, need to clear the caches of inaccesible blocks.
+        // An abort is rare (?). We do very carefully. 
+        // Could (probably) delete in the loop or use Iteator.remove on keys().
+        // (Check the Cache contract)
+        List<Long> removals = new ArrayList<>() ;
+        readCache.keys().forEachRemaining((x)->{
+            if ( x >= boundary )
+                removals.add(x) ; 
+        }) ;
+        removals.forEach(readCache::remove) ;
+        removals.clear() ;
+        writeCache.keys().forEachRemaining((x)->{
+            if ( x >= boundary )
+                removals.add(x) ; 
+        }) ;
+        removals.forEach(writeCache::remove) ;
+        super.resetAlloc(boundary); 
+    }
+    
+    @Override
+    synchronized public Block getRead(long id) {
+        // A Block may be in the read cache or the write cache.
+        // It can be just in the write cache because the read cache is finite.
+        Block blk = readCache.getIfPresent(id) ;
+        if ( blk != null ) {
+            cacheReadHits++ ;
+            log("Hit(r->r) : %d", id) ;
+            return blk ;
+        }
+
+        // A requested block may be in the other cache.
+        // Writable blocks are readable.
+        // readable blocks are not writeable (see below).
+        if ( writeCache != null )
+            // Might still be in the dirty blocks.
+            // Leave in write cache
+            blk = writeCache.getIfPresent(id) ;
+        if ( blk != null ) {
+            cacheWriteHits++ ;
+            log("Hit(r->w) : %d", id) ;
+            return blk ;
+        }
+
+        cacheMisses++ ;
+        log("Miss/r: %d", id) ;
+        blk = super.getRead(id) ;
+        readCache.put(id, blk) ;
+        return blk ;
+    }
+
+    @Override
+    synchronized public Block getWrite(long _id) {
+        Long id = _id ;
+        Block blk = null ;
+        if ( writeCache != null )
+            blk = writeCache.getIfPresent(id) ;
+        if ( blk != null ) {
+            cacheWriteHits++ ;
+            log("Hit(w->w) : %d", id) ;
+            return blk ;
+        }
+
+        // blk is null.
+        // A requested block may be in the other cache. Promote it.
+
+        if ( readCache.containsKey(id) ) {
+            blk = readCache.getIfPresent(id) ;
+            cacheReadHits++ ;
+            log("Hit(w->r) : %d", id) ;
+            blk = promote(blk) ;
+            return blk ;
+        }
+
+        // Did not find.
+        cacheMisses++ ;
+        log("Miss/w: %d", id) ;
+        // Pass operation to wrapper.
+        blk = super.getWrite(id) ;
+        if ( writeCache != null )
+            writeCache.put(id, blk) ;
+        return blk ;
+    }
+
+    @Override
+    synchronized public Block promote(Block block) {
+        Long id = block.getId() ;
+        readCache.remove(id) ;
+        Block block2 = super.promote(block) ;
+        if ( writeCache != null )
+            writeCache.put(id, block2) ;
+        return block ;
+    }
+
+    @Override
+    synchronized public void write(Block block) {
+        writeCache(block) ;
+        super.write(block) ;
+    }
+
+    @Override
+    synchronized public void overwrite(Block block) {
+        Long id = block.getId() ;
+        // It can be a read block (by the transaction), now being written for
+        // real (enacting a transaction).
+        super.overwrite(block) ;
+        // Keep read cache up-to-date.
+        // Must at least expel the read block (which is not the overwrite
+        // block).
+        readCache.put(id, block) ;
+    }
+
+    private void writeCache(Block block) {
+        Long id = block.getId() ;
+        log("WriteCache : %d", id) ;
+        // Should not be in the read cache due to a getWrite earlier.
+        if ( readCache.containsKey(id) )
+            log.warn("write: Block in the read cache") ;
+        if ( writeCache != null ) {
+            writeCache.put(id, block) ;
+            return ;
+        }
+    }
+
+    @Override
+    synchronized public void free(Block block) {
+        Long id = block.getId() ;
+        log("Free  : %d", id) ;
+        if ( readCache.containsKey(id) ) {
+            log.warn("Freeing block from read cache") ;
+            readCache.remove(id) ;
+        }
+        if ( writeCache != null )
+            writeCache.remove(id) ;
+        super.free(block) ;
+    }
+
+    @Override
+    synchronized public void sync() {
+        _sync(false) ;
+    }
+
+    @Override
+    synchronized public void syncForce() {
+        _sync(true) ;
+    }
+
+    @Override
+    synchronized public void close() {
+        if ( writeCache != null )
+            log("close (" + writeCache.size() + " blocks)") ;
+        syncFlush() ;
+        super.close() ;
+    }
+
+    @Override
+    public String toString() {
+        return "Cache:" + super.blockMgr.toString() ;
+    }
+
+    private void log(String fmt, Object... args) {
+        if ( !logging && !globalLogging )
+            return ;
+        String msg = String.format(fmt, args) ;
+        if ( getLabel() != null )
+            msg = getLabel() + " : " + msg ;
+        log.debug(msg) ;
+    }
+
+    private void _sync(boolean force) {
+        if ( true ) {
+            String x = "" ;
+            if ( getLabel() != null )
+                x = getLabel() + " : " ;
+            log("%sH=%d, M=%d, W=%d", x, cacheReadHits, cacheMisses, cacheWriteHits) ;
+        }
+
+        if ( writeCache != null )
+            log("sync (%d blocks)", writeCache.size()) ;
+        else
+            log("sync") ;
+        boolean somethingWritten = syncFlush() ;
+
+        if ( force ) {
+            log("syncForce underlying BlockMgr") ;
+            super.syncForce() ;
+        } else if ( somethingWritten ) {
+            log("sync underlying BlockMgr") ;
+            super.sync() ;
+        } else
+            log("Empty sync") ;
+    }
+
+    private boolean syncFlush() {
+        if ( writeCache == null )
+            return false ;
+
+        boolean didSync = false ;
+
+        log("Flush (write cache)") ;
+
+        long N = writeCache.size() ;
+        Long[] ids = new Long[(int)N] ;
+
+        // Single writer (sync is a write operation MRSW)
+        // Iterating is safe.
+
+        Iterator<Long> iter = writeCache.keys() ;
+        if ( iter.hasNext() )
+            didSync = true ;
+
+        // Need to get all then delete else concurrent modification exception.
+        for ( int i = 0 ; iter.hasNext() ; i++ )
+            ids[i] = iter.next() ;
+
+        for ( int i = 0 ; i < N ; i++ ) {
+            Long id = ids[i] ;
+            expelEntry(id) ;
+        }
+        if ( didSync )
+            super.sync() ;
+        return didSync ;
+    }
+
+    // Write out when flushed.
+    // Do not call from drop handler.
+    private void expelEntry(Long id) {
+        Block block = writeCache.getIfPresent(id) ;
+        if ( block == null ) {
+            log.warn("Write cache: " + id + " expelling entry that isn't there") ;
+            return ;
+        }
+        log("Expel (write cache): %d", id) ;
+        // This pushes the block to the BlockMgr being cached.
+        super.write(block) ;
+        writeCache.remove(id) ;
+
+        // Move it into the readCache because it's often read after writing
+        // and the read cache is often larger.
+        readCache.put(id, block) ;
+    }
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrFactory.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrFactory.java b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrFactory.java
new file mode 100644
index 0000000..41af08f
--- /dev/null
+++ b/jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockMgrFactory.java
@@ -0,0 +1,151 @@
+/*
+ * 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.dboe.base.block ;
+
+import org.apache.jena.atlas.logging.Log ;
+import org.apache.jena.dboe.DBOpEnvException;
+import org.apache.jena.dboe.base.file.*;
+import org.apache.jena.dboe.sys.SystemIndex;
+
+public class BlockMgrFactory {
+    // This isn't always helpful so be careful if setting the default to "true".
+    // Sometimes the tracking is too strict
+    // e.g. transactions keep blocks and not release them down the layers.
+    public/* final */static boolean AddTracker = false ;
+
+    public static BlockMgr tracker(BlockMgr blockMgr) {
+        if ( blockMgr instanceof BlockMgrTracker )
+            return blockMgr ;
+        return BlockMgrTracker.track(blockMgr) ;
+    }
+
+    /** Add a tracker if the system default is to do so */
+    private static BlockMgr track(BlockMgr blockMgr) {
+        if ( !AddTracker )
+            return blockMgr ;
+        return tracker(blockMgr) ;
+    }
+
+    public static BlockMgr create(FileSet fileSet, String ext, BlockParams params) {
+        return create(fileSet, ext,
+                      params.getFileMode(),
+                      params.getBlockSize(),
+                      params.getBlockReadCacheSize(),
+                      params.getBlockWriteCacheSize()) ;
+    }
+    
+    public static BlockMgr create(FileSet fileSet, String ext, int blockSize, int readBlockCacheSize, int writeBlockCacheSize) {
+        return create(fileSet, ext, null, blockSize, readBlockCacheSize, writeBlockCacheSize) ;
+    }
+
+    // XXX Deprecate?
+    public static BlockMgr create(FileSet fileSet, String ext, FileMode fileMode, int blockSize, int readBlockCacheSize, int writeBlockCacheSize) {
+        if ( fileSet.isMem() )
+            return createMem(fileSet.filename(ext), blockSize) ;
+        else
+            return createFile(fileSet.filename(ext), fileMode, blockSize, readBlockCacheSize, writeBlockCacheSize) ;
+    }
+
+    /** Create an in-memory block manager */
+    public static BlockMgr createMem(String indexName, int blockSize) {
+        BlockAccess file = new BlockAccessMem(indexName, blockSize) ;
+        BlockMgr blockMgr = new BlockMgrFileAccess(file, blockSize) ;
+        blockMgr = new BlockMgrFreeChain(blockMgr) ;
+        // Small cache - testing.
+        blockMgr = BlockMgrCache.create(3, 3, blockMgr) ;
+        return track(blockMgr) ;
+    }
+
+    /** Create a BlockMgr backed by a real file */
+    public static BlockMgr createFile(String filename, BlockParams params) {
+        return createFile(filename, 
+                          params.getFileMode(), params.getBlockSize(),
+                          params.getBlockReadCacheSize(), params.getBlockWriteCacheSize()) ;
+    }
+
+        /** Create a BlockMgr backed by a real file */
+    public static BlockMgr createFile(String filename, FileMode fileMode, int blockSize, int readBlockCacheSize, int writeBlockCacheSize) {
+        if ( fileMode == null )
+            fileMode = SystemIndex.fileMode() ;
+        switch (fileMode) {
+            case mapped :
+                return createMMapFile(filename, blockSize) ;
+            case direct :
+                return createStdFile(filename, blockSize, readBlockCacheSize, writeBlockCacheSize) ;
+        }
+        throw new DBOpEnvException("Unknown file mode: " + fileMode) ;
+    }
+
+    /** Create a NIO Block Manager */
+    public static BlockMgr createMMapFile(String filename, int blockSize) {
+        BlockAccess file = new BlockAccessMapped(filename, blockSize) ;
+        BlockMgr blockMgr = wrapFileAccess(file, blockSize) ;
+        return track(blockMgr) ;
+    }
+
+    /** Create a Block Manager using direct access (and a cache) */
+    public static BlockMgr createStdFile(String filename, int blockSize, int readBlockCacheSize, int writeBlockCacheSize) {
+        BlockAccess file = new BlockAccessDirect(filename, blockSize) ;
+        BlockMgr blockMgr = wrapFileAccess(file, blockSize) ;
+        blockMgr = addCache(blockMgr, readBlockCacheSize, writeBlockCacheSize) ;
+        return track(blockMgr) ;
+    }
+
+    /** Create a Block Manager using direct access, no caching, no nothing. */
+    public static BlockMgr createStdFileNoCache(String filename, int blockSize) {
+        BlockAccess blockAccess = new BlockAccessDirect(filename, blockSize) ;
+        BlockMgr blockMgr = new BlockMgrFileAccess(blockAccess, blockSize) ;
+        return blockMgr ;
+    }
+
+    /**
+     * Add a caching layer to a BlockMgr.
+     * <p>
+     * This does not make sense for memory BlockMgr or for memory mapper files.
+     * This function always add the cache.
+     * 
+     * @see #addCache(BlockMgr, FileSet, FileMode, int, int)
+     */
+    public static BlockMgr addCache(BlockMgr blockMgr, int readBlockCacheSize, int writeBlockCacheSize) {
+        if ( blockMgr instanceof BlockMgrCache )
+            Log.warn(BlockMgrFactory.class, "BlockMgr already has a cache: " + blockMgr.getLabel()) ;
+        return BlockMgrCache.create(readBlockCacheSize, writeBlockCacheSize, blockMgr) ;
+    }
+
+    /**
+     * Add a caching layer to a BlockMgr if appropriate. This does not make
+     * sense for memory BlockMgr or for memory mapper files. These are skipped.
+     */
+    public static BlockMgr addCache(BlockMgr blockMgr, FileSet fileSet, FileMode fileMode, int readBlockCacheSize, int writeBlockCacheSize) {
+        if ( fileSet.isMem() )
+            return blockMgr ;
+        if ( fileMode == null )
+            fileMode = SystemIndex.fileMode() ;
+        if ( fileMode == FileMode.mapped )
+            return blockMgr ;
+        return addCache(blockMgr, readBlockCacheSize, writeBlockCacheSize) ;
+    }
+
+    private static BlockMgr wrapFileAccess(BlockAccess blockAccess, int blockSize) {
+        BlockMgr blockMgr = new BlockMgrFileAccess(blockAccess, blockSize) ;
+        // This is a temporary fix to the problem
+        blockMgr = new BlockMgrFreeChain(blockMgr) ;
+        return blockMgr ;
+    }
+}