/** * gets a list of all the copied pages of a given B-Tree. * * @param name the name of the B-Tree * @return list of RevisionOffset * @throws Exception */ private List<RevisionOffset> getRevisions( String name ) throws Exception { TupleCursor<RevisionName, long[]> cursor = rm.copiedPageBtree.browse(); List<RevisionOffset> lst = new ArrayList<RevisionOffset>(); while ( cursor.hasNext() ) { Tuple<RevisionName, long[]> t = cursor.next(); RevisionName rn = t.getKey(); if ( name.equals( rn.getName() ) ) { //System.out.println( t.getValue() ); lst.add( new RevisionOffset( rn.getRevision(), t.getValue() ) ); } } cursor.close(); return lst; } }
TupleCursor<NameRevision, Long> btreeCursor = btreeOfBtrees.browse(); Map<String, Long> loadedBtrees = new HashMap<String, Long>();
/** * {@inheritDoc} */ public void afterLast() throws LdapException, CursorException { checkNotClosed(); try { if ( browser == null ) { browser = table.getBTree().browse(); } browser.afterLast(); clearValue(); } catch ( IOException e ) { throw new CursorException( e ); } catch ( KeyNotFoundException knfe ) { throw new CursorException( knfe ); } }
/** * {@inheritDoc} */ public void beforeFirst() throws LdapException, CursorException { checkNotClosed(); try { if ( browser == null ) { browser = table.getBTree().browse(); } browser.beforeFirst(); clearValue(); } catch ( IOException e ) { throw new CursorException( e ); } catch ( KeyNotFoundException knfe ) { throw new CursorException( knfe ); } }
TupleCursor<V, V> cursor = valueBtree.browse(); V returnedValue = null; int pos = 0;
valueArray[0] = valueBtree.browse().next().getKey(); nbArrayElems = 1; valueBtree.close();
final TupleCursor cursor = btree.browse();