/** * Initialize the BTree. * * @throws IOException If we get some exception while initializing the BTree */ public void init( BTree<K, V> parentBTree ) { if ( parentBTree == null ) { // This is not a subBtree, we have to initialize the cache // Create the queue containing the pending read transactions readTransactions = new ConcurrentLinkedQueue<ReadTransaction<K, V>>(); if ( cacheSize < 1 ) { cacheSize = DEFAULT_CACHE_SIZE; } cache = new LRUMap( cacheSize ); } else { this.cache = ( ( PersistedBTree<K, V> ) parentBTree ).getCache(); this.readTransactions = ( ( PersistedBTree<K, V> ) parentBTree ).getReadTransactions(); } // Initialize the txnManager thread //FIXME we should NOT create a new transaction manager thread for each BTree //createTransactionManager(); }
Iterator<ReadTransaction> txnItr = tree.getReadTransactions().iterator(); while ( txnItr.hasNext() )